Digital Image Processing
Lecture – Image Compression
C O U R S E T E AC H E R:
M D . RAY H A N A H M E D
RAY H A N @ C S E . U I U . AC . B D
Data and Information
Data are the means by which information is conveyed.
Various amounts of data can be used to represent the same amount of information,
representations that contain irrelevant or repeated information are said to contain redundant data.
Information is an interpretation of the data in a meaningful way. Information is an elusive
concept; it can be application specific.
Data not equal to Information.
For digital images, data refers to the pixel gray level values that correspond to the brightness of
a pixel at a point in space.
The term data compression refers to the process of reducing the amount of data required to
represent a given quantity of information.
Image Compression
The field of image compression continues to grow at a rapid pace.
Image compression is a method that reduces the amount of memory it takes to store in image, while retaining necessary
information.
Information retention depends on the applications.
As we look to the future, the need to store and transmit images will only continue to increase faster than the available
capability to process all the data.
Applications that require image compression are many and varied such as:
1. Internet,
2. Businesses,
3. Multimedia,
4. Satellite imaging,
5. Medical imaging
Can You Tell the Difference?
Original Compressed
Image Compression
Original Compressed
Image Compression
If C = 10 (sometimes written 10:1), for instance, the larger representation has 10 bits of data for every 1
bit of data in the smaller representation. The corresponding relative data redundancy of the larger
representation is 0.9 (R = 0.9), indicating that 90% of its data is redundant.
Image Compression
The reduced file created by the compression process is called the compressed
file and is used to reconstruct the image, resulting in the decompressed image
The original image, before any compression is performed, is called the
uncompressed image file
The ratio of the original, uncompressed image file and the compressed file is
referred to as the compression ratio
The compression ratio is denoted by:
(c) Scott E Umbaugh, SIUE 2005 8
The reduction in file size is necessary to meet the bandwidth requirements for
many transmission systems, and for the storage requirements in computer
databases
Also, the amount of data required for digital images is enormous
(c) Scott E Umbaugh, SIUE 2005 9
Image Compression
There are two primary types of image compression methods:
1. Lossless compression methods:
• Allows for the exact recreation of the original image data, and can compress complex
images to a maximum 1/2 to 1/3 the original size – 2:1 to 3:1 compression ratios.
• Preserves the data exactly.
2. Lossy compression methods:
• Data loss, original image cannot be re-created exactly
• Can compress complex images 10:1 to 50:1 and retain high quality, and 100 to 200 times
for lower quality, but acceptable, images
(C) SCOTT E UMBAUGH, SIUE 2005 10
Image Compression
Types of data redundancy
Coding redundancy: A code is a system of symbols (letters, numbers, bits, and the like) used to
represent a body of information or set of events. Each piece of information or event is assigned a
sequence of code symbols, called a code word. The number of symbols in each code word is its
length. The 8-bit codes that are used to represent the intensities in most 2-D intensity arrays
contain more bits than are needed to represent the intensities
Spatial and temporal redundancy: Because the pixels of most 2-D intensity arrays are
correlated spatially (i.e., each pixel is similar to or dependent upon neighboring pixels),
information is unnecessarily replicated in the representations of the correlated pixels. In a video
sequence, temporally correlated pixels (i.e., those similar to or dependent upon pixels in nearby
frames) also duplicate information.
Irrelevant information: Most 2-D intensity arrays contain information that is ignored by the
human visual system and/or extraneous to the intended use of the image. It is redundant in the
sense that it is not used.
Coding redundancy - basics
Spatial and temporal redundancy
Irrelevant information
Coding redundancy
Coding redundancy
Coding redundancy
Coding redundancy – Huffman Coding
Huffman Coding
Huffman Coding
Huffman Coding - Exercise