Table of Contents

NAME

QccWAVWaveletDWT2D, QccWAVWaveletInverseDWT2D - separable 2D discrete wavelet transform and inverse transform for a 2D signal

SYNOPSIS

#include "libQccPack.h"

int QccWAVWaveletDWT2D(QccMatrix matrix, int num_rows, int num_cols, int origin_row, int origin_col, int subsample_pattern_row, int subsample_pattern_col, int num_scales, const QccWAVWavelet *wavelet);
int QccWAVWaveletInverseDWT2D(QccMatrix matrix, int num_rows, int num_cols, int origin_row, int origin_col, int subsample_pattern_row, int subsample_pattern_col, int num_scales, const QccWAVWavelet *wavelet);

DESCRIPTION

QccWAVWaveletDWT2D() performs a separable 2D discrete wavelet transform (DWT) of a two-dimensional signal, matrix, which is represented as a matrix of num_rows rows and num_cols columns. origin_row and origin_col indicates the row and column indices, respectively, of the upper-left corner of the image. Usually, one assumes that the upper-left corner of the image is indexed as (0, 0) - in this case, both origin_row and origin_col would be zero. num_scales gives the number of scales, or levels, of the decomposition. QccWAVWaveletDWT2D() implements a dyadic, or octave, decomposition of matrix; that is, the low-low subband (baseband) is recursively decomposed into a lowpass and three highpass bands for each level of decomposition, each of which being one quarter the size of the baseband that was decomposed. The output of the DWT is returned in matrix, overwriting the original input matrix. The output subbands reside in matrix with the baseband in the upper-left corner, with highpass subbands successively "nested" from the upper-left corner to lower-right corner. QccWAVWaveletDWT2D() calls QccWAVWaveletAnalysis2D(3) for each level of decomposition, using the baseband subband for the current level of decomposition as input. As a result, the transform recursively decomposes the upper-left corner of the input matrix.

QccWAVWaveletInverseDWT2D() performs the corresponding separable 2D inverse DWT of matrix which is assumed to have been produced by QccWAVWaveletDWT2D(). num_scales gives the number of levels of decomposition that exist in matrix. QccWAVWaveletInverseDWT2D() calls QccWAVWaveletSynthesis2D(3) for each level of synthesis.

subsample_pattern_row and subsample_pattern_col indicate the even- or odd-phase subsampling to be used at each level of row and column decomposition. In most applications, even subsampling at all levels is desired, in which case both subsample_pattern_row and subsample_pattern_col should be set to zero. In more general settings, when some mixture of even- and odd-phase subsampling is desired, subsample_pattern_row and subsample_pattern_col can be integers between 0 and (2 ^ num_levels) - 1. In these integers, the jth bit (where j = 1 is the least-significant bit) indicates whether the jth level of decomposition employs even or odd subsampling (0 = even, 1 = odd). For example, if subsample_pattern_row is 5, then the first and third row decompositions use odd-phase subsampling, while all others use even subsampling.

Use QccWAVSubbandPyramidDWT(3) and QccWAVSubbandPyramidInverseDWT(3) to perform a 2D separable DWT or inverse DWT on a QccWAVSubbandPyramid data structure (which is the recommended way to do it, since the QccWAVSubbandPyramid structure stores the number of levels of decomposition along with the transform coefficients).

RETURN VALUES

These routines return 0 on success and 1 on error.

SEE ALSO

QccWAVWaveletAnalysis2D(3) , QccWAVWaveletSynthesis2D(3) , QccWAVSubbandPyramidDWT(3) , QccWAVSubbandPyramidInverseDWT(3) , QccWAVWavelet(3) , QccPackWAV(3) , QccPack(3)

M. Antonini, M. Barlaud, P. Mathieu, and I. Daubechies, "Image Coding Using Wavelet Transform," IEEE Transactions on Image Processing, vol. 1, pp. 205-220, April 1992.

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