2.4
Image Compression Alternatives
and Media Storage Considerations

Nickolas Faust
The Electro-Optics, Environment, and Materials Laboratory
Georgia Tech Research Institute
Georgia Institute of Technology
Atlanta, GA 30332
Direct comments to:
jairo@bismarck.gtri.gatech.edu
diana@bismarck.gtri.gatech.edu


Contents

Introduction

Storage

Multispectral/hyperspectral Instrumentation

Compression/Decompression Techniques

Types of Compression

Conclusions

References
 


Introduction

           The capacity of generation of massive amount of information skyrockets. Image data is perhaps the greatest single threat to the capacity of data networks. As image analysis systems become available on lower and lower cost machines, the capability to produce volume of data becomes available to more and more users. While the market for image processing systems is still small related to the market for word processing and spread sheets, the newly developed document imaging and desktop publishing market are enormous.

        New data storage technologies have been developed to try to keep pace with the potential for data creation. A major technology that may help alleviate some of the problems associated with the massive data creation and data transfer capacity is the general class of algorithms for data compression and decompression. With these techniques, data storage requirements may be compressed by factors of four to 1 to factors of 80 to one. Some of the compressions and decompressions can be handled in real time using specialized computer hardware, while some of the techniques require seconds or even minutes. Some techniques are symetric in nature (compression and decompression take the same amount of time) while others are significantly asymmetric in nature. Asymmetric techniques generally require considerably more time to compress imagery than to decompress it.

        The development of these compression/decompression techniques for images is not neccesarily driven by needs and requirements of the scientific image analysis community, but by the much larger desktop publishing and document imaging markets. The good  news is that the scientific community can also take advantage of these innovations.

 back to table of contents


Storage

        For earth resources analysis, and particulary for far reaching global change studies, the amount of data that must be processed, even using the current generation of sensors, is astounding. One Landsat frame (as defined by EOSAT) is 185 km by 185 km or 100 statute miles. For this area, Landsat MSS occupy approximately 32 megabytes of data storage, A data set from TM, covering the same area, is approximately 300 megabytes. To cover the state of Georgia with one date of Landsat TM data would require parts of 14 TM scenes or approximately 4 gigabytes.

CHARACTERISTIC  IMAGE  SIZE 
Landsat  MSS 
30 Mby 
Landsat TM 
300 Mby 
SPOT  XS 
27 Mby 
SPOT Pan 
36 Mby 
Aircraft 
75 Mby 

       A SPOT multispectral scene covers less of the earth's surface than a Landsat scene. A SPOT multispectral scene is approximately 60 km by 60 km and has 3 spectral channels resulting in a data storage of 27 megabytes; however, since it would take over 9.5 SPOT scenes to occupy the area covered by 1 TM scene, the data volume of 9.5 x 27 megabytes = 256 megabytes is similar to the total Landsat TM storage. A SPOT 10 meter resolution panchromatic scene would need 36 megabytes to cover the 60 km by 60 km scene, so a coverage equal to 1 TM scene's area would be 342 megabytes. For vegetation, geologic, and landcover analysis, multiple dates are often necessary to correctly identify different types of crops, locate road networks, etc. If ten dates of data were required with SPOT panchromatic and multispectral data combined with Landsat TM data for the state of Georgia, the data volume would be greater than 10 gigabytes. These data volumes neglect the size of intermediate files for geometric correction, image sharpening, and spectral merges. A reasonable rule of thumb is to allocate at least four to five times the data storage necessary for the raw image data for full analysis space. Thus, for a statewide effort for Georgia, approximately 50 gigabytes of data storage would be necessary.

        These sources of data  are only a few of the data layers that might be gathered for a statewide analysis. Elevation digital data, soil type information, and existing cultural information such as census data, road networks, geographic and political boundaries are generally used in a statewide Geographic Information System. The resulting data storage needs overwhelm our capacity to have online storage available. Archiving and various forms of data compression are necessary to effectively allocate our scarce resources and still meet project requirements.

back to table of contents


Multispectral/hyperspectral Instrumentation

