Keywords: front-page

# Wavelet Transform

[Laboratory]

### Experiment: wavelet transform and data compression

The following experiment performs a one-level (scale one) forward and inverse wavelet transform. It is based on Daubechies filters (wavelets). In addition, a simple experiment of data compression is carried out by only utilizing the low-pass wavelet decomposition for image reconstruction. This can be seen as transmitting only this portion of the data through a communications channel with a 1:4 compression ratio.

The forward and inverse Daubechies filter coefficients are shown below. Two sets of filters are used for the forward and inverse transformation. Observe that the filters are 1D. This ascii files are located in the $DIP/data subdirectory.

### Daubechies filters order2 (four coefficients)

- Direct Transform

  - Highpass

        daub2hd.ascii -
        (-0.1294095225512604, -0.2241438680420134,
                               0.8365163037378079, -0.4829629131445341)

  - Lowpass

        daub2ld.ascii -
        (0.4829629131445341, 0.8365163037378079,
                             0.2241438680420134, -0.1294095225512604)

- Inverse Transform

  - Highpass

        daub2hi.ascii -
        (-0.4829629131445341, 0.8365163037378079,
                             -0.2241438680420134, -0.1294095225512604)

  - Lowpass

        daub2li.ascii -
        (-0.1294095225512604, 0.2241438680420134,
                              0.8365163037378079, 0.4829629131445341)

The result of the forward wavelet transform algorithm is shown below.

Forward wavelet transform

Observe the decomposition performed. In clockwise order and starting from the upper left corner of the image we have: 1) low-pass decomposition, 2) high-pass decomposition in the width direction (horizontal details), 3) high-pass decomposition in the height direction (vertical details), and 4) high-pass decomposition in both width and height directions. This is the usual manner to store and display wavelet transforms.

In order to better visualize each decomposition, the four quadrants have been extracted and displayed alone. This is depicted below

The inverse wavelet transform and the difference between the original are shown below

a)Inverse wavelet transform; b)its abs. difference from the original (max ~10E-14)
a) | b)

We extract the low-pass decompostion and use it to reconstruct the original image. NOTE: in doing so we can achieve a 1:4 compression ratio. The low-pass image is

Low-pass image

The reconstruction using the inverse wavelet transform yields the image below. The difference between the original image and the reconstructed is also displayed:

a)Reconstructed image; b)its difference from the original
a) | b)

- Lab: Wavelet Transform