Table of Contents

NAME

QccWAVFilterBankAnalysis, QccWAVFilterBankSynthesis - perform analysis/synthesis of a signal using a filter bank

SYNOPSIS

#include "libQccPack.h"

int QccWAVFilterBankAnalysis(QccVector signal, int signal_length, int phase, const QccWAVFilterBank *filter_bank, int boundary_extension);
int QccWAVFilterBankSynthesis(QccVector signal, int signal_length, int phase, const QccWAVFilterBank *filter_bank, int boundary_extension);

DESCRIPTION

QccWAVFilterBankAnalysis() essentially performs one level of a wavelet decomposition. Specifically, QccFilterMultiRateFilterVector(3) is called twice, once to produce a lowpass subband of signal, and once to produce a highpass subband. That is, signal is filtered using the lowpass analysis filter of filter_bank. The filter output is subsampled by a factor of two, and stored as the first half of signal. Then, the process is repeated using the highpass analysis filter of filter_bank with the output stored as the last half of signal.

signal_length, the length of signal, may be even or odd. phase is either QCCWAVFILTERBANK_PHASE_EVEN or QCCWAVFILTERBANK_PHASE_ODD and indicates whether the first sample of signal has an even or odd index, respectively. Usually one assumes that signal starts with index 0, which is even, so phase should be specified to be QCCWAVFILTERBANK_PHASE_EVEN in this typical case. If signal_length is odd, then one of the two subbands is one sample longer than the other. Specifically, if signal_length is odd, and phase is QCCWAVFILTERBANK_PHASE_EVEN, then the lowpass subband is one sample longer than the highpass subband. If phase is QCCWAVFILTERBANK_PHASE_ODD, the the highpass subband is one sample longer than the lowpass subband. In the case that signal_length is even, then both subbands have the same length regardless of the value of phase.

QccWAVFilterBankSynthesis() performs one level of wavelet synthesis. The first half of signal is assumed to contain the lowpass subband while the second half contains the highpass subband. These are upsampled by a factor of two and then filtered with the lowpass and highpass synthesis filters, respectively, of filter_bank. The resulting signals of these two filtering operations are added to together to produce the output signal which is returned in signal. As with QccWAVFilterBankAnalysis(), signal_length must be even. QccWAVFilterBankSynthesis(). The upsampling and filter operations are performed via calls to QccFilterMultiRateFilterVector(3) .

boundary_extension can be one of the following: QCCWAVWAVELET_BOUNDARY_SYMMETRIC_EXTENSION (symmetric extension, valid only for biorthogonal filter banks), or QCCWAVWAVELET_BOUNDARY_PERIODIC_EXTENSION (periodic extension, valid for orthogonal and biorthogonal filter banks). Check the comments at the start of each FBK file for permitted values for boundary_extension for particular filter banks. Note that, if periodic extension is used, signal_length must be even (this is due to mathematical constraints).

The case in which signal_length is equal to 1 is degenerate. A wavelet transform is technically not well defined for this situation because it is not clear how to subsample the signal. However, in practice, this degenerate case can be handled in several ways with no problems. In QccPack, the length-one signal is merely multiplied by sqrt(2) and placed in the lowpass subband (in which case the highpass subband has zero length) for phase equal to QCCWAVFILTERBANK_PHASE_EVEN, or divided by sqrt(2) and placed in the highpass subband (in which case the lowpass subband has zero length) for phase equal to QCCWAVFILTERBANK_PHASE_ODD.

Note: In general, you will probably want to use QccWAVWaveletDWT1D(3) and QccWAVWaveletInverseDWT1D(3) instead of these routines for implementing a discrete wavelet transform and its inverse since QccWAVWaveletDWT1D(3) and QccWAVWaveletInverseDWT1D(3) allow any number of scales, or levels, of decomposition to be performed, and can be used with either filter-bank or lifting implementations of wavelets.

RETURN VALUES

These routines return 0 on success and 1 on error.

SEE ALSO

QccFilterMultiRateFilterVector(3) , QccWAVFilterBank(3) , QccWAVWavelet(3) , QccWAVWaveletDWT1D(3) , QccWAVWaveletInverseDWT1D(3) , QccPackWAV(3) , QccFilterRead(3) , QccFilterWrite(3) , QccFilter(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.

AUTHOR

Copyright (C) 1997-2021 James E. Fowler


Table of Contents



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