ImageGear for C and C++ on Windows v19.3 - Updated
JPEG 2000 Compression
User Guide > File Formats and Compressions > Compressions > JPEG 2000 Compression

JPEG 2000 Compression

Full Name JPEG 2000 wavelet compression
Compression ID IG_COMPRESSION_JPEG2K = 25
ImageGear Component JPEG 2000
Bit Depth 1..16 bpc, various color spaces (depends on file format)
File Formats JPEG 2000, JPXDICOM, Adobe PDF, Adobe PS
ImageGear Platforms Support WIN32, WIN64, .NET, .NET64

Comments:

This compression requires the ImageGear JPEG 2000 Component to be attached. See Advanced Image Formats > JPEG 2000.

The JPEG 2000 compression technique is based on two main processes: Tiling and Discrete Wavelet Transform (DWT).

Tiling

The term 'tiling' refers to the partition of the original (source) image into rectangular non-overlapping blocks (tiles), which are compressed independently as though they were entirely distinct images. All operations, including component mixing, wavelet transform, quantization and entropy coding are performed independently on the image tiles. Tiling reduces memory requirements, and since they are also reconstructed independently, they can be used for decoding specific parts of the image rather than the entire image.

All tiles have exactly the same dimensions, except for those at the right and lower boundary of the image. Arbitrary tile sizes are allowed, up to and including the entire image (i.e., the whole image is regarded as one tile). Components with different sub-sampling factors are tiled with respect to a high-resolution grid, which ensures spatial consistency on the resulting tile components. Smaller tiles create more tiling artifacts compared to larger tiles.

Discrete Wavelet Transform (DWT)

The Discrete Wavelet Transform (DWT) is very similar to the Discrete Fourier Transform (DFT), but does not use the sine and cosine functions for analyzing the image data. The basic functions are called scaling functions and wavelets. These functions combine the fundamental feature of orthogonality (allowing the transformation and the identical reconstruction) and compact representation. This allows the analysis of image data without the windowing effects, which result from the need to handle the infinite sine function on finite image data using the DFT.

Images can be seen as two dimensional signals. They can be transformed using a two dimensional transformation. Two dimensional transformations can be achieved by separately applying one dimensional transformations to the lines and columns of an image. The DWT method splits the image into four new images in the wavelet domain; one image contains the low-pass information and the others contain high-pass information of horizontal, vertical and diagonal orientation. The transformation then applies itself recursively to the low-pass image. This can be continued until the last low-pass image contains only a single pixel.

The tile components of JPEG 2000 images are decomposed into different decomposition levels using Discrete Wavelet Transform. These decomposition levels contain a number of subbands, which consist of coefficients that describe the horizontal and vertical spatial frequency characteristics of the original tile component. Power of two decompositions are allowed in the form of dyadic decomposition (in Part I).

To perform the forward DWT, the standard uses a one dimensional subband decomposition of a one dimensional set of samples into low-pass samples and high-pass samples. Low-pass samples represent a downsampled low-resolution version of the original set. High-pass samples represent a downsampled residual version of the original set, needed for the perfect reconstruction of the original set from the low-pass set.

The DWT can be irreversible or reversible. The default irreversible transform is implemented by means of theDaubechies9-tap/7-tap filter. The default reversible transformation is implemented by means of the 5-tap/3-tap filter.

The standard supports two filtering modes: a convolution-based mode and a lifting-based mode. For both modes to be implemented, the signal should first be extended periodically. This periodic symmetric extension is used to ensure that for the filtering operations that take place at both boundaries of the signal, one signal sample exists and spatially corresponds to each coefficient of the filter mask. The number of additional samples required at the boundaries of the signal is, therefore, filter-length dependent.

Convolution-based filtering performs a series of dot products between the two filter masks and the extended one dimensional signal. Lifting-based filtering consists of a sequence of very simple filtering operations for which alternately odd sample values of the signal are updated with a weighted sum of even sample values. Even sample values are updated with a weighted sum of odd sample values. For the reverse (lossless) case, the results are rounded to integer values.

The 5/3 filter allows repetitive encoding and decoding of an image without any additional loss. This is true when the decompressed image values are not clipped when they fall outside the full dynamic range (i.e. 0-255 for an 8-bpp image).