Table of Contents

NAME

QccWAVWaveletRedundantDWT1D, QccWAVWaveletInverseRedundantDWT1D, QccWAVWaveletRedundantDWT1DSubsample - redundant discrete wavelet transform and inverse transform for a 1D signal

SYNOPSIS

#include "libQccPack.h"

int QccWAVWaveletRedundantDWT1D(const QccVector input_signal, QccMatrix output_signals, int signal_length, int num_scales, const QccWAVWavelet *wavelet);
int QccWAVWaveletInverseRedundantDWT1D(const QccMatrix input_signals, QccVector output_signal, int signal_length, int num_scales, const QccWAVWavelet *wavelet);
int QccWAVWaveletRedundantDWT1DSubsample(const QccMatrix input_signals, QccVector output_signal, int signal_length, int num_scales, int subsample_pattern, const QccWAVWavelet *wavelet);

DESCRIPTION

QccWAVWaveletRedundantDWT1D() performs a redundant discrete wavelet transform (RDWT) of a one-dimensional signal. num_scales gives the number of scales, or levels, of the decomposition. QccWAVWaveletRedundantDWT1D() implements a dyadic decomposition of input_signal with oversampling; that is, the lowpass subband is recursively decomposed into lowpass and highpass bands for each level of decomposition. Unlike the usual critically sampled DWT (as implemented by QccWAVWaveletDWT1D(3) ), each subband has the same length as the original input_signal.

The RDWT produces num_scales highpass subbands and one baseband subband, for a total of num_scales + 1 subbands. These subbands are returned in output_signals which is a matrix with num_scales + 1 rows and signal_length columns. The first row of output_signals contains the baseband signal; subsequent rows contain highpass bands of decreasing scale (increasing spatial resolution). Sufficient storage space for output_signals must be allocated prior to calling QccWAVWaveletRedundantDWT1D().

wavelet can be either a filter-bank or lifting-scheme implementation.

QccWAVWaveletInverseRedundantDWT1D() performs the inverse RDWT of input_signals. Sufficient space for output_signal must be allocated prior to calling QccWAVWaveletInverseRedundantDWT1D().

The RDWT produces an oversampled DWT transform; that is, an overcomplete expansion of the original signal. However, the coefficients of the usual critically sampled DWT are amongst the RDWT coefficients. More accurately, there exist 2 ^ num_scales sets of RDWT coefficients that are identical to a critically sampled, dyadic DWT. Each one of these 2 ^ num_scales DWTs differs from the others in the subsampling phase choice (even or odd) at each level of the transform. QccWAVWaveletRedundantDWT1DSubsample() subsamples the coefficients output from QccWAVWaveletRedundantDWT1D() to obtain the coefficients for a critically sampled DWT. subsample_pattern, a value from 0 to (2 ^ num_scales) - 1, indicates which of the 2 ^ num_scales DWT-coefficient sets to choose. num_scales gives the number of levels of decomposition that exist in input_signals, which is assumed to be a matrix of num_scales + 1 rows and signal_length columns produced by QccWAVWaveletRedundantDWT1D(). Sufficient space for output_signal must be allocated prior to calling QccWAVWaveletRedundantDWT1DSubsample(). Calling QccWAVWaveletRedundantDWT1DSubsample() with subsample_pattern = 0 will produce the same coefficients as would have been produced by QccWAVWaveletDWT1D().

QccWAVWaveletInverseRedundantDWT1D() is the "proper" procedure for inverting the RDWT. That is, QccWAVWaveletInverseRedundantDWT1D() performs inverse filtering as well as weighted "averaging" of the transform redundancies to properly reconstruct the original signal from the RDWT coefficients. A "quick and dirty" reconstruction is possible, however, by subsampling and then inverting using the critically sampled inverse DWT, i.e., by calling QccWAVWaveletRedundantDWT1DSubsample() and then QccWAVWaveletInverseDWT1D(). Both these approaches to inverting the RDWT will produce the same results on unaltered RDWT coefficients; however, should the RDWT coefficients be processed in some fashion, say, through quantization, then QccWAVWaveletInverseRedundantDWT1D() should be used to invert the transform. Additionally, this subsampling approach to inverting the RDWT works only for subsample_pattern = 0, which is the only subsampling pattern whose phase choices match those assumed by QccWAVWaveletInverseDWT1D().

NOTES

The notion of an RDWT apparently dates back to the work of Holschneider et al. and Dutilleux who devised a redundant transform implemented via the so-called algorithme a trous. This filter-bank algorithm is similar to the usual Mallat algorithm for the critically sampled DWT in that it implements the wavelet transform with filter banks. The key difference between the two approaches is that the subsampling at the end of every scale of the transform as used in the Mallat algorithm is not performed in the algorithm a trous, and the filters, which are the same at every scale in the Mallat algorithm, change for every scale. Specifically, the algorithm a trous calls for the insertion of "holes" ("trous" in French) between each filter tap; that is, the filters used in each scale of the algorithm a trous decomposition are the filters of the previous scale upsampled by a factor of 2.

Shensa points out that the Mallat and a trous implementations are very closely related; in fact, it is possible to obtain the coefficients for the Mallat algorithm by subsampling, or decimating, the coefficients resulting from the algorithm a trous, except possibly at the signal boundaries when symmetric extension is used. This observation leads to an "alternative" implementation of the algorithm a trous, and it is this implementation that is used here in QccWAVWaveletRedundantDWT1D(). This alternative implementation of the algorithm a trous eliminates the above-mentioned symmetric-boundary inconsistencies; in addition, the alternative implementation permits the direct use of lifting instead of filter banks for improved computation efficiency.

RETURN VALUES

These routines return 0 on success and 1 on error.

SEE ALSO

QccWAVWaveletDWT1D(3) , QccWAVWaveletInverseDWT1D(3) , QccPackWAV(3) , QccPack(3)

M. Holschneider, R. Kronland-Martinet, J. Morlet, and P. Tchamitchian, "A Real-Time Algorithm for Signal Analysis with the Help of the Wavelet Transform," in Wavelets: Time-Frequency Methods and Phase Space, Berlin: Springer-Verlag, pp. 286-297, 1989.

P. Dutilleux, "An Implementation of the Algorithm A Trous to Compute the Wavelet Transform," in Wavelets: Time-Frequency Methods and Phase Space, Berlin: Springer-Verlag, pp. 298-304, 1989.

M. J. Shensa, "The Discrete Wavelet Transform: Wedding the A Trous and Mallat Algorithms," IEEE Trans. Signal Processing, vol. 40, no. 10, pp. 2464-2482, Oct. 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