4edb8c8337
* -PLT switch added to opj_compress * Add a opj_encoder_set_extra_options() function that accepts a PLT=YES option, and could be expanded later for other uses. ------- Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2, coming from S2A_MSIL1C_20160914T074612_N0204_R135_T36JTT_20160914T081456.SAFE Decompress it to TIFF: ``` opj_uncompress -i T36JTT_20160914T074612_B02.jp2 -o T36JTT_20160914T074612_B02.tif ``` Recompress it with similar parameters as original: ``` opj_compress -n 5 -c [256,256],[256,256],[256,256],[256,256],[256,256] -t 1024,1024 -PLT -i T36JTT_20160914T074612_B02.tif -o T36JTT_20160914T074612_B02_PLT.jp2 ``` Dump codestream detail with GDAL dump_jp2.py utility (https://github.com/OSGeo/gdal/blob/master/gdal/swig/python/samples/dump_jp2.py) ``` python dump_jp2.py T36JTT_20160914T074612_B02.jp2 > /tmp/dump_sentinel2_ori.txt python dump_jp2.py T36JTT_20160914T074612_B02_PLT.jp2 > /tmp/dump_sentinel2_openjpeg_plt.txt ``` The diff between both show very similar structure, and identical number of packets in PLT markers Now testing with Kakadu (KDU803_Demo_Apps_for_Linux-x86-64_200210) Full file decompression: ``` kdu_expand -i T36JTT_20160914T074612_B02_PLT.jp2 -o tmp.tif Consumed 121 tile-part(s) from a total of 121 tile(s). Consumed 80,318,806 codestream bytes (excluding any file format) = 5.329697 bits/pel. Processed using the multi-threaded environment, with 8 parallel threads of execution ``` Partial decompresson (presumably using PLT markers): ``` kdu_expand -i T36JTT_20160914T074612_B02.jp2 -o tmp.pgm -region "{0.5,0.5},{0.01,0.01}" kdu_expand -i T36JTT_20160914T074612_B02_PLT.jp2 -o tmp2.pgm -region "{0.5,0.5},{0.01,0.01}" diff tmp.pgm tmp2.pgm && echo "same !" ``` ------- Funded by ESA for S2-MPC project |
||
---|---|---|
cmake | ||
doc | ||
scripts | ||
src | ||
tests | ||
thirdparty | ||
tools | ||
wrapping | ||
.gitignore | ||
.travis.yml | ||
AUTHORS.md | ||
CHANGELOG.md | ||
CMakeLists.txt | ||
CTestConfig.cmake | ||
INSTALL.md | ||
LICENSE | ||
NEWS.md | ||
README.md | ||
THANKS.md | ||
appveyor.yml |
README.md
OPENJPEG Library and Applications
What is OpenJPEG ?
OpenJPEG is an open-source JPEG 2000 codec written in C language. It has been developed in order to promote the use of JPEG 2000, a still-image compression standard from the Joint Photographic Experts Group (JPEG). Since April 2015, it is officially recognized by ISO/IEC and ITU-T as a JPEG 2000 Reference Software.
Who can use the code ?
Anyone. As the OpenJPEG code is released under the BSD 2-clause "Simplified" License, anyone can use or modify the code, even for commercial applications. The only restriction is to retain the copyright in the sources or in the binaries documentation. Of course, if you modified the code in a way that might be of interest for other users, you are encouraged to share it (through a github pull request or by filling an issue) but this is not a requirement.
How to install and use OpenJPEG ?
API Documentation needs a major refactoring. Meanwhile, you can check installation instructions and codec documentation.
Current Status
Who are the developers ?
The library is developed and maintained by the Image and Signal Processing Group (ISPGroup), in the Université catholique de Louvain (UCL, with the support of the CNES, the CS company and the intoPIX company. The JPWL module has been developed by the Digital Signal Processing Lab (DSPLab) of the University of Perugia, Italy (UNIPG).
Details on folders hierarchy
- src
- lib
- openjp2: contains the sources of the openjp2 library (Part 1 & 2)
- openjpwl: contains the additional sources if you want to build a JPWL-flavoured library.
- openjpip: complete client-server architecture for remote browsing of jpeg 2000 images.
- openjp3d: JP3D implementation
- openmj2: MJ2 implementation
- bin: contains all applications that use the openjpeg library
- common: common files to all applications
- jp2: a basic codec
- mj2: motion jpeg 2000 executables
- jpip: OpenJPIP applications (server and dec server)
- java: a Java client viewer for JPIP
- jp3d: JP3D applications
- tcltk: a test tool for JP3D
- wx
- OPJViewer: gui for displaying j2k files (based on wxWidget)
- lib
- wrapping
- java: java jni to use openjpeg in a java program
- thirdparty: thirdparty libraries used by some applications. These libraries will be built only if there are not found on the system. Note that libopenjpeg itself does not have any dependency.
- doc: doxygen documentation setup file and man pages
- tests: configuration files and utilities for the openjpeg test suite. All test images are located in openjpeg-data repository.
- cmake: cmake related files
- scripts: scripts for developers
See LICENSE for license and copyright information.
See INSTALL for installation procedures.
See NEWS for user visible changes in successive releases.
API/ABI
An API/ABI timeline is automatically updated here.
OpenJPEG strives to provide a stable API/ABI for your applications. As such it
only exposes a limited subset of its functions. It uses a mechanism of
exporting/hiding functions. If you are unsure which functions you can use in
your applications, you should compile OpenJPEG using something similar to gcc:
-fvisibility=hidden
compilation flag.
See also: http://gcc.gnu.org/wiki/Visibility
On windows, MSVC directly supports export/hiding function and as such the only API available is the one supported by OpenJPEG.