Image Compression Software

November 9, 1999
Share

Sharing is Caring

12/1/99 - Feedback to this article

As a visitor to our Map Gallery will quickly discover, raster images can add extraordinary richness to maps. Until now, handling these images has required a relatively high level of expertise; and the sizes, byte-wise, of the images have put tremendous strains on both their storage and display.

With one-meter satellite imagery coming to market this month, two companies have made extraordinary strides in attacking this problem. The latest approach, embodied in products from Earth Resource Mapping and LizardTech, is two-fold: to apply advanced mathematical algorithms to accomplish extreme compression in image size; and to build viewers (which can be embedded in your mapping software) that directly read these compressed images.

The results are impressive. We take a comprehensive look at the key facets: installation, processing speed, processed image quality, and plug-in display speed. Each of the following sections will discuss LizardTech's MrSIDTM Workstation Geospatial Encoder v1.3.1 (MrSID) and Earth Resource Mapping's Enhanced Compressed Wavelet Compressor v2.0 (ECW).

Installation

MrSID: I was impressed right away with the documentation. My children were impressed by the handful of plastic lizards that fell out of the box. The manual opened to a plastic sleeve holding the software CD and something that looked like a cable adapter -- my first experience with a "dongle."

A dongle is a hardware-based security device that you attach to an external port on your computer. This hardware key uses embedded codes and passwords to control access to the companion software application. Unfortunately, my machine has so much expansion hardware (and no local printer) that these ports are normally disabled to free up needed IRQ's. Having rebooted the machine and enabled the parallel port, the dongle was attached.

The hardware key also requires a software driver. The installation instructions state how to install, but the mentioned folder is not off the root directory, so that takes a moment. When you run the install routine for the dongle driver, there is no feedback to tell you whether it was successful. Good thing the installations let you know that before hand. When the MrSID CD is first inserted, the following error message appears:

Problem opening D:TEMP.
-34

Pressing the [OK] button dismisses this dialog. The installation Main Menu appears and the actual MrSID software is installed without a hitch. The license has to be activated with a 36 character alphanumeric code.

Total install time: 20 minutes.


ECW: After downloading the file from their web site, run the install.

Total install time: 20 seconds.

Compressing Images

MrSID: The interface (shown below) is easy to use. Simply add one or more images to the pane on the left, set the output directory, adjust settings as desired and hit [Compress]. For these tests, all settings were left at default. A nice touch was the way that the program remembers the last folder from which you opened images. MrSID adds an entry and an icon reference to Explorer which allows files to display meaningful information rather than a generic description, "SID File."


ECW: The interface is quite simple (see below). Enter a filename or pick one by clicking the [...] button, adjust your compression rate and output type and hit [Apply]. As these tests were not going to open files with ER Mapper's Image Web Server, the [ ] Compress for Internet Usage box was unchecked.

Evaluating Results

There are three main questions we attempt to answer while looking at the compression programs' results:

  • How compact are the new files?
  • Has any image degradation occurred?
  • How long does it take to compress images?

There are five different types of images included in the comparison. Four represent the typical imagery used in GIS: aerial photography (color and gray scale), scanned maps and elevation relief images. The fifth image is a simple test pattern to make it easier to see the effects the compression algorithms have on images without all the complexity of a geospatial image.

Following are thumbnails of the test images with brief comments about how the two programs performed. These are summary comments -- the full details are on other pages. Click on the thumbnail or follow the link to see complete details on:

  • Run times.
  • Start / finish file sizes.
  • Number of colors in original vs. compressed image.
  • A sample area of original and each compressed version at 1:1 viewing.
  • A sample area of original and each compressed version at 10:1 viewing.
  • RGB Histograms of color composition. (A histogram is a graph of the distribution of RGB and/or luminance values in an image. The horizontal axis shows graphs from dark to light [left to right], while the vertical axis indicates the number of pixels of that value at each point.)

As you look at the detail pages with their tables and images, you will note that they are ordered as follows: MrSID / Original TIFF / ECW. This is so the original image or values will always be directly below or above those from the compression agents. This should make it easier to do side-by-side comparisons on-line.


Color Aerial Orthophoto
155,275 KB TIFF PackBits compressed

Click here for test results using this image.

Both programs compress this image at or slightly better than the selected 20:1 target. ECW processed the image 2.5x faster than MrSID. The normal view insets show the images nearly identical to the original at first glance. When you focus on small items with high contrast (such as the black shadows on the white buildings in the upper-left corner), the size of these details seems to be larger in the MrSID file than in the original.

When you look at the 10x zoom insets, the reason is evident. In this image and others, it appears that MrSID's compression blends the colors somewhat when it processes the file (almost like an image editing package's "blur" effect) while ECW's processor's close-up looks more grainy (like a "sharpen" effect was applied).

MrSID's number of colors was close to the original TIFF. ECW increased the actual color count by 25%, however a comparison of the histogram to the original TIFF shows it running close to the source.


Digital Raster Graphic
27,903 KB TIFF PackBits compressed

Click here for test results using this image.

ECW compressed nearly twice as fast as MrSID but the MrSID compressed image was significantly smaller. Neither of the compression programs reduced the size of this DRG near the 20:1 target. (The file was compressed already, but so was the color orthophoto.) What really surprised me was how they handled the colors. The original DRG had only 12 colors -- yet both the compressed images have over 2 million colors!

The concern goes deeper than the number of colors, to the actual color choices. DRG's have a great amount of pure white content, both in the image itself and in the collar. Look at the "white" areas on the MrSID inset and compare them to the white of the table background: white is now gray.

