Thursday, July 8, 2010

Numerically Lossless or Visually Lossless Wavelet Compression

I hear so very often, we need lossless image compression (meaning numerically lossless - NL). I respect the point much more when I hear it from remote sensing and photogrammetry scientists than from GIS users.

Why my differentiation? Am I diss’ing the GIS folks? I hope not, that is not my intention.

Way back in 2001 I did a little test. I was at Georgia Tech Center for GIS (CGIS) and was asked by the State of Georgia to determine what compression level was acceptable to compress the state’s Color-Infrared aerials. Wavelet NL was not available through COTS software at the time (MrSID and ECW) and CGIS was not funded to research a new compression method. We were told to research what COTS compression level to use.

So, we pulled together engineering students, business students, architectural students, geospatial scientists, and secretaries. Most had some geospatial training and a few did not. We displayed an 8-bit uncompressed image, and compressed versions of the same image at 10:1, 15:1, 20:1, 25:1 and 30:1 compressions.

The people were allowed display images side-by-side, use swipe, blend, and fade functions. They could zoom in and out, but no further than a 4x zoom.

Only one person could see the compression artifacts at a 1:1 zoom before 20:1 compression. At 20:1 all the experienced remote sensing people could see a few artifacts. The experienced GIS people could see the artifacts at a 2x zoom of 15:1, but only one of non-geospatial people (a business student) could see the artifacts at 2x 15:1. (Later she decided to work as a research assistant for me and is still in the geospatial industry).

My point is… many in the geospatial industry push the 2 – 2.5x file size saving when using NL compression; when many trained geospatial people cannot see a compression artifacts in 3-band image compressions below 10:1 unless they zoom in to 4x. (Sure, we all know of the exceptions; the remote sensing, and photogrammetry experts duly noted above; but these are the exception, not the rule.)

So why not compress at a VL level when you are not doing precise remote sensing or photogrammetry? The medical imaging industry is gravitating on between 8:1 and12:1. Is what we are doing in the geospatial world so important we have to preserve more precision than the medical imaging? Are we protecting more precision than our accuracy supports?

I for one think we are wasting space and time when we do not compress to at least the VL compression level.

A final note, I am running tests to know at what level we can wavelet compress data and not affect autocorrelation, classification, and vegetation indices. Have any of you dared such tests? Care to let us know?

5 comments:

Anonymous said...

As a side note, you can measure "well-defined" points at an accuracy of 1/3 of the pixelresolution.
For instance you can approximate the center of a manhole more accurate than the pixel resolution itself. Often when you do this, you want to zoom in further than 4x the resolution.

Jarlath O'Neil-Dunne said...

The medical community is a bit ahead of the earth remote sensing community in extracting features using attributes that are much less sensitive to absolute pixel values such as shape, texture, size, pattern, and association. I think this is one of the reasons they don't get hung up as much on this issue. Of course the fact that some image compression algorithms limit the the number of bands is a major issue for us. My feeling is that as spatial resolution increases so does the ability to use compression without a measurable loss of information.

Paul said...

Anonymous, A manhole cover and its' frame in the US is about 2 feet (61cm) in diameter. The rule of thumb for resolving a specific feature (especially a feature with low contrast difference from its surroundings) is to have a spatial resolution of 1/2 of the smallest feature needing to be resolved. To resolve manholes in the US, the rule of thumb indicates we need a 1 foot (30cm) image resolution. For every 2x zoom a single pixel becomes 4 pixels, thus a 4x zoom on a manhole at 1 foot resolution gives us gives us 64 pixels to resolve the center of the manhole as a ground control point. That should be a plenty.

Of course we can do the job with a more coarse resolution, but it is not recommended.

Now, I assume you were making the point that compression would hurt the quality of the point placement. I will agree that heavy compression willdo exactly that. This is why I want to test with AutoSync’s APM on various compression levels. I will record the total distance away from the uncompressed point placement and the total variance in RMSE. Some photogrammetrists say slight compression will actually improve point selection. I believe they are correct.

Paul said...

Jarlath, are you saying there is more money in medical imaging rather than geospatial imaging? :)

We have a former ERDAS software engineer working in the medical imaging field and he visits us from time to time. It is always an interesting visit.

One thing the geospatial imagery community does have on medical imagery community (according to our friend) …. ERDAS APOLLO IWS smokes their image servers in speed and user capacity. (Of course, if you are faster, you can handle more users.)

Jarlath O'Neil-Dunne said...

Just a bit more money! One of the tricky things in comparing earth remote sensing to medical imaging is that internally developed customized solutions are commonplace in the medical imaging community. In the earth remote sensing community we primarily rely on commercial products. A complete collections of images of a single cell can exceed 25TB. When one combines this with need to do segmentation and classification in 3D it is easy to see why a leading medical imaging facility will develop their own software. I recently spent a week with a group of medical imaging specialists and we have a lot to learn from them. As I mentioned before they really understand the importance of using the full range of elements of image interpretation. Although Olson documented these back in 1960, the earth remote sensing community ditched all but tone for use in automated classification for years. If you rely solely on spectral values, compression is seen as a liability. As you pointed out in your testing, if we rely on techniques that better mimic human vision the effects of image compression are negligible if one stays in the 10-15:1 compression range.