To digitally analyze photographic data, the hard copy negative or positive product must be scanned by a digital image scanning system to produce a digital file. This step is usually the point at which errors are introduced into the image generation process. The distortion must be minimized by gathering photography with a large amount of overlap and only scanning the central part of the image. For example, to scan a color nine by nine inch photograph at scanning resolution of 400 dots per inch will result in a file of appoximately 40 megabytes.

There are various types of hyperspectral sensing.  The most recent digital imagery system is a new technique being developed for NASA and a number of private companies that involves the use of a gradient detector to provide high spectral resolution in the analysis of reflected light from the earth's surface. This technique uses a detector that has varying bandpass characteristics along wedge to separate the incident radiation into as many as two to four hundred spectral bands with ten nanometer spacing. The output from such an imaging radiometer such as AVIRIS (NASA-AMES/JPL) is essencially a continous spectral curve, at 16 bit resolution  instead of 8, for each resolution element in a scanned image. This type of information may provide discrete information that may allow the efficient and unambiguous discrimination of geological rock types as well as species level discrimination for vegetation. This level of information may be invaluable in allowing better clasification potential, but it is still being evaluated in terms of its inherent complexity and huge data production rate.

 

HYPERSPECTRAL SENSING 
PROTOTYPES 
AIS (JPL)  128 Channels 
AVIRIS (JPL)  224 Channels 
GEOSCAN  20 Channels 
PURPOSE 
Vegetation Discrimination 
Mineral Exploration 
Pollution Detection 
back to table of contents
 


Compression/Decompression Techniques

Numerous methods have been developed for the compression of digital image data. The principal evaluation criteria for the analysis of compressed versus uncompressed imagery is whether a person can tell the difference between the images. A more implementable measure is the Root Mean Square (RMS) error between the original image and the image that has been compressed. Compression rates maybe generated by determining the size of the compressed image in terms of number of bits per image pixel for the original image.

        There are two categories of compression: lossless, and lossy.  Lossless compression means that you can achieve a certain compression factor and be able to exactly reproduce the original image. Lossy compression on the other hand allows some loss, but has the potential for much higher compression rates. Symmetry is related to the time an image takes to be compressed and decompressed.  Symmetric means that the time it takes to compress and decompress the image is the same.

COMPRESSION 
Symmetry 
                                
Symmetric 
Asymmetric 
Catagory 
Lossless        
    
Lossy           

