Wavelet Compression of “Lena”

A standard image used in testing two-dimensional signal processing algorithms is “Lena.”  The data is contained in the variable lenaData.

ListDensityPlot[lenaData, plotoptions1];

We will explore wavelet compression of "Lena" with a Daubechies extremal phase filter of order 4.

d4 = DaubechiesFilter[4];
wtdata = 
        WaveletTransform[lenaData, d4, 4, BoundaryCondition -> Fixed];

The cumulative energy can be used to generate the curve for the relative error versus the compression ratio or, equivalently, the number of retained wavelet coefficients. For the choice of relative errors 0.03, 0.05, 0.07, and 0.1 we can compute the number of wavelet coefficients that we must retain. Here are the results.

({{Relative Error, 0.03, 0.05, 0.07, 0.1}, {Compression Ratio, 6.7, 12.3, 20.2, 38.5}, {Number of Retained Coefficients, 9741, 5341, 3243, 1698}})

For each of these compression ratios, we show the resulting image obtained from applying the inverse wavelet transform to the compressed data.

Create compressedLenaGraphics

Show[GraphicsArray[compressedLenaGraphics], 
      DisplayFunction -> $DisplayFunction];