Table of Contents

NAME

QccWAVWaveletShapeAdaptiveDWT1DInt, QccWAVWaveletInverseShapeAdaptiveDWT1DInt - integer-valued shape-adaptive discrete wavelet transform and inverse transform for a 1D signal

SYNOPSIS

#include "libQccPack.h"

int QccWAVWaveletShapeAdaptiveDWT1DInt(QccVectorInt signal, QccVectorInt mask, int signal_length, int num_scales, const QccWAVWavelet *wavelet);
int QccWAVWaveletInverseShapeAdaptiveDWT1DInt(QccVectorInt signal, QccVectorInt mask, int signal_length, int num_scales, const QccWAVWavelet *wavelet);

DESCRIPTION

QccWAVWaveletShapeAdaptiveDWT1DInt() performs an integer-valued shape-adaptive discrete wavelet transform (SA-DWT) of a one-dimensional signal. num_scales gives the number of scales, or levels, of the decomposition. QccWAVWaveletShapeAdaptiveDWT1DInt() implements a dyadic decomposition of signal; that is, the lowpass subband is recursively decomposed into lowpass and highpass bands for each level of decomposition. The output of the SA-DWT is returned in signal, overwriting the original input signal. The output subbands reside in signal starting with the lowpass subband of the lowest (coarsest) level of decomposition (i.e., the baseband) with subsequent highpass subbands of increasing resolution following. wavelet must indicate an integer-valued lifting scheme (see QccWAVLiftingSchemeInteger(3) ).

mask indicates where the original input signal exists. That is, mask indicates the intervals of support in the original input signal. Where mask is less than or equal to QCCALPHA_TRANSPARENT, there is no signal, and where mask is greater than QCCALPHA_TRANSPARENT, the signal exists and is transformed (see QccAlpha(3) ). Essentially this shape-adaptive transform is performed by identifying contiguous non-transparent segments of the input signal, and transforming these segments individually with a usual 1D DWT (via a call to QccWAVWaveletDWT1DInt(3) ) with appropriate extension at the ends of each segment. Each segment is transformed so that the global subsampling scheme for the signal is respected; that is, the starting index for each segment is determined to be either odd or even based upon its location relative to the start of signal, and this determines whether odd or even subsampling is used in the DWT of the segment.

The transparency mask is transformed (with a Lazy wavelet transform) alongside the signal so that, at completion of the transform, mask indicates where valid coefficients, i.e., coefficients resulting from non-transparent segments in the input signal, reside in the output signal. The transformed mask is returned in mask, overwriting the original input mask.

Currently, QccWAVWaveletShapeAdaptiveDWT1DInt() supports only integer-valued biorthogonal wavelets. These may be used with symmetric extension only.

Segments within signal may be of any length, odd or even. In the case of odd segment length, either the lowpass or highpass subband at the next coarser scale will be one sample longer than the other; which one is longer depends on whether the segment starts with an even- or odd-indexed sample relative to the start of signal. A segment of length one, i.e., an isolated signal sample, is somewhat of a degenerate case. QccWAVWaveletShapeAdaptiveDWT1DInt() handles a length-1 segment as follows. If the isolated sample is even-indexed relative to the start of signal, then the sample value is placed unchanged in the lowpass band. If the isolated sample is odd-index, it is placed unchanged in the highpass band.

QccWAVWaveletInverseShapeAdaptiveDWT1DInt() performs the inverse SA-DWT of signal which is assumed to have been produced by QccWAVWaveletShapeAdaptiveDWT1DInt(). mask should be the corresponding Lazy-wavelet transformed mask also produced by QccWAVWaveletShapeAdaptiveDWT1DInt(). num_scales gives the number of levels of decomposition that exist in signal.

SHAPE-ADAPTIVE DWTS

SA-DWTs have been recently included in Version 2 of the MPEG-4 standard, wherein they are used for texture coding of arbitrarily shaped still objects. Li and Li (see below) elaborate at length on the shape-adaptive DWT used in MPEG-4, and also consider some variants not included in the MPEG-4 standard.

The SA-DWT implemented in QccPack differs slightly from the transform specified by MPEG-4. The most significant difference is in the handling of isolated samples (i.e., segments with length one). In MPEG-4, isolated samples are always placed in the lowpass band regardless of the parity of the index of the sample. Another difference is that the QccPack SA-DWT can handle boundary-wavelet extension in addition to symmetric extension for lifting implementations of wavelets; MPEG-4 uses only symmetric extension. Finally, Li and Li describe several SA-DWT variants that are currently not implemented in QccPack, namely, SA-DWTs using orthonormal wavelets or biorthogonal wavelets with even-length symmetric filters.

INTEGER-TO-INTEGER WAVELET TRANSFORMS

Transforms generally provide perfect reconstruction in that the inverse transform will perfectly invert transform coefficients into an exact representation of the original signal. However, when implemented in floating-point arithmetic, the potential for loss arises due to the limits of finite precision in both the forward and inverse transforms. On the other hand, transforms that map integer-valued signals into integer-valued transforms coefficients can guarantee perfect reconstruction, provided an inverse transform can be found. For this reason, lifting schemes, in which inverse transforms are trivial, are favored for the implementation of integer-valued wavelet transforms. Typically, the general approach proposed by Calderbank et al. is followed wherein rounding of floating-point values to integers is performed at each prediction and update step in a lifting scheme. Integer versions of several popular biorthogonal wavelets were created in this manner by Calderbank et al., as well as by Xiong et al.

In traditional floating-point lifting, the prediction and update steps are generally followed by a single application of scaling by a constant in order to produce the usual unitary normalization. This scaling step is somewhat problematic for integer-valued lifting since the scaling constant is usually not an integer. In applications wherein unitary scaling is not required (e.g., in some applications that process each subband completely independently), the scaling step is simply dropped in order to implement an integer-valued version of the transform. Alternatively, one can append three additional lifting steps to implement the scaling; these additional lifting steps can then be rendered integer-valued via appropriate rounding (e.g., Xiong et al.) making the transforms approximately normalized. This latter approach of scaling via additional lifting steps is employed in the integer-valued lifting schemes implemented in QccPack.

RETURN VALUES

These routines return 0 on success and 1 on error.

SEE ALSO

QccWAVWaveletDWT1DInt(3) , QccWAVWaveletInverseDWT1DInt(3) , QccWAVWavelet(3) , QccPackWAV(3) , QccPack(3)

S. Li and W. Li, "Shape-Adaptive Discrete Wavelet Transforms for Arbitrarily Shaped Visual Object Coding," IEEE Transactions on Circuits and Systems for Video Coding, vol. 10, pp. 725-743, August 2000.

ISO/IEC 14496-2, "Information Technology -- Coding of audio-visual objects -- Part 2: Visual," MPEG-4 Standard, Amendment 1, July 2000.

A. R. Calderbank, I. Daubechies, W. Sweldens, B.-L. Yeo, "Lossless Image Compression Using Integer to Integer Wavelet Transforms", in Proceedings of the International Conference on Image Processing, Lausanne, Switzerland, pp. 596-599, September 1997.

Z. Xiong, X. Wu, S. Cheng, J. Hua, "Lossy-to-Lossless Compression of Medical Volumetric Data Using Three-Dimensional Integer Wavelet Transforms," IEEE Transactions on Medical Imaging, vol. 22, pp. 459-470, March 2003.

I. Daubechies and W. Sweldens, "Factoring Wavelet Transforms Into Lifting Steps," J. Fourier Anal. Appl., vol. 4, no. 3, pp. 245-267, 1998.

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



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