GithubHelp home page GithubHelp logo

Free jpeg2000 libraries? about iipsrv HOT 24 CLOSED

ruven avatar ruven commented on August 16, 2024
Free jpeg2000 libraries?

from iipsrv.

Comments (24)

geektortoise avatar geektortoise commented on August 16, 2024

Hello ruven,
Firstly, thanks for all your work on iipsrv. It's very useful for us. :-) 👍

You said here ( http://iipimage.sourceforge.net/2011/04/iipimage-0-9-9-server-release/ ) than "a fully open source implementation based on openJPEG will be included in the next server release".

Is it still your goal ?
Thanks.

from iipsrv.

ruven avatar ruven commented on August 16, 2024

Firstly, thanks for all your work on iipsrv. It's very useful for us. :-) 👍

Thanks!

a fully open source implementation based on openJPEG will be included in the next server release

I'm afraid it won't make it into this coming version 1.0, but will definitely be in version 1.1.

from iipsrv.

geektortoise avatar geektortoise commented on August 16, 2024

Ok.

Thanks for your reply. :-)

from iipsrv.

aeschylus avatar aeschylus commented on August 16, 2024

If someone can point me to the right part of the codebase to integrate these libraries, I would be happy to begin working on a branch to support this goal for the 1.1 release. I also know a number of others who would be interested in this as a technical challenge, both simply integrating the components, and in improving the components themselves (adding gpu support to openJpeg for instance) to bring them up to a superior level when compared with Kakadu.

from iipsrv.

aeschylus avatar aeschylus commented on August 16, 2024

It seems that @boskar might have some specific ideas as to where to start.

from iipsrv.

ahankinson avatar ahankinson commented on August 16, 2024

There are efforts underway by the Wellcome Library to get openJPEG up to par with Kakadu.

See:

https://groups.google.com/forum/#!searchin/iiif-discuss/openjpeg/iiif-discuss/apvlLaToKAE/iz9QYO-GGUcJ

https://groups.google.com/forum/#!searchin/iiif-discuss/openjpeg/iiif-discuss/L1k_24sX2mA/e4IVYzvRJlEJ

from iipsrv.

boskar avatar boskar commented on August 16, 2024

Well, We should obviously start here: https://github.com/moravianlibrary/iipsrv-openjpeg and see how good it is at the moment. I suppose there is no other way that reading the code referencing to kakadu and finding equivalents in chosen library...

http://apps.man.poznan.pl/trac/jpeg2k/wiki does not seem to have library as is, although the encoder/decoder works (tested today). Maybe we should cooperate with the authors about integration?

cuj2k - site does not work due to SF being down.

On the other hand: there seems to be another alternative (paid):
http://www.fastcompression.com/products/jpeg2000/cuda-jpeg2000.htm -
They support jpeg as well, so if full integration is ever made - that'd fast as hell.

from iipsrv.

ruven avatar ruven commented on August 16, 2024

I haven't tested it myself, but the openjpeg branch you cite is reportedly around 1000x slower than Kakadu.

However, as pointed out by @ahankinson there's work under way to optimize openjpeg, so it may become competitive speed-wise in the not too distant future. So, if you're looking for a technical challenge, helping to add SIMD or GPU support to openjpeg could be both very interesting and very useful!

from iipsrv.

stweil avatar stweil commented on August 16, 2024

https://github.com/stweil/iipsrv/tree/openjpeg-api-fixed is based on https://github.com/moravianlibrary/iipsrv-openjpeg, but fixed for latest OpenJPEG. I could process a JP2 file with it, but also observed program crashes. https://github.com/stweil/iipsrv/tree/openjpeg is a branch which merged latest iipsrv. It still needs some API fixes.

from iipsrv.

stweil avatar stweil commented on August 16, 2024

https://github.com/stweil/iipsrv/tree/openjpeg now works with OpenJPEG. It takes a lot of time: PalaisDuLouvre.jp2 (made from PalaisDuLouvre.tif) needs 27 s on my Intel Core i7 notebook.

iipsrv calculates 63 tiles, each of them taking about 0.4 s. If it would use all CPU cores of my notebook (as Kakadu does), the total time could be reduced from 27 s to 7 s.

With Kakadu, iipsrv does not calculate any tiles at all and delivers the same PalaisDuLouvre.jp2 as a JPEG image in 0.26 s. That is about 100 times as fast as OpenJPEG (not 1000 as it was reported by others).

For PalaisDuLouvre.tif, iipsrv calculates 223 tiles in 0.125 s.

from iipsrv.

boskar avatar boskar commented on August 16, 2024

Have You tried using multiple instances of iipsrv? It could be a way to parallelize the work...

from iipsrv.

stweil avatar stweil commented on August 16, 2024

@boskar: IMHO that would parallelize the work if there are several parallel requests, but not for each individual request...

from iipsrv.

boskar avatar boskar commented on August 16, 2024

@stweil Sure, You're right. But who needs a single tile? I suppose the client does not download them in row.

from iipsrv.

stweil avatar stweil commented on August 16, 2024

@ruven, are you interested in pull requests to get the OpenJPEG support added? The new code is clearly separated from the Kakadu code and could be disabled by default, so the risk would be low.

from iipsrv.

ruven avatar ruven commented on August 16, 2024

I'm preparing things for the 1.0 release, so let's wait until that's out of the way, then I'll be happy to accept a pull request.

from iipsrv.

ahankinson avatar ahankinson commented on August 16, 2024

Would it be useful to open a pull request with the understanding that it won't be merged until after 1.0?

from iipsrv.

ruven avatar ruven commented on August 16, 2024

You could do, but any pull will probably be easier if it's based on the final 1.0 code

from iipsrv.

ahankinson avatar ahankinson commented on August 16, 2024

It's possible to keep a PR up to date with frequent merges from master, so that the accepted PR applies cleanly to the latest revisions. That depends, of course, on the maintainer of the PR staying on top of it. :)

from iipsrv.

stweil avatar stweil commented on August 16, 2024

I just provided PR #61 for anybody interested in trying OpenJPEG support. This PR will be rebased and updated as needed.

from iipsrv.

stweil avatar stweil commented on August 16, 2024

The bad performance of iipsrv with OpenJPEG is mainly caused by the missing support for regionDecoding in the current code: while Kakadu requests the region directly from the JP2 image, OpenJPEG uses the TileManager to calculate a lot of tiles (several hundreds or more for large images), so the time factor of 100 or 1000 is not surprising – the factor will increase with the image size.

from iipsrv.

beaudet avatar beaudet commented on August 16, 2024

Not sure what the current state of openjpeg support is with IIP master, but I am retrofitting IIP to embed ICC profiles from the source files into the JPEGs that IIP generates. However, it seems that only one region from the source image is currently being extracted. See the screenshot below. This was found using one of the Wellcome Library's JP2 images and IIP on RedHat EL6 with openjpeg2-2.1.0-7.el6.x86_64 and openjpeg2-devel-2.1.0-7.el6.x86_64 from the EPEL repository and with IIP compiled using configure --enable-openjpeg.

image

from iipsrv.

stweil avatar stweil commented on August 16, 2024

I think that the status is still experimental. Nevertheless the effect which you observe looks strange. Perhaps you can try to debug it, for example have a look into the server log output.

from iipsrv.

beaudet avatar beaudet commented on August 16, 2024

Yeah, maybe in my free time :) For now, I'm going to ensure the ICC gets embedded in the resulting image and move on.

from iipsrv.

stweil avatar stweil commented on August 16, 2024

Is this issue still open, or can it be closed?

from iipsrv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.