Table of Contents

NAME

QccWAVtce3DLosslessEncode, QccWAVtce3DLosslessDecode - encode/decode an image cube using the lossless 3D-TCE algorithm

SYNOPSIS

#include "libQccPack.h"

int QccWAVtce3DLosslessEncode(const QccIMGImageCube *image, QccBitBuffer *buffer, int transform_type, int temporal_num_levels, int spatial_num_levels, double alpha, const QccWAVWavelet *wavelet);

int QccWAVtce3DLosslessDecodeHeader(QccBitBuffer *buffer, int *transform_type, int *temporal_num_levels, int *spatial_num_levels, int *num_frames, int *num_rows, int *num_cols, int *image_mean, int *max_coefficient_bits, double *alpha);

int QccWAVtce3DLosslessDecode(QccBitBuffer *buffer, QccIMGImageCube *image, int transform_type, int temporal_num_levels, int spatial_num_levels, double alpha, const QccWAVWavelet *wavelet, int image_mean, int max_coefficient_bits, int target_bit_bit);

DESCRIPTION

Encoding

QccWAVtce3DLosslessEncode() encodes an image cube, image, using a 3D generalization of the TCE algorithm. The original TCE algorithm was developed for lossy coding of 2D images by Tian and Hemami; it was latter extended to 3D and made lossless via the incorporation reversible transforms by Zhang et al.

image is the image cube to be coded and buffer is the output bitstream. buffer must be of QCCBITBUFFER_OUTPUT type and opened via a prior call to QccBitBufferStart(3) .

QccWAVtce3DLosslessEncode() supports the use of both wavelet-packet and dyadic wavelet-transform decompositions. If transform_type is QCCWAVSUBBANDPYRAMID3D_DYADIC, a dyadic DWT is used; if transform_type is QCCWAVSUBBANDPYRAMID3D_PACKET, a wavelet-packet DWT is used. temporal_num_levels and spatial_num_levels give the number of levels of wavelet decomposition to perform for both transform types; for a dyadic transform, temporal_num_levels should equal spatial_num_levels. wavelet is the integer-to-integer wavelet to use for decomposition.

The 3D-TCE algorithm performance is in part through the parameter alpha, a value that gives the learning rate of the density-estimation process implemented by the tarp filter used in one of the coding passes of the TCE algorithm.

The bitstream output from the 3D-TCE encoder is embedded, meaning that any prefix of the bitstream can be decoded to give a valid, albeit lossy, representation of the image.

Decoding

QccWAVtce3DLosslessDecodeHeader() decodes the header information in a bitstream previously produced by QccWAVtce3DLosslessEncode(). The input bitstream is buffer which must be of QCCBITBUFFER_INPUT type and opened via a prior call to QccBitBufferStart(3) .

The header information is returned in transform_type (either QCCWAVSUBBANDPYRAMID3D_DYADIC or QCCWAVSUBBANDPYRAMID3D_PACKET to indicate a dyadic or wavelet-packet transform decomposition, respectively), temporal_num_levels (number of levels of wavelet decomposition in the temporal direction), spatial_num_levels (number of levels of wavelet decomposition in the spatial directions), num_frames (size of the image cube in the temporal direction), num_rows (vertical size of image cube), num_cols (horizontal size of image cube), image_mean (the mean value of the original image cube), max_coefficient_bits (indicates the precision, in number of bits, of the wavelet coefficient with the largest magnitude), and alpha (the value of the learning rate).

QccWAVtce3DLosslessDecode() decodes the bitstream buffer, producing the reconstructed image cube, image. The bitstream must already have had its header read by a prior call to QccWAVtce3DLosslessDecodeHeader() (i.e., you call QccWAVtce3DLosslessDecodeHeader() first and then QccWAVtce3DLosslessDecode()). If target_bit_cnt is QCCENT_ANYNUMBITS, then decoding stops when the end of the input bitstream is reached; i.e., image will be a lossless reconstruction of the original image. Otherwise, decoding stops when target_num_bits from the input bitstream have been decoded which will produce a lossy representation that differs from the originally encoded image.

SEE ALSO

tceencode3d_lossless(1) , tcedecode3d_lossless(1) , QccBitBuffer(3) , QccWAVSubbandPyramid3DInt(3) , QccWAVSubbandPyramid3DIntDWT(3) , QccWAVtce3DEncode(3) , QccPackWAV(3) , QccPackIMG(3) , QccPack(3)

J. Zhang, J. E. Fowler, and G. Liu, "Lossy-to-Lossless Compression of Hyperspectral Imagery Using 3D-TCE and an Integer KLT," IEEE Geoscience and Remote Sensing Letters, vol. 5, pp. 814-818, October 2008.

C. Tian and S. S. Hemami, "An Embedded Image Coding System Based on Tarp Filter with Classification," in Proceedings of the International Conference on Acoustics, Speech, and Signal Processing, Montreal, Quebec, Canada, May 2004, vol. 3, pp. 49-52.

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



Get QccPack at SourceForge.net. Fast, secure and Free Open Source software downloads