Let
be the one-dimensional wavelet
basis as in the previous section. The tensor product basis is given by
the collection of functions
The tensor-product transform amounts to simply first computing one-dimensional wavelet transforms of each row of the input matrix, collecting the resulting coefficients into a new matrix, and finally computing the one-dimensional transform of each column of this matrix.
Partitions (compare with
fwt1)
for an 8 by 8 matrix:
These operations are implemented by fwt2tns and the inverse transform by fwt2tns. They take the same arguments as fwt2 and ifwt2, see the section on fwt2. Again, showoper displays the matrix containing the wavelet coefficients, tnsgrid can be used to superimpose a grid, and wav2demo to graph the basis functions.
Example (continued from the section on fwt2):
...
Wtns = fwt2tns(A,h,g);
showoper(Wtns); tnsgrid
The demo wav2demo graphs basis functions interactively. In figure 4, the diagram on the left represents the matrix of wavelet coefficients, the small square indicates which entry is 1, others are equal to zero. The graph on the right is the corresponding wavelet. Note that the wavelet has different scales in x and ydirections, which is typical of the tensor product basis.