First Level Compression

Knowing that the first level wavelet transform can be used to fully recover an image, the transform can be readily used for compression, since the important information of each image is generally concentrated in the low-low pass versions of the image, with only the fine details present in the other matrices. Since we are discussing bit-wise representation of images, the wavelet transformed image can be easily stored by storing a single ‘0’ bit for each pixel with a magnitude below a certain set limit value, and only using a full 8-bit integer representation for the more important elements of each matrix. This can be done with various limit values to achieve various compression ratios with various amounts of loss. An example of several images that have been compressed and reconstructed are below. In order to accomplish this with color images, the red, green, and blue images were analyzed separately and combined at the end to restore the full image.

Marbles_orig.png2Times_Marble3Times_Marble4Times_Marble

Using this method, 3-4X compression ratios can be achieved with minimal loss in image quality. While this is a good result, this transform has a much higher ceiling with regards to image compression. Other methods can be combined with this transform to achieve even higher compression ratios, and these are explored in the multilevel and recursive compression pages on this site.

Matlab Code 

Run the Haar_Compress_Script in Matlab with the other 4 files in the same folder

Haar_Compress
Haar_Compress_Script
Haar_Deconstruct
Haar_Reconstruct
Img_Reconstruct