Tuesday, September 25, 2012

SOCIS - part 7

After POT is applied to an input image we obtain a transformed image in which the value of each pixel no longer corresponds to a light intensity at a specific wavelength. We can still however plot bands from the transformed image and see what they look like. To that end, I initially plotted the transformed bands for: original POT, POT with the simple smoothing formula, POT in which for each we've faked a 0 mean result. These plots can be found here [1]. Let's inspect bands 13, 19 and 37. These are the bands, I have used in all previous example images, to represent the blue, green and red wavelengths.
I will only add here the plot for band 13, in the 3 cases. The rest can be found at [1].


This band is particularly interesting because, unlike the other 2, we can clearly see discontinuities in the original POT plot. These discontinuities in the transform domain seem to correspond to the discontinuities we've seen on the image after lossy compression, such as here [2].

What's important to note is that, in the smoothed image, the discontinuities are gone. As we know, the smooth image doesn't have discontinuities either, but there's still the problem of blurriness. Where does that come from? Maybe, like in the case of the discontinuities, it is present in just one of the 3 bands chosen for red, green and blue and affects the entire image when constructing the composite image. But what can we do to solve this problem? In order to answer this, we have to plot another case.

A while back I tested the case of applying POT to the image as if it were a single line. This just means that if the image has dimensions Z, Y, X (Z = number of bands, Y = number of lines, X = number of columns), then we consider it of dimensions Z, 1, X * Y. In that case, we obtained the following:


Looks better than our blurry image, but why is that? Well, I plotted the transformed single line case [3], just like the others and compared it to the smooth case to see what was different. What I noticed was that both were free of discontinuities but there was a better contrast in the single line case (e.g. the difference in intensities between a lake and it's surroundings was greater than in the simple smoothing case). I was thinking that the mean in the single line case is for all lines. So then I thought that maybe for each line I could use a mean which is an average of all previous means. I tried that (rots were still smoothed with the original formula) and didn't get a better result. The image was still blurry. However, a plot of the means showed that they were very nicely smoothed. I then decided to try the same thing for the rots as well and it seems to have worked. The result looks very similar to the single line case:



The plots for the means and the rotations can be found here [4][5]. As can be seen, they are much smoother than anything previously obtained.
To explain in a bit more detail what I did exactly: at each step we compute a rotation parameter tCurrent and a mean mCurrent. The POT uses exactly these values which were computed. In this "averaged smoothing" the actual values that are used, let's call them tNew and mNew, are averages over all previous tCurrent or mCurrent values of the same band. Updating the average after each line can be done in constant time (keep current sum of elements and current element count), so there is no increase in either memory or time requirements.

A SNR plot will show how well this method behaves with respect to the original POT, the simple smoothing approach and the single line attempt. I made a mistake when making the SNR plots as I used the SNR values for the original POT and PSNR for the others. The next post will contain the correct plots. We can still look at one of the plots, just substitute SNR with PSNR:



We can see how the "averaged smoothing" approach performs better than both simple smoothing and single line. This PSNR plot is for reverse-waterfill rate allocation, not BIFR.

No comments:

Post a Comment