Lossy Compression and Image Quality. Who Has Time to be a Pixel Detective?

Hexagon Geospatial’s ECW technology continues helping customers compress massive geospatial images; however, some who may be new to this area consider the lossy nature to be a big negative. The problem is determining how much quality is actually lost. Will I see the difference? How much does the quality change when I compress to different target compression rates? I compress using 5:1 but I don’t really know why. My image is 1 terapixel in size, how on earth can I do QA across the whole image?! Do I look like a Pixel Detective?

All of these questions can be answered by taking advantage of a free standalone utility called ImageQuality which is bundled within the ERDAS APOLLO Essentials Utilities installer.

ImageQuality is used internally by the ECW JP2 SDK Product team in our automated tests to ensure both absolute and relative quality remains unchanged during development. ImageQuality was also used to generate the results in the ECW Lifecycle whitepaper which is recommended reading before deep diving into our tool!compression

Customers can use ImageQuality to compile a quality assessment report regarding output quality and demystify the compression process at the same time so the target ratio isn’t just some magical number. The main benefit of the quality measures we use such as SSIM is that the measure takes in perceived rather than absolute differences based on human interpretation (the ImageMagick compare tool provides some good examples of absolute differences). After all, just because the pixel value changed is anyone actually going to notice across an image 100’s of gigapixels in size? If the answer is “no” then this is known as visually lossless and is really the holy-grail for any lossy image compression format.

You can, for example, run the following:

“ImageQuality.exe –I original.tif –c compressed.ecw –or ran –tn 1000 –ts 512 –stat ssim –yuvY –best 10 –worst 10”

and it will write out 40 uncompressed PNG samples comprising both the worst and best quality areas across 1000 random 512x512px samples at native resolution. Having a tool to quickly target areas of high and low visual quality is incredibly powerful to quell any concerns about what lossy compression “might” do. Now you will know for certain!ECW compression Comparison

(Please note that for web purposes, these images have been converted into a JPG file. You can download the compressed and uncompressed TIFFs.)

Happy hunting, Pixel Detective.

  • Registration for HxGN LIVE 2018 Is Open

    Why register later when you can do it today? Register now to join us at next year's conference!

  • Recent Posts