Look further to the 10x zoom inset and compare the solid colors from the original TIFF to the to compressed images, there are obvious differences -- and not all good. The single hues of green, blue, black and red in the ECW file are pretty faithful to the original; however, the MrSID file appears distorted and noisy.


Color Elevation Relief
220,932 KB TIFF Uncompressed

Click here for test results using this image.

Amazing compression going on here, folks. This type of image, with many adjacent pixels with the same RGB value, really showcases the power of wavelet technology compression. A file, nearly 1⁄4 Gigabyte in size, reduced to under 5 MB (about 50:1 ratio), in four minutes or less.

Again we have the issue of color: ~5,000 colors in the original TIFF, now over 1.5 million colors in the compressed files. And again, we have the problem of noise. Looking at the MrSID normal view inset, the image is noticeably fuzzy.


Gray Scale Aerial Orthophoto
2,851 KB TIFF Uncompressed

Click here for test results using this image.

There are no "color" issues with either of these, by the very structure of gray scale images. Both images were compressed from a starting size of nearly 3 MB down to a few hundred KB in just seconds.

When you look at this example at normal view, notice the clarity of the roads and sand traps which should be nearly white. The fairways and the water hazards should be solid patches too. The nearly black lake and even gray of the fairway display as faintly speckled in the ECW view, and noticeably so in the MrSID image.

At the 10x zoom level, the same MrSID/blur and ECW/sharpen effects appear. For instance, look at the black edges of the white building and how they appear wider in the MrSID image, and some of the pure white spots on the left-center next to the roadway are blurred. The ECW image is no exact copy, but the dimensions and edges of objects are reproduced more faithfully.


Test Pattern
734 KB TIFF PackBits compressed

Click here for test results using this image.

Here is where we strip away all the distractions of cool images and irregular patterns and give our experiment a control factor. This image is just some pure solid colors, straight lines and some gradient fills.

Even though the compression rate is still at 20:1 for this last image, ECW compressed it at 10.6:1 and MrSID at 43.2:1. The amount of noise introduced in the MrSID image is evident (in the normal view, observe the parallel green lines).

When you scroll down to the 10x zoom, the noise appears in both, as well as some ghost images of the black divider lines. The amount of spurious data in the MrSID image is high.

GIS Display Speeds

The plug-ins for viewing the compressed images are easy to install. Opening files is as simple as opening any other raster image. There are also stand-alone viewers for these image formats.

A MapBasic routine was written to open the various original and compressed images, resize the windows and change the zoom settings three times, then close the file. The results below are the totals for this scenario run in a 20x loop.

Image Type MrSID Original
TIFF
ECW
Color Aerial 101 secs 25 secs 29 secs
DRG 84 secs 16 secs 35 secs
Grey Scale Aerial 26 secs 8 secs 18 secs
Color Relief 96 secs 26 secs 40 secs

Overall, the ECW images take 63% longer to display than their non-compressed counterparts, the MrSID images take 309% longer than the original TIFF's to display.

Summary

Both of these products deliver what their publishers claim: significant compression of imagery while retaining useable image quality. By making massive high quality images so easy to create, manipulate, and view, these companies have made a major contribution to our GIS arsenal.

The compression may introduce various levels of noise or other differences; doing land use classification analysis on compressed images may not be a good idea. These images find their best application as backdrops.

MrSID:

  • Processed 589.7 MB in 23m41s for a throughput of 24.9 MB per minute. (Takes longer to compress images that were already stored in a compressed format, as it must uncompress the file first.)
  • With a target output ratio of 20:1, the compression rate was 16.8:1 as an average for all images.
  • Hardware security dongle required.
  • Price: $5,000 (for the product we evaluated; $1,500 for the version with a 500MB file size limit.)
ECW:
  • Processed 589.7 MB in 10m25s for a throughput of 56.6 MB per minute.
  • The target output ratio was 20:1 for all images, and the achieved overall compression rate was 9.8:1 for this set of images.
  • Compressed images appear more faithful to the original without excessive noise.
  • Less system resources required to run.
  • Fast raster display plug-in for GIS.
  • Price: Free (for the product we evaluated with 500 MB limit on input file size; $4,995 for the full ERMapper GIS and unlimited file size.)

Test Methodology

All tests were performed on a Dell Computer Corporation Precision 210 workstation with the following key components:

  • Intel 500 Mhz Pentium III microprocessor
  • 256 MB 72-bit ECC SDRAM
  • Windows NT4 w/Service Pack 6
  • Diamond Viper 770D AGP Video Card w/ 32 MB RAM at 1600 x 1200 resolution, in True Color mode

Before starting each product's battery of images for compression, the system was rebooted. This provided full system resources to each product with an empty cache and clean paging file.

Image evaluation, manipulation (zooming in for details), histograms and other details (such as counting number of colors used) were performed using Paint Shop Pro v6 from Jasc Software.

None of the images in the detailed review pages were rescaled or resampled. Grey Scale images were stored as non-lossy GIF's, and color images were saved as JPEG's with the lossy compression turned off.

12/1/99 - Feedback to this article

Share

Sharing is Caring


Geospatial Newsletters

Keep up to date with the latest geospatial trends!

Sign up

Search DM

Get Directions Magazine delivered to you
Please enter a valid email address
Please let us know that you're not a robot by using reCAPTCHA.
Sorry, there was a problem submitting your sign up request. Please try again or email editors@directionsmag.com

Thank You! We'll email you to verify your address.

In order to complete the subscription process, simply check your inbox and click on the link in the email we have just sent you. If it is not there, please check your junk mail folder.

Thank you!

It looks like you're already subscribed.

If you still experience difficulties subscribing to our newsletters, please contact us at editors@directionsmag.com