Next: Two-dimensional: tensor products Up: Fast wavelet transforms Previous: One-dimensional

## Two-dimensional

There are two different ways to compute the wavelet transform of two-dimensional data. We first describe an approach that results in isotropic basis functions.

Let be the mother wavelet and the scaling function, and , . The two dimensional basis is given by the collection of functions

Note that these functions have the same scale in both x- and y-variables (j is the same in both factors).

Let H1 be the low-pass filter (followed by downsampling) corresponding to , acting columnwise (independently on different columns), G1 the high-pass filter corresponding to ; H2 and G2 act row-wise. Then the output of fwt2 5 is partitioned as follows:

where the three blocks shown have size half the size of the original matrix and the upper left corner contains the same structure recursively (the upper left element of the matrix is ).

        FWT2 -- two dimensional fast wavelet transform

A = fwt2(s, h, g)

Input:
s     original matrix
h,g   filter coefficients for the scaling function and wavelet

Output:
A     resulting two dimensional multi-scale analysis



The inverse transform is:

        IFWT2 -- two dimensional inverse wavelet transform

A = ifwt2ns(w, h, g)

Input:
w     two dimensional wavelet coefficients
h,g   filter coefficients for the scaling function and wavelet

Output:
A     inverse transform of w



The function showoper displays the matrix containing the wavelet coefficients (actually any matrix) and nsgrid can be used to superimpose a grid that explains how the matrix is partitioned. The color or gray level indicates the magnitude of the corresponding element in the matrix.

Example: the transform of the matrix defined by Aij = 1/(i-j), , and Aii=0.

        [h,g] = wavecoef('coi',30);
[i,j] = meshgrid(0:63);
A = 1./(i-j);  A(1:65:64^2) = zeros(1,64);
W = fwt2(A,h,g);
showoper(W);  nsgrid


The demo wav2demo allows the user to graph the basis functions that are effectively used by this algorithm (see the next section for more information). Another demo, wavoperd, knows a few example matrices and provides choices for which wavelets and which type of basis to use. In figure 3, the left hand plot depicts the original matrix, the right hand plot is the transformed matrix. Red indicates large magnitudes, blue values close to zero (on a logarithmic scale).

The different operators correspond to the following integral operators (the matrices are simply a naive discretization of the operator):

• Conjugate function: , i.e., the matrix is .
• Hilbert transform:
• An operator like a conjugate function but with also a radial function in the kernel: , where , defined in hfun.
• Calderón commutator: , , defined in afun.
These, and other matrices, are defined in the function nsexampl.

#### Footnotes

...fwt2 5
fwt2 is restricted to input matrices of size 2n by 2n.

Next: Two-dimensional: tensor products Up: Fast wavelet transforms Previous: One-dimensional
Harri Ojanen
1998-05-02