OpenHTJ2K is an open source implementation of ITU-T Rec.814 | ISO/IEC 15444-15 (a.k.a. JPEG 2000 Part 15, High-Throughput JPEG 2000; HTJ2K)
OpenHTJ2K provides a shared liberary and sample applications having the following functionalities:
cmake (version 3.14 or later) and C++11 compliant compiler.
Type the following command. ./
is a root of cloned repository and ${BUILD_DIR}
is a build directory (for example, ../build
or ./build
and so on)
-DCMAKE_BUILD_TYPE=Debug
or -DCMAKE_BUILD_TYPE=RelWithDebInfo
to build with debug information.-G "Xcode"
to create a project for Xcode.-G "Visual Studio 17 2022"
to create a project for Visual Studio 2022. For the older versions,
see https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#visual-studio-generatorscd ./
cmake -G "Unix Makefiles" -B ${BUILD_DIR} -DCMAKE_BUILD_TYPE=Release
cd ${BUILD_DIR}
make
Then the executables should be found in ${BUILD_DIR}/bin
directory.
Only Part 15 compliant encoding is supported. Both .j2c (codestream) and .jph (file format) are available.
./open_htj2k_enc -i inputimage(in PNM/PGX/(TIFF, libtiff required) format) -o output [options...]
The encoder can take comma-separated multiple files. For example, components in YCbCr color space can be encoded by
./open_htj2k_enc -i inputY.pgx,inputCb.pgx,inputCr.pgx -o output
Stiles=Size
Sorigin=Size
Stile_origin=Size
Clevels=Int
Creversible=yes or no
yes
for lossless mode, no
for lossy mode, Default is noCblk=Size
Cprecincts=Size
Cycc=yes or no
yes
to use RGB->YCbCr, Default is yesCorder
Cuse_sop=yes or no
Cuse_eph=yes or no
Qstep=Float
Qguard=Int
Qderived=yes or no
yes
switches the quantyzation style to derived (Default is no
)Qfactor=Int
-jph_color_space
-num_threads Int
The both Part 1 and Part 15 compliant decoding are supported.
./open_htj2k_dec -i codestream -o outputimage [-reduce n: number of DWT level reduction]
To see a help, use -h
option.