0% found this document useful (0 votes)
4 views20 pages

CSE 456 Digital Image Processing

The document discusses image compression, which reduces data size while preserving information, highlighting the need for compression due to large file sizes in formats like 720p video. It explains types of data redundancy, including coding, interpixel, and psychovisual redundancy, and their impact on compression ratios. The document also covers methods for measuring image quality post-compression, emphasizing both objective metrics like PSNR and subjective assessments by human observers.

Uploaded by

dharmatej0504
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views20 pages

CSE 456 Digital Image Processing

The document discusses image compression, which reduces data size while preserving information, highlighting the need for compression due to large file sizes in formats like 720p video. It explains types of data redundancy, including coding, interpixel, and psychovisual redundancy, and their impact on compression ratios. The document also covers methods for measuring image quality post-compression, emphasizing both objective metrics like PSNR and subjective assessments by human observers.

Uploaded by

dharmatej0504
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

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.

data : means by which the information is conveyed

Same information can be represented by various amounts of data.

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

Image = Information + Redundant Data


Need for Image Compression

Consider a movie which is in the format 720p (1280 x 720) of duration 2 hrs and a frame
rate of 60fps.

The Original Size:

1 rgb → 3 bytes
movie → 1280 x 720 x 3
movie with frame rate → 1280 x 720 x 3 60 fps = 158.2MB

158.2 MB is for 1 second

Total Size for entire duration = 60 x 60 x 2 x 158.2MB = 1113GB

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

Relative data redundancy of the representation with n1 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

if n1 = n2, then C = 1 and R = 0 → No Redundant Data


1 n1
R=1- C=
|

C n2 A typical compression ration around 10 or (10:1)


indicated that 90% of the data in the first data set is
redundant
Types of Data Redundancy

There are three main types of data redundancies in image compression

1. Coding Redundancy

2. Interpixel Redundancy

3. Psycho visual Redundancy


Coding 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: a list of symbols ( letters, numbers, bits, etc )

Code word : a sequence of symbols used to represent some information (Gray levels)

Code word length : number of symbols in a code word

rk : Input Intensity Values : 0 to 255


l ( rk ) : number of bits required to represent rk

Average number of bits required to represent each pixel is :


l-1
Lavg = l(rk ) x pk (rk )
M

k =0

Total number of bits required to represent a M x N image is MNLavg

Coding Redundancy tries to reduce Lavg


Coding Redundancy :

In the intial case : l(rk ) = 8

l-1
Lavg = 8 x pk (rk ) = 8 x 1 = 8 bits
M

k =0

for code 1 : Lavg = 8


for code 2:

Lavg = 0.25(2) + 0.47(1) + 0.25(3) + 0.03(3) = 1.81 bits

The resulting compression and corresponding relative redundancy are :

256 x 256 x 8 1
C= = 4.42 R=1- = 0.774
256 x 256 x 1.81 4.42

Thus 77.4 % data in the original 8-bit 2D intensity array is redundant


Coding Redundancy :

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

Data compression is achieved by


assigning fewer bits to more probable gray
levels than the less probable gray levels.

r 87 r 126 r186 r255


Interpixel Redundancy

Interpixel redundancy implies that pixel values are correlated i.e, a pixel value can be
reasonable predicted by its neighbours.

Given a 1024x343 binary image

Consider a line crossing the image at line


100
The respective line of 1024 bits can be
represented by the Run-length code given
at the bottom.
Note that in this line there is 8 regions that
are 1 or 0 with the specified run-length.

Total of 11 bits (1 bit for thresholded value and


10 bit for the run length) can be used to
represent each of these 8 neighborhoods.

Line 100: (1,63)(0,87)(1,37)(0,5)(1,4)(0,556)(1,62)(0,210)


Interpixel Redundancy

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)

The removal of psychovisual redundancy removes real/quantitative information and provides


lossy image compression.

The quality of such images can be evaluated by objective and subjective


methods.

The objective quality measures:


Higher PSNR = Better quality
Lower PSNR = More distortion

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy