Table of Contents

NAME

QccWAVWaveletShapeAdaptiveDWT1D, QccWAVWaveletInverseShapeAdaptiveDWT1D - shape-adaptive discrete wavelet transform and inverse transform for a 1D signal

SYNOPSIS

#include "libQccPack.h"

int QccWAVWaveletShapeAdaptiveDWT1D(QccVector signal, QccVector mask, int signal_length, int num_scales, const QccWAVWavelet *wavelet);
int QccWAVWaveletInverseShapeAdaptiveDWT1D(QccVector signal, QccVector mask, int signal_length, int num_scales, const QccWAVWavelet *wavelet);

DESCRIPTION

QccWAVWaveletShapeAdaptiveDWT1D() performs a shape-adaptive discrete wavelet transform (SA-DWT) of a one-dimensional signal. num_scales gives the number of scales, or levels, of the decomposition. QccWAVWaveletShapeAdaptiveDWT1D() 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.

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 QccWAVWaveletDWT1D(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, QccWAVWaveletShapeAdaptiveDWT1D() supports only biorthogonal wavelets. These may be used with symmetric extension (lifting or filter-bank implementations) or boundary-wavelet extension (lifting implementations 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. QccWAVWaveletShapeAdaptiveDWT1D() 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 multiplied by sqrt(2) and placed in the lowpass band. If the isolated sample is odd-index, it is divided by sqrt(2) and placed in the highpass band.

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

RETURN VALUES

These routines return 0 on success and 1 on error.

NOTES

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 multiplied by sqrt(2) and 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.

SEE ALSO

QccWAVWaveletDWT1D(3) , QccWAVWaveletInverseDWT1D(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.

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



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