Wavelets

 

Wavelets: 

Wavelets are a way of reformatting and reorganizing data so that most of the images energy is stored in a small segment of the image.  This way the rest of the image can be highly compressed since it will contain very small values. 

 

This transformation is done by comparing neighboring pixels and storing the difference in another section of the image.  Thus two neighboring pixels with close values can be stored as the value, and the difference(which will be small).  The equations for doing the wavelet tranformation are as follows:

y0 = x1 + z0/2

z0 = x0 - x1

 

Where x0 and x1 are neighboring pixels and y0 and z0 are values in the new image(y0 will hold the large value, z0 will be put in the section with the small value).

 

In order to put the image back to normal, we use the following equations:

x0 = x1 + z0

x1 = y0 - z0/2

 

 

The images at the right show the wavelet after the first and second transformations, respectively.


 

Embed Zero Wavelets: 

This is an algorithm that uses Wavelets in order to get a high compression ratio.  It does this by first doing a wavelet transformation, then breaking the image apart into bit planes.  To do this, we first take a mask and compare each value to see if is significant (by bit-wise "and" with the mask). 

If a value is significant then it is a significant positive or negative.  If the value is insignificant and all its children are insignificant then it is a zero tree, and we don't have to store a value for all of these insignificant values.  Hence we can compress with a high ratio if we have many zero trees (which most images will have). 

 

We proceed by lowering the mask by one (which then checks the second most significant bit of each value).  We do this all the way down to the last bit.