Wavelet Toolbox Previous page   Next Page

Signal Extensions: Zero-Padding, Symmetrization, and Smooth Padding

To deal with border distortions, the border should be treated differently from the other parts of the signal.

Various methods are available to deal with this problem, referred to as "wavelets on the interval" (see [CohDJV93] in References). These interesting constructions are effective in theory but are not entirely satisfactory from a practical viewpoint.

Often it is preferable to use simple schemes based on signal extension on the boundaries. This involves the computation of a few extra coefficients at each stage of the decomposition process to get a perfect reconstruction. It should be noted that extension is needed at each stage of the decomposition process.

Details on the rationale of these schemes can be found in Chapter 8 of the book Wavelets and Filter Banks, by Strang and Nguyen (see [StrN96] in References).

The available signal extension modes are as follows (see dwtmode):

The DWT associated with these five modes is slightly redundant. But IDWT ensures a perfect reconstruction for any of the five previous modes whatever the extension mode used for DWT.

This last mode produces the smallest length wavelet decomposition. But the extension mode used for IDWT must be the same to ensure a perfect reconstruction.

Before looking at an illustrative example, let us compare some properties of the theoretical Discrete Wavelet Transform versus the actual DWT.

The theoretical DWT is applied to signals that are defined on an infinite length time interval (Z). For an orthogonal wavelet, this transform has the following desirable properties:

  1. Norm preservation
  1. Let cA and cD be the approximation and detail of the DWT coefficients of an infinite length signal X. Then the l2-norm is preserved:

  1. Orthogonality
  1. Let A and D be the reconstructed approximation and detail. Then, A and D are orthogonal and

  1. Perfect reconstruction
  1. X = A + D

Since the DWT is applied to signals that are defined on a finite-length time interval, extension is needed for the decomposition, and truncation is necessary for reconstruction.

To ensure the crucial property 3 (perfect reconstruction) for arbitrary choices of

the properties 1 and 2 can be lost. These properties hold true for an extended signal of length usually larger than the length of the original signal. So only the perfect reconstruction property is always preserved. Nevertheless if the DWT is performed using the periodic extension mode ('per') and if the length of the signal is divisible by 2J, where J is the maximum level decomposition, the properties 1, 2, and 3 remain true.

It is interesting to notice that if arbitrary extension is used, and decomposition performed using the convolution-downsampling scheme, perfect reconstruction is recovered using idwt or idwt2. This point is illustrated in the following example.

Now let us illustrate the differences between the first three methods both for 1-D and 2-D signals.

Zero-Padding.   

Using the GUI we will examine the effects of zero-padding.

  1. From the MATLAB prompt, type
  2. From the MATLAB prompt, type wavemenu.
  1. The Wavelet Toolbox Main Menu appears.

  1. Click the Wavelet 1-D menu item.The discrete wavelet analysis tool for one-dimensional signal data appears.
  2. From the File menu, choose the Example Analysis option and select Basic Signals with db2 at level 5 --> Two nearby discontinuities.
  3. Select Display Mode: Show and Scroll.

Symmetric Extension.   

  1. From the MATLAB prompt, type
  2. Click the Wavelet 1-D menu item.
  1. The discrete wavelet analysis tool for one-dimensional signal data appears.

  1. From the File menu, choose the Example Analysis option and select Basic Signals with db2 at level 5 --> Two nearby discontinuities.
  2. Select Display Mode: Show and Scroll.
  1. The detail coefficients show the signal end effects are present, but the discontinuities are well detected.

Smooth Padding.   

  1. From the MATLAB prompt, type
  2. Click the Wavelet 1-D menu item.
  1. The discrete wavelet analysis tool for one-dimensional signal data appears.

  1. From the File menu, choose the Example Analysis option and select Basic Signals with db2 at level 5 --> Two nearby discontinuities.
  2. Select Display Mode: Show and Scroll.
  1. The detail coefficients show the signal end effects are not present, and the discontinuities are well detected.

Let us now consider an image example.

Original Image.   

  1. From the MATLAB prompt, type

Zero-Padding.   

Now we set the extension mode to zero-padding and perform a decomposition of the image to level 3 using the sym4 wavelet. Then we reconstruct the approximation of level 3.

  1. From the MATLAB prompt, type

Symmetric Extension.   

Now we set the extension mode to symmetric extension and perform a decomposition of the image again to level 3 using the sym4 wavelet. Then we reconstruct the approximation of level 3.

  1. From the MATLAB prompt, type

Smooth Padding.   

Finally we set the extension mode to smooth padding and perform a decomposition of the image again to level 3 using the sym4 wavelet. Then we reconstruct the approximation of level 3.

  1. From the MATLAB prompt, type

Previous page  Dealing with Border Distortion Discrete Stationary Wavelet Transform (SWT) Next page

© 1994-2005 The MathWorks, Inc.