This is where navigation should be.

FWTINIT - Wavelet Filterbank Structure Initialization

Usage

w = fwtinit(wdef);
w = fwtinit(wdef,prefix);
[w,info]=fwtinit(...)

Input parameters

wdef Wavelet filters specification.
prefix Function name prefix

Output parameters

w Structure defining the filterbank.

Description

fwtinit(wdef) produces a structure describing the analysis (field w.h) and synthesis (field w.g) filterbanks and a hop factors (field w.a) of a basic wavelet-type filterbank defined by wdef.

The analysis filterbank w.h is by default used in fwt and the synthesis filterbank w.g in ifwt.

Both w.h and w.g are cell arrays of structs defining FIR filters compatible with filterbank, ifilterbank and related functions. More preciselly, each elemement of either cell array is a struct with fields .h and .offset defining impulse response and the initial shift respectivelly.

[w,info]=fwtinit(...) additionally returns a info struct which provides some information about the wavelet filterbank:

info.istight
Wavelet filterbank forms a tight frame. In such case, w.h and w.g are identical.

The function is a wrapper for calling all the functions with the wfilt_ prefix defined in the LTFAT wavelets directory.

The possible formats of the wdef are the following:

  1. Cell array with first element being the name of the function defining the basic wavelet filters (wfilt_ prefix) and the other elements are the parameters of the function.

  2. Character string as concatenation of the name of the wavelet filters defining function (as above) and the numeric parameters delimited by ':' character. Examples:

    {'db',10} or 'db10'

    Daubechies with 10 vanishing moments. It calls wfilt_db(10) internally.

    {'spline',4,4} or 'spline4:4'

    Biorthogonal spline wavelet filters with 4 vanishing moments. Calls wfilt_spline(4,4) internally.

    {'dden',1} or 'dden1'

    Double density wavelet filters. Calls wfilt_dden(1) where the filters are stored as numerical vectors.

  3. Cell array of one dimensional numerical vectors directly defining the wavelet filter impulse responses. By default, outputs of the filters are subsampled by a factor equal to the number of the filters. Pass additional key-value pair 'a',a (still inside of the cell array) to define the custom subsampling factors, e.g.: {h1,h2,'a',[2,2]}.

  4. The fourth option is to pass again the structure obtained from the fwtinit function. The structure is checked whether it has a valid format.

  5. Two element cell array. First element is the string 'dual' and the second one is in format 1), 2) or 4). This returns a dual of whatever is passed as the second argument.

  6. Two element cell array. First element is the string 'strict' and the second one is in format 1), 2), 4) or 5). This in the non tight case the filters has to be defined explicitly using 'ana' and 'syn' identifiers. See below.

  7. Two element cell array. First element is a cell array of structures defining FIR filterbank (.h and .offset fields) as in filterbankwin and the second element is a numeric vector of subsampling factors.

One can interchange the filter in w.h and w.g and use the filterbank indended for synthesis in fwt and vice versa by re-using the items 1) and 2) in the following way:

  1. Add 'ana' or 'syn' as the first element in the cell array e.g. {'ana','spline',4,4} or {'syn','spline',4,4}.
  2. Add 'ana:' or 'syn:' to the beginning of the string e.g. 'ana:spline4:4' or 'syn:spline4:4'.

This only makes difference if the filterbanks are biorthogonal (e.g. wfilt_spline) or a general frame (e.g. 'symds2'), in other cases, the analysis and synthesis filters are identical.

Please note that using e.g. c=fwt(f,'ana:spline4:4',J) and fhat=ifwt(c,'ana:spline4:4',J,size(f,1)) will not give a perfect reconstruction.

The output structure has the following additional field:

w.origArgs
Original parameters in format 1).

References:

S. Mallat. A Wavelet Tour of Signal Processing, Third Edition: The Sparse Way. Academic Press, 3rd edition, 2008.