2. Need for Compression:
Huge amount of digital data
Difficult to store and transmit
Solution:
Reduce the amount of data required to represent a digital image
Remove redundant data
Transform the data prior to storage and transmission
Categories:
Information Preserving
Lossy Compression
3. Data compression
Difference between data and information
Data Redundancy
If n1 and n2 denote the number of information-carrying units
in two datasets that represent the same information , the
relative data redundancy RD of the first dataset is defined as
RD = 1-1/CR ,
where CR = n1/n2 is called the compression ratio
4. In digital image compression, three basic data
redundancies can be identified and exploited:
Coding Redundancy
Interpixel Redundancy
Psychovisual Redundancy
Fidelity Criteria
5. Let a discrete random variable r k in [0,1] represent the gray
levels of an image.
pr(rk ) denotes the probability of occurrence of r
Pr(rk) = nk / n , k=0,1,2,….L-1
If the number of pixels used to represent each value of rk is
l(rk ), then the average number of bits required to represent
each pixel is
L-1
Lavg = £ l(rk)pr(rk)
k=0
CODING REDUNDANCY
6. Hence, the total number of bits required to code an MxN image is
MNLavg
For representing an image using an m-bit binary code , Lavg= m.
Example of variable length coding
7. Related to interpixel correlation within an image.
The value of a pixel in the image can be reasonably predicted
from the values of its neighbors.
Information carried by individual pixels is relatively small.
These dependencies between values of pixels in the image
are called interpixel redundancy
8.
9.
10. Based on human perception
Associated with real or quantifiable visual information.
Elimination of psychovisual redundancy results in loss
of quantitative information. This is referred to as
quantization.
Quantization - mapping of a broad range of input values to a
limited number of output values.
Results in lossy data compression.
15. Encoder - Source encoder + Channel encoder
Source encoder
Removes coding, interpixel, and psychovisual
redundancies in input image and outputs a set of symbols.
Channel encoder
To increase the noise immunity of the output of source
encoder.
Decoder - Channel decoder + Source decoder
16. Mapper
• Transforms input data into a format designed to reduce interpixel redundancies
in input image.
• Reversible process generally
• May or may not reduce directly the amount of data required to represent the
image.
Examples
• Run-length coding(directly results in data compression)
•Transform coding
17.
18. Essential when the channel is noisy or error-prone.
Source encoded data - highly sensitive to channel noise.
Channel encoder reduces the impact of channel noise by
inserting controlled form of redundancy into the source
encoded data.
Example:
Hamming Code – appends enough bits to the data being
encoded to ensure that two valid code words differ by a
minimum number of bits.
19. 7-bit Hamming(7,4) Code
7-bit code words
4-bit word
3 bits of redundancy
Distance between two valid code words (the minimum number
of bit changes required to change from one code to another) is
3.
All single-bit errors can be detected and corrected.
Hamming distance between two code words is the number of
places where the code words differ.
Minimum Distance of a code is the minimum number of bit
changes between any two code words.
Hamming weight of a codeword is equal to the number of non-
zero elements (1’s) in the codeword
20. The 7-bit Hamming (7,4) code word h1,h2,….h5,h6,h7
associated with a 4-bit binary number b3,b2,b1,b0 is
21. The principal objectives of digital image compression to
describe the most commonly used compression methods that
form core of technology as it exits currently.
Gray – scale imagery , compression methods are playing an
increasingly important role in document image storage and
transmission.