int QccWAVklttce3DLosslessEncode(const QccIMGImageCube *image, QccBitBuffer *buffer, int num_levels, double alpha, const QccWAVWavelet *wavelet);
int QccWAVklttce3DLosslessDecodeHeader(QccBitBuffer *buffer, int *num_levels, int *num_frames, int *num_rows, int *num_cols, int *max_coefficient_bits, double *alpha);
int QccWAVklttce3DLosslessDecode(QccBitBuffer *buffer, QccIMGImageCube *image, int num_levels, double alpha, const QccWAVWavelet *wavelet, int max_coefficient_bits, int target_bit_bit);
QccWAVklttce3DLosslessEncode() encodes an image cube, image, using a 3D generalization of the TCE algorithm that involves a KLT transform in one dimension and a dyadic DWT in the other two. Both transforms are applied in a lossless, or reversible, fashion such that integers are mapped to integers. Consequently, lossless coding is achieved. See "ALGORITHM" below for more detail.
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) .
QccWAVklttce3DLosslessEncode() first applies a reversible KLT (RKLT) in the spectral or temporal dimension of the image cube; subsequently, a reversible dyadic DWT is applied spatially. num_levels give the number of levels of wavelet decomposition to perform. wavelet is the wavelet to use for decomposition.
QccWAVklttce3DLosslessEncode() uses QccHYPrkltTrain(3) , QccHYPrkltFactorization(3) , and QccHYPrkltTransform(3) to train, factor, and apply, respectively, the spectral RKLT. Then, QccWAVSubbandPyramid3DIntDWT(3) with zero temporal decomposition levels is used to apply the integer-valued spatial DWT to each frame of the image cube. QccWAVklttce3DLosslessEncode() embeds the RKLT transform matrix into the output bitstream as overhead information.
The KLT+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 KLT+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.
QccWAVklttce3DLosslessDecodeHeader() decodes the header information in a bitstream previously produced by QccWAVklttce3DLosslessEncode(). 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 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), 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).
QccWAVklttce3DLosslessDecode() decodes the bitstream buffer, producing the reconstructed image cube, image. The bitstream must already have had its header read by a prior call to QccWAVklttce3DLosslessDecodeHeader() (i.e., you call QccWAVklttce3DLosslessDecodeHeader() first and then QccWAVklttce3DLosslessDecode()). 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.
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.