Wavelet Toolbox Previous page   Next Page

How to Calculate the epsilon-Decimated DWT: SWT

It is possible to calculate all the epsilon-decimated DWT for a given signal of length N, by computing the approximation and detail coefficients for every possible sequence epsilon. Do this using iteratively, a slightly modified version of the basic step of the DWT of the form

The last two arguments specify the way to perform the decimation step. This is the classical one for e = 0, but for e = 1 the odd indexed elements are retained by the decimation.

Of course, this is not a good way to calculate all the epsilon-decimated DWT, because many computations are performed many times. We shall now describe another way, which is the stationary wavelet transform (SWT).

The SWT algorithm is very simple and is close to the DWT one. More precisely, for level 1, all the epsilon-decimated DWT (only two at this level) for a given signal can be obtained by convolving the signal with the appropriate filters as in the DWT case but without downsampling. Then the approximation and detail coefficients at level 1 are both of size N, which is the signal length. This can be visualized in the following figure.

The general step j convolves the approximation coefficients at level j-1, with upsampled versions of the appropriate original filters, to produce the approximation and detail coefficients at level j. This can be visualized in the following figure.

Next, we illustrate how to extract a given epsilon-decimated DWT from the approximation and detail coefficients structure of the SWT.

We decompose a sequence of height numbers with the SWT, at level J = 3, using an orthogonal wavelet.

The function swt calculates successively the following arrays, where A(j,epsilon1,...,epsilonj) or D(j,epsilon1,...,epsilonj) denotes an approximation or a detail coefficient at level j obtained for the epsilon-decimated DWT characterized by epsilon = [epsilon1,...,epsilonj].

Step 0 (Original Data).   
A(0)
A(0)
A(0)
A(0)
A(0)
A(0)
A(0)
A(0)

Step 1.   
D(1,0)
D(1,1)
D(1,0)
D(1,1)
D(1,0)
D(1,1)
D(1,0)
D(1,1)
A(1,0)
A(1,1)
A(1,0)
A(1,1)
A(1,0)
A(1,1)
A(1,0)
A(1,1)

Step 2.   
D(1,0)
D(1,1)
D(1,0)
D(1,1)
D(1,0)
D(1,1)
D(1,0)
D(1,1)
D(2,0,0)
D(2,1,0)
D(2,0,1)
D(2,1,1)
D(2,0,0)
D(2,1,0)
D(2,0,1)
D(2,1,1)
A(2,0,0)
A(2,1,0)
A(2,0,1)
A(2,1,1)
A(2,0,0)
A(2,1,0)
A(2,0,1)
A(2,1,1)

Step 3.   
D(1,0)
D(1,1)
D(1,0)
D(1,1)
D(1,0)
D(1,1)
D(1,0)
D(1,1)
D(2,0,0)
D(2,1,0)
D(2,0,1)
D(2,1,1)
D(2,0,0)
D(2,1,0)
D(2,0,1)
D(2,1,1)
D(3,0,0,0)
D(3,1,0,0)
D(3,0,1,0)
D(3,1,1,0)
D(3,0,0,1)
D(3,1,0,1)
D(3,0,1,1)
D(3,1,1,1)
A(3,0,0,0)
A(3,1,0,0)
A(3,0,1,0)
A(3,1,1,0)
A(3,0,0,1)
A(3,1,0,1)
A(3,0,1,1)
A(3,1,1,1)

Let j denote the current level, where j is also the current step of the algorithm. Then we have the following abstract relations with epsiloni = 0 or 1:

where wshift performs a epsilon-circular shift of the input vector. Therefore, if epsilonj+1 = 0, the wshift instruction is ineffective and can be suppressed.

Let epsilon = [epsilon1,...,epsilonJ] with epsiloni = 0 or 1. We have 2J = 23 = eight different epsilon-decimated DWTs at level 3. Choosing epsilon, we can retrieve the corresponding epsilon-decimated DWT from the SWT array.

Now, consider the last step, J = 3, and let [Cepsilon,Lepsilon] denote the wavelet decomposition structure of an epsilon-decimated DWT for a given epsilon. Then, it can be retrieved from the SWT decomposition structure by selecting the appropriate coefficients as follows:

Cepsilon =

A(3, epsilon1, epsilon2, epsilon3)
D(3, epsilon1, epsilon2, epsilon3)
D(2, epsilon1, epsilon2)
D(2, epsilon1, epsilon2)
D(1, epsilon1)
D(1, epsilon1)
D(1, epsilon1)
D(1, epsilon1)

Lepsilon = [1,1,2,4,8]

For example, the epsilon-decimated DWT corresponding to epsilon = [epsilon1, epsilon2, epsilon3] = [1,0,1] is shown in bold in the sequence of arrays of the previous example.

This can be extended to the 2-D case. The algorithm for the stationary wavelet transform for images is visualized in the following figure.


Previous page  -Decimated DWT Inverse Discrete Stationary Wavelet Transform (ISWT) Next page

© 1994-2005 The MathWorks, Inc.