jj2000_4.1(Java binaries )

所属分类:图形图象
开发工具:Java
文件大小:470KB
下载次数:25
上传日期:2005-09-17 00:01:22
上 传 者管理员
说明:  JPEG2000国际压缩标准的java版测试参照平台,包含好多独立的库。
(java evaluation platform of JPEG2000 international compression criterion .many indepent libraries are included.)

文件列表:
jj2000-4.1\COPYRIGHT (1802, 2000-09-05)
jj2000-4.1\distrib-jars\jj2000-aplt-4.1.jar (206162, 2001-03-02)
jj2000-4.1\jj2000-4.1.jar (654770, 2001-03-02)

Note to Windows users: use Wordpad or Word (or other not-so-dumb text reader) to read this file. Notepad does not understand UNIX line returns and will show all the file in 1 line. =============================================================================== JJ2000 An Implementation of the JPEG 2000 Standard in Java(TM) Version 4.1 =============================================================================== Outline: ======= 1. General notes 2. JJ2000 Implementation status 3. Obtaining the code, documentation, etc. 4. Installing the JJ2000 byte code 5. Obtaining a Java(TM) Virtual Machine 6. Running the JJ2000 bytecode (i.e. compiled code) 7. Running the JJ2000 encoder and decoder 8. Installing and using the JJ2000 source code 9. Installing the pre-compiled JJ2000 documentation 10. JJ2000 embedded image viewer 11. Running JJ2000 decoder as an applet 12. Enabling multiprocessor features on SMP machines 13. Troubleshooting 14. Change history =============================================================================== 1. General notes ================ This document describes the installation and the utilization of the JJ2000 decoder and encoder under several operating systems (Linux, Unix, Windows, ...). The implementation is purely in Java(TM), so it can run on any platform with a Java Virtual Machine for Java 1.1 and later. The encoder and the decoder are compatible with FDIS text. If you find some bugs or if you have problems using the encoder/decoder, please send an e-mail to jj2000-bugs@ltssg3.epfl.ch 2. JJ2000 implementation status =============================== Version 4.1 contains a complete JPEG 2000 decoder as well as an encoder. The functionalities supported by this codec are compliant with the JPEG 2000 part 1 algorithm as it is described in the Final Draft International Standard. As for the previous versions, this software has been extensively tested and multiple codestreams exchanges have been done with the Verification Model software (VM8.6) and some other known implementations of JPEG~2000 part 1. In addition to JPEG 2000 features, the JJ2000 codec contains an embedded viewer for decoded images (See 10, "JJ2000 Embedded image viewer"), a simple applet for the JJ2000 decoder (See 11, "Running JJ2000 decoder as an applet") and special features that can speed-up the execution by exploiting the multiple CPUs of multiprocessor machines (See 12, "Enabling multiprocessor features on SMP machines"). Finally, JJ2000 would like to acknowledge JJ2000 users for their valid feed-back that allowed improving the code and fixing bugs. 2a. JJ2000 backward compatibility. ---------------------------------- JJ2000 encourages all its users to download and use the version 4.1 that is the only JJ2000 version compatible with current description of the standard (FDIS). See below to have a list of incompatibilities with older versions. * with version 4.0: ------------------- Because of some modifications in the writing of packet headers, the latest version is not compatible with version 4.0 when using the arithmetic selective bypass mode ('-Cbypass' option) or when terminating the arithmetic coding at the end of each coding pass ('-Creg_term' option). * with version 3.2.2 and previous: ---------------------------------- Due to some revisions in the First Draft International Standard (FDIS) and some corrections in JJ2000 source code, version 4.1 is not compatible with releases 3.2.2 and previous concerning the following points: - Filtering with 9x7 filter pair. The FDIS imposes now another convention for high pass coefficients signs. - Reversible Component Transform: the 2 last components have been swapped to conform the description given in FDIS. 2b. Known issues. ----------------- JJ2000 version 4.1 do not write any packet whenever the formula computing the number of precincts in each component and resolution levels gives zero. However, this may contradict the following statement of Annex B.6 in the Final Draft International Standard (FDIS) of JPEG 2000 part 1: 'It can happen that a precinct is empty, meaning that no subband coefficients from the relevant resolution level actually contribute to the precinct. This can occur, for example, at the lower right of a tile-component due to sampling with respect to the reference grid. When this happens every packet corresponding to that precinct must still appear in the codestream (see Annex B.9).' This issue will be fixed as soon as a clarification, about whether or not this situation is applicable to the case where no precinct exists, is obtained. 3. Obtaining the code, documentation, etc. ========================================== The compiled Java(TM) byte code, the source code and the documentation can be downloaded by all WG1 members from the JJ2000 web site at: http://jj2000.epfl.ch or http://jpeg2000.epfl.ch The download of the software is protected by a password that can obtained by filling a form at http://jj2000.epfl.ch/jj_download. This web site contains also information, tutorial and useful links related to JPEG 2000. First the explanations on how to download, install and run the byte code are given. Instructions on how to obtain and use the source code are given towards the end of this document. 4. Installing the JJ2000 byte code (i.e. compiled code) ====================================================== - Download the latest compressed archive (jj2000_4.1.zip or jj2000_4.1.tar.gz) from the JJ2000 web site (http://jj2000.epfl.ch) - Create the directory where you want to install the JJ2000 Codec. - Decompress the archive in this directory. This will create a 'jj2000-4.1' directory with the necessary files in it. * on Unix, Linux: unzip jj2000_4.1.zip or gunzip -c jj2000_4.1.tar.gz | tar xvf - * with Windows: use WinZip with jj2000_4.1.zip Note: If you use the tar.gz archive with WinZip make sure that the automatic CR-LF conversion is turned off, since this will ruin the files in the archive. - After this you should find the following files in the 'jj2000-4.1' directory: * jj2000-4.1.jar - This file contains all the Java compiled code * README - The file you are reading * COPYRIGHT - Copyright statement of the JJ2000 software Note: - Do not "unjar" the jar file containing the byte code. The Java(TM) virtual machine can execute byte code contained in this kind of archive (JAR stands for Java ARchive). - Since that Java(TM) byte-code can be used on any machine, you do not need to recompile the software. - The byte code archive does not contain the optional shared library necessary to access some special JJ2000 funcionality under some operating systems. This library is not necessary to run the JJ2000 software, unless those very special features are wanted. The source code for the library is contained in the source distribution. See section 10 for details on these special features and how to compile the shared library. 5. Obtaining a Java(TM) Virtual Machine (if you don't have one) =============================================================== In order to execute Java(TM) software a Java(TM) Virtual Machine (JVM) is needed. If you already have one installed you can skip this point. Many Windows machines come equipped with a Microsoft JVM already, which is version 1.1.x or later. Try, in an MS-DOS window, the command 'jview'. If a help message is displayed then a JVM is already installed on your machine, you don't need to install a new one and you can skip the rest of this point, unless you want to try with other JVMs. For other architectures ask your system administrator. If you don't have a JVM version 1.1.x or later installed, you can download one from JavaSoft (for Solaris and Windows: http://www.javasoft.com), Apple (for MacOS: http://www.apple.com/java), or Microsoft (for Windows95/***/NT: http://www.microsoft.com/java), Blackdown (for Linux: http://www.blackdown.org), IBM (http://www-105.ibm.com/developerworks/tools.nsf/dw/java-devkits-byname?OpenDocument&Count=100), among other sites. For other platforms a list of available ports is available at JavaSoft's web site (http://java.sun.com/cgi-bin/java-ports.cgi). 6. Running the JJ2000 bytecode (i.e. compiled code) ==================================================== How to execute the byte code depends on the Java(TM) Virtual Machine (JVM) you use. The only necessary thing is to set what is called the CLASSPATH, that indicates where to find the byte code. Below is explained how to set the CLASSPATH for the most popular JVMs, for other JVMs please refer to your JVMs documentation. 6a. Sun's Java Development Kit (JDK) ------------------------------------ If you are using Sun's JDK (the command is 'java'), or an equivalent JVM you have to set the environment variable CLASSPATH in the following way: - Windows 95/***/NT (in an MS-DOS window): set CLASSPATH=/jj2000-4.1.jar;%CLASSPATH% - UNIX with Bourne Shell (i.e. sh): CLASSPATH=/jj2000-4.1.jar:$CLASSPATH export CLASSPATH - UNIX with C-shell (i.e. csh or tcsh): setenv CLASSPATH /jj2000-4.1.jar:$CLASSPATH (or setenv CLASSPATH /jj2000-4.1.jar if CLASSPATH has not been already defined) where is the full path of the directory where the 'jj2000-4.1.jar' file is found. For instance, under Windows, if is 'C:\JJ2000\JJ2000-4.1\': set CLASSPATH=C:\JJ2000\JJ2000-4.1\jj2000-4.1.jar;%CLASSPATH% In order to make this setting permanent you can add the line above at the end of your C:\AUTOEXEC.BAT file in Windows, or your ~/.profile or ~/.cshrc file in UNIX with the sh or csh shells, respectively. If you are using Windows NT, it is preferable to make the following environment variable changes in the Control Panel, instead of in the C:\AUTOEXEC.BAT file. Start the Control Panel, select System, then edit the environment variable CLASSPATH. The in order to run the encoder or decoder you can type, respectively: java JJ2KEncoder java JJ2KDecoder More instructions on how to use the encoder and decoder can be found below. 6b. Sun's Java Runtime Environment (JRE) ---------------------------------------- If you are using Sun's JRE (the command is 'jre'), or an equivalent JVM, you have to use the following command-lines (setting the CLASSPATH variable seems to have no effect): - Windows 95/***/NT: jre -cp \jj2000-4.1.jar JJ2KEncoder jre -cp \jj2000-4.1.jar JJ2KDecoder - UNIX: jre -cp /jj2000-4.1.jar JJ2KEncoder jre -cp /jj2000-4.1.jar JJ2KDecoder where, as above, is the full path of the directory where the file jj2000-4.1.jar is found. More instructions on how to use the encoder and decoder can be found below. 6c. Microsoft's JVM ------------------- If you are using Microsoft's JVM, you can either set the CLASSPATH environment variable as explained for Sun's JDK above, or use the following command-lines: - Windows 95/***/NT: jview /cp:p \jj2000-4.1.jar JJ2KEncoder jview /cp:p \jj2000-4.1.jar JJ2KDecoder where, as above, is the full path of the directory where the file jj2000-4.1.jar is found. More instructions on how to use the encoder and decoder can be found below. 7. Running the JJ2000 encoder and decoder ========================================= The JJ2000 encoder and decoder are very easy to run, and they follow a syntax which is similar to the one from the JPEG 2000 VM. The exact command line to type depends on the JVM you are running, for the different possibilities please refer to "Running the JJ2000 byte code" above. Here we provide examples for Sun's JDK, but it should be straightforward to derive the command-line for the other JVMs. The speed of the encoder or decoder will strongly depend in the type of JVM you are using. JVMs which have Just-In-Time compilation (JIT) are much faster than simple interpreters. Most popular JVMs include JIT, so don't disable it. To run the encoder you have to type: java JJ2KEncoder and for the decoder: java JJ2KDecoder where is the arguments given to the encoder or decoder. The '-u' argument prints a detailed usage message to the terminal. The name and syntax of the arguments are similar to those of the VM. The minor differences are due to the implementation architecture which is quite different. The '-i' option denotes the input file, while the '-o' option denotes the output file. The '-v' message prints the version and copyright of JJ2000. For instance, to code the well-known lena image to 2.0 bpp with the other default options, type: java JJ2KEncoder -i lena.pgm -o lena.j2k -rate 2 Then to decode it at 1 bpp, type: java JJ2KDecoder -i lena.j2k -o lena-jj.pgm -rate 1 Supported image file formats are: PGM(raw), PGX and PPM(raw). Color image can be used either by using a PPM(raw) file or by using the Red, Green and Blue components PGM or PGX files. If you receive an "OutOfMemoryError" from the JVM you need to increase the maximum memory limit of the JVM. See "Troubleshooting" at the end of this document to do that. A decent general purpose image viewer for Windows can be found at "http://www.irfanview.com". Among other image viewers that understand the PPM and PGM format there is PaintShopPro (http://www.paintshoppro.com/). For UNIX/X11, the most popular image viewers understand PGM and PPM, as 'xv', 'ImageMagic', etc. Ask your system administrator if you do not know if one of those is installed. 8. Installing and using the JJ2000 source code ============================================== 8a. Installing the source code ------------------------------ - Download the compressed archive (jj2000_4.1-src.zip or jj2000_4.1-src.tar.gz) from the JJ2000 web site (http://jj2000.epfl.ch) - Create the directory where you want to install the JJ2000 Codec. - Decompress the archive in this directory. This will create a 'jj2000-4.1' directory with the necessary files in it. * on Unix, Linux: unzip jj2000_4.1.zip or gunzip -c jj2000_4.1.tar.gz | tar xvf - * with Windows: use WinZip with jj2000_4.1.zip Note: If you use the tar.gz archive with WinZip make sure that the automatic CR-LF conversion is turned off, since this will ruin the files in the archive. - After this you should find the following files and directories in the 'jj2000-4.1' directory: * src/ - This directory contains all the Java source code * JNI-src/ - C source of methods using the Java Native Interface. This is optional. * README - The file you are reading * COPYRIGHT - The copyright statement of the JJ2000 software Note that this source code package does not contain the compiled byte code or the compiled documentation, but that both can be generated from the source code, or downloaded separately. 8b. Setting the CLASSPATH ------------------------- In order to compile and run the compiled source code you need first to set the CLASSPATH. With Sun's Java Development Kit (JDK) and most java compilers this is done by setting the CLASSPATH environment variable. Consult your compiler's documentation in case of trouble. In the case of a Java Integrated Development Environment (IDE) the procedure can be significantly different. - Windows 95/***/NT (in an MS-DOS window): set CLASSPATH=/src;%CLASSPATH% - UNIX with Bourne Shell (i.e. sh): CLASSPATH=/src:$CLASSPATH export CLASSPATH - UNIX with C-shell (i.e. csh or tcsh): setenv CLASSPATH /src:$CLASSPATH (or setenv CLASSPATH /src if CLASSPATH has not been already defined) where is the full path of the directory in which the 'src' directory is found. 8c. Compiling the source code ----------------------------- There are basically 2 ways to compile the Java(TM) source code: using the make or using the java compiler on the main class file. Note that the compilation of the optional C source using the Java Native Interface requires additional step. See section 10d on how to do that. The C source files are optional and are not required to run JJ2000. They are only required to access some special operating system features. See section 10 for more details. - Using the make file The makefiles included with JJ2000 use GNU make. Therefore it is necessary to have GNU make installed in order to run them. These makefiles reconfigure automatically, so if new files are added to the project no modifications are necessary to the makefiles (not so for directory additions). These makefiles probably won't run under any other make program. Under many systems the GNU make program is called 'gmake'. The makefile uses the 'javac' command line to call the compiler. If this is different in your system edit the 'GNUmakefile.var' file in the 'src' directory to match your compiler's command line. In order to use the makefiles move to the 'src' directory and type "make help" to see the list of available targets to compile. In order to compile all the source code tree, type: make all This will compile all the files in each Java package, regardless if they have been changed or not. To compile just out of date files, type: make For the other targets see "make help". - Using the compiler with the main class file If you don't have GNU make installed, you can always use the java compiler to compile all the source code in one call to it. To compile the encoder type, in the 'src' directory: javac -depend JJ2KDecoder.java To compile the decoder type, in the 'src' directory: javac -depend JJ2KDecoder.java The "-depend" option forces the compilation of all necessary files. 8d. Running the compiled code ----------------------------- To run the compiled code follow the instructions under "Running the JJ2000 byte code" above by replacing /jj2000.jar by /src, and under "Running the JJ2000 encoder and decoder" above. 8e. Compiling the documentation ------------------------------- The already compiled documentation can be downloaded from the JJ2000 web site (see below). However it can also be compiled directly from the code source. To compile the documentation type, in the 'src' directory: make doc This will generate the HTML documentation of all the source code. The documentati ... ...

近期下载者

相关文件


收藏者