5 Image Compression 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Image Compression

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.

Compression is achieved by the removing one of the following redundancy:


1. Coding
2. Inter-pixel
3. Perceptual

(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

ADVANTAGES OF IMAGE COMPRESSION


The benefits of image compression can be listed as follows:
1. Cost for transmitting an image as data reduces at much extent as cost depends upon
duration for which data is being transmitted.
2. It saves computing power as execution of image transmission takes very less time if the
size is lesser.
3. It reduces the transmission errors since fewer bits are transferred.
4. Secure level of transmission is possible due to encoding and compressing the image

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

LOSSY COMPRESSION TECHNIQUES


Images
Reduce resolution
Reduce number of colors
Duplicate similar areas

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

RUN – LENGTH ENCODING


Applies when data is highly repetitive

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

Now the sentence becomes


1 2 DIE TOM3ROW, LEARN 2 1 F3EVER
This new sentence is now 34 memory units

Example 2
11118888885552277777777

How many of the same item occurs followed by the value of the item
4168352287

You might also like