A description about image Compression. What are types of redundancies, which are there in images. Two classes compression techniques. Four different lossless image compression techiques with proper diagrams(Huffman, Lempel Ziv, Run Length coding, Arithmetic coding).
● The objective of image compression is to reduce irrelevance and
redundancy of the image data in order to be able to store or transmit
data in an efficient form.
● Sometimes the given data contains data which has no relevant
information,or restates/repeats the known information: Data
Need of compression...
What are the data
Redundancies used in
There are three main data redundancies used in image compression:
● Coding redundancy: The uncompressed image usually is coded with each
pixel by a fixed length.
➔ Using some variable length code schemes such as Huffman coding and
arithmetic coding may produce compression.
● Interpixel redundancy: Spatial redundancy,it exploit the fact that an
image very often contains strongly correlated pixels, large regions whose
pixel values are the same or almost the same.
● Psychovisual redundancy: Human eye does not respond with equal
sensitivity to all incoming visual information.
➔ Some piece of information are more important than others.
➔ Removing this type of redundancy is a lossy process and the lost
information can not be recovered.
Types of compression:
● In lossless data compression, the integrity of the data is preserved,i.e. no
part of the data is lost in the process.
● Lossless compression methods are used when we cannot afford to lose
● Lossy compression can achieve a high compression ratio, since it allows
some acceptable degradation. Yet it cannot completely recover the
1. Transforms the original image to
some other format in which the
inter-pixel redundancy is reduced.
2. Use an entropy encoder to remove
the coding redundancy.
The lossless decompressor is a perfect
inverse process of the lossless
Huffman coding assigns shorter codes to symbols that occur more frequently
and longer codes to those that occur less frequently.
Character A B C D E
Frequency 17 12 12 27 32
● It can be used to compress data made of any combination of symbols.
● It does not need to know the frequency of occurrence of symbols.
● The method is to replace consecutive repeating occurrences of a symbol
by one occurrence of the symbol followed by the number of occurrences.
The method can be even more efficient if the data uses only two symbols (for
example 0 and 1) in its bit pattern and one symbol is more frequent than the
A sequence of source symbols is assigned to a sub-interval in [0,1) which can
be represented by an arithmetic code.
For example, message: a1a2 a3 a3 a4
1) Start with interval [0, 1) :
Source symbol Probability
2) Subdivide [0, 1) based on the probabilities of
Source Symbol Probability Initial Subinterval
a1 0.2 [0.0, 0.2)
a2 0.2 [0.2, 0.4)
a3 0.4 [0.4, 0.8)
a4 0.2 [0.8, 1.0)
0.2 0.2 0.4 0.2
Encode a1 a2 a3 a3 a4
(must be inside sub-interval)
● It is an example of a category of algorithms called dictionary-based
● The idea is to create a dictionary (a table) of strings used during the
● If both the sender and the receiver have a copy of the dictionary, then
previously-encountered strings can be substituted by their index in the
dictionary to reduce the amount of information transmitted.