Professional Documents
Culture Documents
5 Image Compression 1
5 Image Compression 1
5 Image Compression 1
Image compression is the process of encoding or converting an image file in such a way that it
consumes less space than the original file.
The objective of compression is to reduce the number of bits as much as possible, while keeping
the resolution and the visual quality of the reconstructed image as close to the original image as
possible.
(i) Coding Redundancy: Usually the uncompressed image is coded with each pixel by a fixed
length code word. For example, an image with 256 gray values is represented by an array of
8-bit integers. By making use of some variable length code schemes such as Huffman
coding and arithmetic coding, compression can be achieved, i.e. by assigning less number of
bits for more frequent gray levels and more number of bits for less frequent gray levels, then
the entire image can be represented by least possible number of bits. In this way we can
reduce the coding redundancy.
(ii) Inter-pixel Redundancy: It is a redundancy related to statistical dependencies among pixels,
especially between neighboring pixels. Information is unnecessarily replicates in the
correlated pixels.
(iii) Psycho-visual Redundancy: It is a redundancy corresponding to different sensitivities of
human eyes to all image signals. Therefore, eliminating some less sensitive information
from the image based on our visual processing may be acceptable
1
TYPES OF IMAGE COMPRESSION
The image compression techniques are broadly classified into two categories.
These are:
1) Lossy techniques
2) Lossless techniques
LOSSY COMPRESSION
Redundant information is permanently eliminated
This can apply to phots, music and videos
Audio
Reduce sample rate
Reduce sample depth
Reduce higher and lower frequencies
Video
Reduce resolution
Reduce number of colors
Duplicate similar areas
Reduce frame rate
LOSSLESS COMPRESSION
Every bit of data is preserved when compressed and is restored after being uncompressed
This is usually used for text files and spreadsheets
Example
LIVE AS IF YOU WERE TO DIE TOMORROW
LEARN AS IF YOU WERE TO LIVE FOREVER
2
This consist of 74 memory units including spaces and punctuations
To compress a compression algorithm can use a data dictionary to store repeated groups of
characters in a sentence.
The data dictionary can store the groups and replace the ones in the text with numbers
LIVE – 1
AS IF YOU WERE TO – 2
OR – 3
Example 2
11118888885552277777777
How many of the same item occurs followed by the value of the item
4168352287