Signal-to-noise ratio and bitrate
We recall from the previous post, that compression can be either lossy or lossless. Regardless of the type of compression used, it's obvious that the compressed file has a smaller size than the original. Size, of course, is measured in units of information (bits, bytes multiples of these). A hyperspectral image is made up of bands, each band contains pixels and each pixel is a value which can be represented using a certain number of bits. The size of the image can be computed as: number of bands * number of pixels per band * number of bits per pixel. We call the last value bitrate (measured in bpppb - bits per pixel per band).
Signal-to-noise ratio (SNR) is a measure of the amount of useful information. It is measured in decibels (dB).
It is useful to plot SNR versus bitrate to see how different transforms and compression methods behave. These are called rate-distortion plots, and we can see one in the figure below.
We notice that the greatest performance comes when using POT with waterfill. This can also be seen when plotting SNR versus band number number for each bitrate. These plots can be found here  and for peak SNR here .
POT artifacts at low bitrates
As mentioned in the previous post, when using POT, at low bitrates certain artifacts can appear in the lossy compressed images because of the transform's line-based approach. The main focus of this projects is to try to reduce these artifacts.
The image I've been working with so far is a hyperspectral image of Mount St. Helens that came from the Hyperion sensor of the Earth-Observing 1 (EO1) mission. The image, along with others can be found here: . In the figure below we can see this image (I've roughly extracted the bands for red, green and blue to create an RGB image):
When talking about image compression, we obviously need a means to reverse the process. The images we've just seen are not "compressed files" but rather the result of decompressing the compressed file and removing the POT. How can we remove the POT? Well, if we understand what the POT does to the original image, it's only a matter of applying these steps in reverse. First each bandline is adjusted so that it has a zero-mean. That just means that we subtract the mean from each bandline. Then it applies a rotation matrix to pairs of bandlines (vectors). The rotation matrix has a specific form and depends on one parameter called t, which varies from each pair of bandlines. Thus, if we would know all of the t parameters and all of the means we could reverse the POT. Luckily these values are stored in a file called the side information file. The t parameters are stored as half floats (16 bits) and the means as shorts (16 bit integers).
It is useful to plot these values, especially the t parameter and observe the variance of it's variation across multiple lines. I have plotted the means and the t parameter for the previous image for the first 500 lines (height 500):
On the x axis we have band numbers and on the y axis image line number.