CHAPTER 4THE HAAR WAVELET TRANSFORMATION

Consider the 512 × 512 image plotted in Figure 4.1(a). In its raw format, it is stored at 8 bpp for a total of 5122 · 8 = 2,097,152 bits. Based on what we learned in Section 3.3, we should be able to reduce the space needed to store the image if we create Huffman codes for the intensities in the image. We compute the Huffman codes for the intensities in the image and find that the new bits per pixel for the encoded data is … 7.585 bpp or a savings of only 5.18%.

Image described by caption and surrounding text.

Figure 4.1  An image and the distribution of its intensities.

What went wrong? The main reason for performing Huffman coding is to reduce the size of storage space. However, Huffman coding works best if relatively few intensities comprise the majority of the image. A look at Figure 4.1(b) shows that the distribution of the intensities of A is quite spread out. Thus Huffman coding will not provide a substantial savings in terms of storage space.

Suppose we construct an invertible transformation T such that T(A) has the distribution of intensities show in Figure 4.2. Such a transformation exists and in this case, the Huffman‐encoded version of T(A) is 2.77 bpp. We could save the Huffman‐encoded version of T(A) and if we want to recover A, we simple decode the Huffman codes for T(A) and then apply T−1.

Figure 4.2  The distribution of intensities of the transformed data T(A).

We have stipulated ...

Get Discrete Wavelet Transformations, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.