Wavelet Toolbox Previous page   Next Page

Compressing Images

The purpose of this example is to show how to compress an image using two-dimensional wavelet analysis. Compression is one of the most important applications of wavelets. The image to be compressed is a fingerprint.

For this example, open the Wavelet 2-D tool and select the menu item FileExample Analysisat level 3, with haar --> finger.

The analysis appears in the Wavelet 2-D tool. Click the Compress button (located at the middle right) to bring up the Wavelet 2-D Compression window.

Discussion

The graphical tool provides an automatically generated threshold. From the Select thresholding method menu, select Remove near 0, setting the threshold to 3.5. Then, click the Compress button. Values under the threshold are forced to zero, achieving about 42% zeros while retaining almost all (99.96%) the energy of the original image.

The automatic thresholds usually achieve reasonable and various balances between the number of zeros and retained image energy. Depending on your data and your analysis criteria, you may find setting more or less aggressive thresholds achieves better results.

Here we've set the global threshold to around 30. This results in a compressed image consisting of about 92% zeros with 97.7% retained energy.


Previous page  De-Noising Images Fast Multiplication of Large Matrices Next page

© 1994-2005 The MathWorks, Inc.