In remote sensing imagery it is well known that there may be significant correlation between different bands of multispectral data. In image processing, a procedure called principal components has been designed to identify correlation between image bands and to create a new set of transformed bands that represent a new color space in which the new image bands are uncorrelated. Another type of transform coding represents images in terms of spatial frequency of certain base functions. Fourier transforms map an image into a spatial frequency image based on cosine and sin functions. Discrete Cosine Transforms (DCT's) map the same image to spatial frequency image based only on the cosine function. Each pixel may be represented by a series of trigonometric functions and coefficients derived from the images. If all terms of the transform's trigonometric functions are used, compression is minimal. As more terms are deleted, compression goes up, but the resulting compressed image develops certains artifacts of the procedure.

COMPRESSION  TYPE 
Lossless 
Run Length Coding 
Huffman Coding 
Lossy 
Joint Photographic Experts Commission 

(JPEG) - DCT 

Vector Quantization 

(VQ) 

   Fractal Coding 
Graphics Interchange Format 

(GIF) 

 
LOSSLESS COMPRESSION 
Advantages 
  Completely Preserves Image 
Can be used for Executables 
Decode and Encode Realtime with Hardware 
Disadvantages 
Low Compression Rate (2 to 4 factor) 
Image Degrades Rapidly at Higher Rates 
Software Implementation Requires CPU Resources 
back to table of contents


Types of Compression

Run Length Coding

Huffman Coding

Vector Quantization

Fractal

JPEG

GIF


back to table of contents


Run Length Coding

The run length coding stores the image in a sequences of pairs where the first element is the gray level and the second element is the length of the ocurrence of that gray value.  This coding can be reversible because the sequence of image elements can be reconstructed from the sequence of runs [12].

back to types of compression techniques


Huffman Coding

The Huffman code can be constructed by ordering  the input probabilities according to their magnitudes. These input probabilities are gotten from the histogram of the image in which  the probability of occurrence of gray levels within the image is calculated.  The Huffman code continues adding the two smallest probabilities generating a new set. In this way, the set of probabilities is decreased by one, and is ordered again.  Equal magnitudes can be ordered in any order.  The process stops when the set contains only two probabilities.  The decoding process is done by starting at the last couple of probabilities and working backwards.  The following example taking from "Digital Image Processing" [12] explains the process in a better way.
Input 

levels 

Input 

probabilities 

Step 

Step 

Step 

Step 

w1  0.4  0.4  0.4  0.4  0.4 
w2  0.3  0.3  0.3  0.3  0.6 
w3  0.1  0.1  0.1  0.3 
w4  0.1  0.1  0.2 
w5  0.06  0.1 
w6  0.04 
 
Step 1  Step 2  Step 3  Step 4 
w1  0.4 <- 1  0.4 <- 1  0.4 <- 1  0.4 <- 1  0.4 
w2  00  0.3 <- 00  0.3 <- 00  0.3 <- 00  0.3 

       <-0 

0.6 
w3  011  0.1 <- 011  0.1 <- 011  0.1 

      <- 01 

0.3 
w4  0100  0.1 <- 0100  0.1 

      <- 010 

0.2 
w5  01010  0.06 

        <- 0101 

0.1 
w6  01011  0.04 

The compact code is :

      H = (-0.4)log(0.4) - (0.3)log(0.3) - (0.1)log(0.1) - (0.1)log(0.1) - (0.06)log(0.06) - (0.04)log(0.04)

          = 2.14 bits.

back to types of compression techniques


Vector Quantization

Definition

Examples


back to types of compression techniques


Definition

Vector Quantization (VQ) is a type of encoding that defines a vector representation of non-overlapping area blocks within an image. A vector consists of values representing the data values for each pixel within the region. Using these vectors, clusters of vectors are derived using a spectral distance measure. A code book consisting of the clusters vectors is stored, representing the characteristics of the image. This process is numerically intensive and may be iterative.
VECTOR QUANTIZATION 
Advantages 
 
Potentially High Compression rates (20 to 40) 
Asymmetric Implementation (Faster Decode) 
Multispectral Implementation 
Disadvantages 
Requires Large Amounts of Training Data 
Encoding is Computationally Expensive 
Possible Problems with Extension to Other Areas 


back to Vector Quantization


Example

In this example, an image of Savannah, Georgia, has been compressed using the vector quantization technique. Three different compression factors were used to evaluate the differences between them (3.5, 8.0, and 10).  The first image of each row is the original image.  The second image is the image compressed, and the third image of each row is the difference between the original and the compressed-decompreessed image.  Each row is one different compression factor.
     
Original 
Compression factor 3.5 
Difference 
 
     
Original 
Compression factor 8.0 
Difference 
 
     
Original 
Compression factor 10.0 
Difference 


back to types of compression techniques


Fractal Compression

Definition

Examples


back to types of compression techniques


Definition

Fractal compression is based on Mandelbrot sets which take advantage of a self similar, scaling dependent, statistical feature of nature (Mandelbrot, 1983).  Fractal compression and decompression involves a clustering approach to find regions which show the same charateristics  as a sample region independent to rotation and scale.

The fractal image compresses images as recursive equations and instructions about how to reproduce them. The equations describe the image in terms of the relationships between its components.  The reduction in storage need is due to the fact that fractal compression saves equations and instructions instead of a pixel representation of the image.

Real-world images have fractal properties; for example an entire fern.  The entire fern looks like each of the fronds in it, each frond resembles the smaller fronds in it, and so on.  The more the fern is magnified, the more levels of these fronds are visible [1]. These fractal properties of the real-world images can be matematically represented. Fractal Transformation is the process developed to express a real-world image in terms of its fractal properties [2]

The following is a comparison between diferent compressions ratio with observed image quality.. A 20:1 ratio means that an image originally 900K will be compressed to 45K, which is one twentieth its original size [2]:

- 20:1 to 50:1 - High quality, with little or no observable loss of resolution to the human eyes.

- 50:1 to 90:1 - Moderate quality.

-100:1 and greater - Poor quality, suitable for thumbnails and previews.

Fractal compression has the following advantages and strengths [2]:

* Full 24 bit color images are the focus of this technique.

* Fractal compression is ideally suited to real world image compression, due to the inherent fractal nature of many natural images [3].

* The degree of compression can be traded off against compression time . Therefore, this tehcnique is ideal for creation of archives.

*  Fractal compression provides a high degree of compression. Compressed image size does not generally increase strictly linearly as the image size increases, it increases at a lower rate (ie. better effective compression for larger and larger images).

* Compresion is non symmetrical. Decompression takes significantly less time than compression. Decompression can also be significantly faster than JPEG.

* Fractal compression provides scalability/resolution independence - because the image is defined by a set of equations which can be arbitrarily scaled. It is not possible to create more information in the image as it is enlarged. For this reason, at a certain point during this process, image quality starts being sacrificed for size. This point is however always significantly higher than it is for JPEG or bitmapped images.

* Fractal compression can be used as a component in live video compression.

The weaknesses and disadvantages of fractal compression are [2]:

* It is not standard.

* The compression scheme is not documented in the public domain. This situation is currently being reviewed by Iterated Systems [4], and in the near future it is foreseen that the decompressor will be in the public domain. It is essential for source code to become widely available to general adoption.

* The software compression times are very long, unless hardware assisted.

*  It is not suited for repeated compression/decompression cycles due to its lossy nature.
FRACTAL COMPRESSION 
Advantages 
                   
Highest Potential Compression Rates (25 to > 100) 
Potential for Operating on Compressed Data 
Can Produce Imagery at Multiple Scales 
Realtime Compression with Hardware 
Disadvantages 
Software Compression is Time Consuming 
Less Compression for Complex Images 
Non Standard 


back to Fractal compression


Example:

This example takes an image and compressed/decompressed it once. (see the first row).  Then, the image is compressed/decompressed 100 times (see second row).
   
Original 
Compressed/decompressed one time 
 
   
Original 
Compressed/decompressed 100 times 


back to types of compression techniques


JPEG

Definition

Examples


back to types of compression techniques


Definition

JPEG stands for Joint Photographics Experts Group. It is a standard compression aimed to color or gray scale images with some degree of complexity (for example, photographs of the `real' world). JPEG is a lossy compression scheme. The greater the compression, the greater the degree of information loss. This can be determined by the user  who optimizes the trade-off between resultant image size and image quality. The algorithm exploits some of the ways in which the human eye perceives and analyzes images, so these compressed images still appear to be of high quality when looked at by human eyes . Times for compression/decompression are symmetric.

The algorithm is based on the forward discrete cosine transform (DCT), as applied to a block breakdown of the original image into 8 by 8 blocks, quantized down to a finite set of possible values, and then further transformed (run length encoding) and finally entropy encoded using Huffman or arithmetic coding [5].

With a  high quality JPEG compression factor, this technique produces an image 4 to 5 times smaller than GIF images.

JPEG compression shows the following advantages and strengths [2]:

* It provides support for full 24 bit color images.

* The user can determine the trade-off between image size and image quality.

* It is ideal for images of real world scenes, or computer generated images which are complex.

* It is platform independent for displaying 24 bit images. This compression technique is currently the most widely used with the algorithm and source code implementations on public domain [6].

* It provides fast compression time compared to fractal compression [7].

The weaknesses and disadvantages of JPEG are [2]:

* Blockiness results at high image compression ratios.

*JPEG compression produces poor image quality when compressing text or images containing sharp edges or lines. Gibb's effect is the name given to this phenomenon where disturbances/ripples may be seen at the margins of objects with sharp borders.

* It is not suitable for 1 bit black and white images.

* The degree of compression is greater for full color images than it is for gray scale images.

* It is not suitable as a strategy for images that are still in the process of editing because every compression/decompression cycle continues to lose information.

* It is not recommended for moving images/video.

* It is not resolution independent. Therefore, the image is displayed optimally depending on the resolution of the viewing device . [8]

JPEG 
Advantages 
             International Standards Organization Supported 
With Special Chips can be done in Realtime 
User Selectable Compression rate 
Disadvantages 
Lower Compression rates (4 to 10) 
Fast Degradation in Image Quality 
Symmetric Technique 
Individual Channel Encoding 

back to JPEG compression


Example:

This example shows an image of Savannah in which compression of 75% and 25% were done.  The first column on each row contains the original image.  The second column is the compressed-decompressed image. The third column is the difference between the original and the compressed-decompressed images.
     
Original 
Compression of 75% 
Difference 
 
     
Original 
Compression of 25% 
Difference 


back to types of compression techniques


GIF

Definition

Example


back to types of compression techniques


Definition

The Graphics Interchange Format is a lossless 8 bit/256 color protocol for "on-line transmission and interchange of raster graphic data in a way that is independent of the hardware used in their creation or display" [6].

GIF is based on LZW compression (Lempel-Ziv-Welch algorithm) [9,10,11]. There is however significant color loss in quantization of 24 bit images to 8 bits. The LZW technique was originally developed for compression of textual materials. This technique compresses files by substituting commonly ocurring character sequences with a reference to the first occurrence of that sequence [2].

GIF compression offers the following advantages and strengths [2]:

* It is lossless for 8 bit images (since no image degradation occurs, repeated compression/decompression cycles are possible. It is also suitable for images where information loss can not be tolerated).

* It is ideally suited to stylized images such as line drawings, or those which contain only a limited number of colours (for these images it can produce good compression ratios).

* It is widely used and supported with no runtime license required.

The weaknesses and disadvantages of GIF compression are [2]:

* It is not suitable for 24 bit images. When compressing such images, much of the color information is lost during the quantization process which reduces this to 8 bits. Good algorithms can however optimize this process so that the resultant image still has good quality from a human point of view.

* The compression ratios are low.

* It is not intended for moving images/video.

* It is not resolution independent.


back to GIF


Example:

In this example, an original image was compressed and decompressed in GIF format.
   
Orginal 
Compressed/deompressed int GIF format 
back to types of compression techniques


Conclusions



Back to Module 2 Main Page



References

 

1. Yuval Fisher,"Fractal Image Compression SIGGRAPH '922 Course Notes", The San Diego Super Computer Center, University of California.

2. Adrian Vanzyl, "Increasin Web Bandwidth through Image Comppression: An overview of GIF, KPEG and Fractal Compression Techniques", Unit of Medical Informaticcs. Monash University, e-mail:adrian.vanzyl@med.monash.edu.au.

3. B.B. Maandelbrot, "Fractal Geometry of Nature", W.H. Freeman and Co, New York, 1982.

4. Iterated Systems Inc, 5550A Peachtree Parkway, Suite 650, Norcross, GA 30092.

5. M.F. Barnsley, L.P. Hurd, "Fractal Image Compression", AK Peters Ltd, 1993.

6. Geographics Interchange Format, Programming reference, Version 89a, Compuserve Incorporated, Graphics Technology Department, 5000 Arlington Center Boulevard, Columbus, Ohio, 43220.

7. B. Simon, "How  Lossy Coompression Shrinks Image Files", PC Magazine, July 1993.

8. D. Marinir, "Image files comparing JPEG and Fractal Compression, available from ftp://ftp.dsi.unimi.it/pub/imaging/fractal_compression/images.

9. M.R. Nelson, "LZW Data Compression". Dr. Dobb's Journal, October1989.

10. J. Ziv and A. Lempel, "A Universal Algorithm for Sequential Data Compression", IEEE Transactions on Information Theory, May 1977.

11. T. Welch, "A Technique for High-Perfornace Data Compression", Computer, June 1984.

12. Rafael C. Gonzalez, Paul Wintz, DIgital Image Processing, Addison-Wesley Publishing Company, Inc., 1987.