Multilevel Compression

In order to further improve compression, a multilevel Haar Wavelet transform was implemented. This worked by performing the same wavelet transform on the low-low pass version of the red, blue, and green matrices respectively.

LenaDecomposition

Lena2Decomposition

Lena3Decomposition

Lena4Decomposition

Each one of these transforms can be used to fully recover the original image, and it’s clear that each additional transform results in more zeros (or values close to zero) in the overall image, which should yield much higher compression ratios. The main issue with this method, however, is that the higher level transform has much more important information represented with values closer to zero, and filtering these values and rounding to integers results in a much higher information loss. This allows for better compression ratios but worse overall image quality.

2LevelCompress_Marbles_4X3LevelCompress_Marbles_5X4LevelCompress_Marbles_6X

The images look much blockier, and the similarity drops as more levels of the transform are added. One of the main reasons for this is that with this algorithm, the entire transformed image is treated the same, meaning that values below a certain set limit are thrown out for the entire transformed image. Values closer to zero for higher levels of the transform actually represent more information, however, resulting in much worse quality for the overall image. In order to counteract this, a recursive algorithm was implemented to achieve higher compression ratios.

Multilevel Compression Matlab Code

(Run MultiCompressScript with all the other files in the same folder)

MultiCompressScript

Haar_Deconstruct

Haar_Reconstruct

imgcompare

MultiCompress

MultiIT

MultiReconstruct

MultiTransform