CSE 456 Digital Image Processing
CSE 456 Digital Image Processing
Image Compression
Presented by
Dharmatej Mallampati
AP22110011085
Image Compression
Data compression refers to the process of reducing the amount of data required to
represent given quantity of information.
Sometimes the given data contains some data which has no relevant information or
repeats known information. It is thus set to contain data redundancy.
Data compression aims to reduce the amount of data while preserving as much
information as possible.
Redundant Data
Image
Information
Consider a movie which is in the format 720p (1280 x 720) of duration 2 hrs and a frame
rate of 60fps.
1 rgb → 3 bytes
movie → 1280 x 720 x 3
movie with frame rate → 1280 x 720 x 3 60 fps = 158.2MB
This size is very much higher, causing difficulty to share and view
Compression Ratio
Compression
Data Set 1 Data Set 2
(Image) (Compressed Image)
n1 bits n2 bits
1 n1
R=1- C= Compression Ratio
|
|
C n2
Image Compression involves reducing the size of image data files, while retaining
necessary information
Retaining necessary information depends upon the application
Compression Ratio
Compression
Data Set 1 Data Set 2
(Image) (Compressed Image)
n1 bits n2 bits
1. Coding Redundancy
2. Interpixel Redundancy
The 8 - bit codes that are used to represent the intensities in most 2D intensity arrays contain
more than are needed to represent the intensities.
Coding Redundancy is present when the codes assigned to intensity values do not take full
advantage of their probabilities of occurence.
A natural binary encoding assigns the same number of bits to both the most and least
probable values, failing to minimize & resulting in coding redundancy
Coding Redundancy :
Code word : a sequence of symbols used to represent some information (Gray levels)
k =0
l-1
Lavg = 8 x pk (rk ) = 8 x 1 = 8 bits
M
k =0
256 x 256 x 8 1
C= = 4.42 R=1- = 0.774
256 x 256 x 1.81 4.42
In this example the suggested variable-length coding gets rid of the ~78% redundant data of
the fixed 8-bit code.
The following graph shows the relationship between the histogram of an image, pr(rk) and l2(rk)
which are inversely proportional.
The shortest code words are assigned to the most frequent (high probability) gray levels
The longest code words are assigned to the least frequent (low probability) gray levels
Interpixel redundancy implies that pixel values are correlated i.e, a pixel value can be
reasonable predicted by its neighbours.
The resulting compression ratio and respective relative redundancy is given by:
The relative redundancy is %62 obtained only by using correlation among the pixels
(interpixel dependencies) in the given image.
This method can be extended to gray level images.
Psychovisual Redundancy
Certain information has relatively less importance for the quality of image perception. This
information is said to be psychovisually redundant.
Unlike coding and interpixel redundancies, the psychovisual redundancy is related with
the real/quantifiable visual information. Its elimination results a loss of quantitative
information. However psychovisually the loss is negligible.
Removing this type of redundancy is a lossy process and the lost information cannot be
recovered.
The method used to remove this type of redundancy is called quantization which means
the mapping of a broad range of input values to a limited number of output values.
Psychovisual Redundancy
The following example shows how an 8-bit image can be reduced to 4-bit image.
Psychovisual Redundancy
The improved gray-scale quantization (IGS) is one of the possible quantization procedures and
summarized in the following table.
IGS Steps :
Add least significant nibble (4 bits) of the previous sum to the current pixel value.
If the most significant nibble (MSN) is all 1s (1111), just add zero.
The new MSN becomes the 4-bit quantized output.
Quality Measure of a Compressed Image (Fidelity Criteria)
Example:
PSNR > 40 dB → excellent quality
30–40 dB → good
< 30 dB → visible distortion
The subjective quality measures:
These involve human observers who visually inspect and rate image quality.
Common in medical imaging, photography, video streaming.
Example: asking people to rate how natural or sharp an image feels.
Thank You