|
JPIP
OpenJPIP README
Written by: Kaori Hagihara UCL/SST/ICTM/ELEN February 18 2011
IntroductionOpenJPIP software is an implementation of JPEG 2000 Part9: Interactivity tools, APIs and protocols (JPIP). ( For more info about JPIP, check the website: http://www.jpeg.org/jpeg2000/j2kpart9.html) The current implementation uses some results from the 2KAN project (http://www.2kan.org). First Version 2.0 covers:
LicenseThis software is released under the BSD license, anybody can use or modify the library, even for commercial applications. The only restriction is to retain the copyright in the sources or the binaries documentation. Neither the author, nor the university accept any responsibility for any kind of error or data loss which may occur during usage. System requirements
We tested this software with a virtual server running on the same Linux machine as the clients. Currently, it works only on linux or macosx platforms, windows version should come later. Building instructionsJPIP utilities are built through cmake and autotools procedures described in the Installation page. Use '-DBUILD_JPIP=on' and '--enable-jpip' respectively. To build JPIP utilities apart from the openjpeg project, a Makefile.nix is available in the same directory as this README file. Simply type 'make -f Makefile.nix' and it will build all the required C-executables. Concerning the java-based opj_viewer, simply type 'ant' in the corresponding directory (requires 'ant' utility of course) The documentation can be build this way (requires doxygen utility): cd doc doxygen Doxyfile UsagePreliminary notes
WebserverYou need a webserver running with the fastcgi module enabled and correctly configured. For Apache, add the following line to your /etc/apache2/mods-available/fastcgi.conf configuration file: FastCGIExternalServer /var/www/myFCGI -host localhost:3000 where /var/www is your DocumentRoot. Please refer to 'http://www.openjpeg.org/jpip/doc/ApacheFastCGITutorial.pdf' for more details. Server
% spawn-fcgi -f ./opj_server -p 3000 -n For shutting down JPIP server:%GET http://hostname/myFCGI?quitJPIP Client
% ./opj_dec_server You might prefer to implement this program from another directory since cache files are saved in the working directory.% mkdir cache % cd cache % ../opj_dec_server
% java -jar opj_viewer.jar http://hostname/myFCGI JP2_filename.jp2 [stateless/session] [jptstream/jppstream] The arguments
% telnet localhost 5000 quit JP2 encoding instructionsAn example to encode a TIF image "copenhague1.tif" at resolution 4780x4050, 8bit/pixel, grayscale. % ./image_to_j2k -i copenhague1.tif -o copenhague1.jp2 -p RPCL -c [64,64] -t 640,480 -jpip -TP R Note: Alternatively you can use kakadu : % kdu_compress -i copenhague1.tif -o copenhague1.j2k Corder=RPCL ORGtparts=R Stiles={256,256}(Optional) Embed metadata into JP2 file% ./addXMLinJP2 copenhague1.jp2 copenhague1.xml Input metadata file "copenhague1.xml" looks like: <xmlbox>
<roi name="island" x="1890" y="1950" w="770" h="310"/>
<roi name="ship" x="750" y="330" w="100" h="60"/>
<roi name="airport" x="650" y="1800" w="650" h="800"/>
<roi name="harbor" x="4200" y="1650" w="130" h="130"/>
<irt refimg="name1.jp2" m1="0.50" m2="-0.50" m3="0" m4="0.80" m5="-0.80" m6="0" m7="500" m8="1000" m9="0"/>
</xmlbox>Roadmap: JPIP todo's
Alternative implementations | |