0% found this document useful (0 votes)
3 views22 pages

Unit 7

Image compression is the process of reducing the amount of data required to represent an image, which is essential for efficient storage and transmission. It involves techniques to eliminate redundancy, such as spatial and temporal redundancy, and can be categorized into lossless and lossy compression methods. Standards like JPEG are commonly used for compressing continuous tone images, while binary images can be effectively compressed using simple schemes like run-length encoding.

Uploaded by

gipalaj384
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)
3 views22 pages

Unit 7

Image compression is the process of reducing the amount of data required to represent an image, which is essential for efficient storage and transmission. It involves techniques to eliminate redundancy, such as spatial and temporal redundancy, and can be categorized into lossless and lossy compression methods. Standards like JPEG are commonly used for compressing continuous tone images, while binary images can be effectively compressed using simple schemes like run-length encoding.

Uploaded by

gipalaj384
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/ 22

Unit 7

1) What is
Image compression?
Ans)
Image compression is the
process of
reducing the amount of data required
to
represent an
image.

Image Compression
Transmit (channes
fre,y) -> Compress > Decompress fic,y)
-

2 f
store
retrieve

storage
device

compression provides
Image and case of storage
transmission.

Uncompressed original data

BBBBAAA2I2

compressed data
#
B04A03204
Image
10 10

20
20
Compressed data 10032006.
-

20 20

1 20 10

A
Compression Fundamentals

Image training
compression reduce of
s the nation
ize
·

Retaining info depends on the applications


compression: uncompressed image fill
ratio
compressed image file.

compression can be achieved as we

have a lot redundant data


of in
any
information
·

Dater-information + redundant data.


⑪ Data
redundancy
-
no relevant information
-

repetitive data.

Compression -> reduce amount


of data
by
reducing the
redundancy.

featuresshouldbe unchange of
· the

Types or

redundancy L
Spatial Temporal
redundancy redundancy
① Spatial Redundancy (for image & video)

videos
-
Present in
of images and
areas

pixel values
values
by small thin
·

vary are

a structure

Examples - of blue
Image sky
-

⑧ Temporal Redundancy (for video


Present video where there
-
in
signals,
is
similarity between two frames
-

If frames are similar and small, it


is
inefficient to
compress a video
series
signal as a
of image.

* Basic Data Redundancies

Coding redundancy
redundan
·.
Psycho visual
redundancy.
·
*
Coding redundancy
·
Information represented in different
codes.
forms of
·

Coding techniques to convert


information
into acode.

code
Technique assigns unique
·
a

to
symbols of message/pixels of image.

wrongchoicecreates
addictionis
unnecessary
·

called
extra bite are
redundancy.
·

⑤Inter pixel
redundancy.
·

Neighbouring pinels in the same


image
are correlated

· Inter pinel correlation is called as

inter-pixel spatial redundancy.


· Inter pixel redundancy in successive
frames of videointer pinel temporal
a

redundary
· single pine is redundant, can be guessed from
the values of its
neighbours,

Psycho-visual redundancy
A

·
related to vision

eliminate levels that do not


grey
·

affect the interpretation of the

image,
that
Deals
information
with is
·

redundant based, on human vision

levels reduced by
Eg: grouping to
· 256 are
16 levels, objects are
still
recognizable.
This irreversible.
compression is
·

A
Fidelity
·
The
degree of cractness with which
the data is reproduced.
used to determine important information
·

retain when
to
compressing file
·

Fidelity
1
Criteria.
objective fidelity criteria
criteria.
2 subjective fidelity
Objective
·
fidelity Criteria.

Measure the amount inthe


1.
of error

decompressed image.
2. Smaller the error value, better
the
quality of the compressed image.

Error Metrics / Objective


Fidelity.Criteria
·

Mean squared error.


to ratio
signal noise
-

ratio.
-
Peak
signal to noise
* Mean squared error.
used data.
for 24
->

fluzy) and reconstructed


image - "luy)
-

emse: () Eifencys-fansys]
M: number ofrows

N= number of columns
·van
squared error

come:
E Ettines cases)
-

m= number
of news
column
n number
of
=

Signal to Noise Ratio (SNR)


SNR.: Signal power: Is
Noise power Pa

input image, fu, y)

signal power-m* ifrmp)


Reconstructed f(n, y)
=

image
esrz=5 I
JEEERis Peace
E"z [flecy)-fccessa
· Peak
Signal to Noise Ratio

PSNR=10logi E5
·

Subjective Fidelity Criteria

Excellent
&
-high quality of image

3
Fine
Image of acceptable
2.

qualityinterfere
Passable
waitasonable
3.

4.
Marginal
Inferior imagequalityobjectional
is
5.
poor
-

6. Unusable- Bad viewed.


image, cannot be
2x2 Find RMSC.
image.
*

Original Reconstructed
54 4 4
2 B I 2

2
RMSE=V1/4 (5-4)2 +14-4)2 + 12-117+ 13-2)

=Fir
General Image Compression Modele
·

redundan
encoderremove test of symbols
Channel encoder improves the noise
immunity
-
·

robustness
ensure
against
-

channel noise.
Channel decoder - back the
original
·

decoder
get
source
signal

Run
·

or
length
reduce
is used to
eliminating
coding interpixel redundancy.
is used to eliminate
Huffman encoding
·

and reduce redundancies


coding

③General Image Compression Modele


·

Compression types: lossy, Lossless

consists
image compression system of 2 main
·

blocks

encoder compressor
anout
·

image f(y) -> i encoded by the encoder

making it easy for transmission.


·
The decoder receives the transmitted
and
signal reconstructs the output
image fluzy).
·

If the system is an error


free one

fee,y) will be a replica of fluzy)

A
Classification of data Compression techniques
X Reconstruction
#
>Compression XC
- >
Algorithm Algorithm
Compression

Error free
L
sy
compression
Compression
x FY
X =
Y

·
Lossless Data Compression
-

Integrity of the data is preserved.


Data after compression and
-

decompression are the same

is lost.
-
No part of data
·

Lossy Data Compression


-
Loss of some
fidelity is acceptable,

critical data.by losing


-
Data is
compressed or

some

to
aims the
minimize
date
a
-
·
Lossless Compression Techniques
1.
Dictionary
based techniques
2. Statistical based techniques

Based Technique
1.
Dictionary
·

Images consist of recurring patterns


is to keep
·
efficient way dictionary a

of frequently occuring patterns. -

@ when these
encoded
patterns
with
appear
to
they are a
reference
the
dictionary
We split the
image pixels into two
·

parts
frequently occuring patterns
->
infrequently occuring patterns
-

Example of Dictionary based encoding.


Run length
coding
·

2. B 5 6
6,4
H I -
H

·
first code
specifies the
gray
value
followed by length of run.

Hence the RLE of the


first row -235664

* Drawbacks of RLC

-
At times, double of size of file.
Example:1, 2, 5, 3,
·
12.

1121513112 I
·

RLE code is double than that of original


sequence
·

Hence, RLE should only be used if


we have the same
grey
value repeated.

Statistical method of
lossless
compression technique

·Huffman coding
· It is a lossless statistical method
· most
often
bits,
characters are
assigned
few
rarely characters are
occuring
·

less bits
assigned
·

steps of Huffman coding.


① for the
given grey levels, write down the
list of probabilities
of sort the list in
descending order

⑧ Add the smallest (last) I probabilities


& the
probabilities and
Again the
sort

repeat
value is left.
process until just one
a) Compute
date
Huffman code
for the
given
·

E1, 1, 1, 1, 1, 3, 1,2,2,2,2,2,2, 3, 3, 3, 3, 4, 4, 4. 4,

5, 5, 5, 6, 6, 73
S; M; Pi=n;/ total count

I
T 7/28 = 0.25

3
2
6/28 = 0.21

(28 0.18

3
5 =

4 128 =
0.14
3/28 =
0.11

2
2/28
=
0.07

eB
7 I 1/28 =
0.04

So Pi D

I 0.25
z
2 0.21

G 0.18
4 0.14
5 8 II

G ooz0.22 -
Do 1I
#7 80 C
I
I ⑦

0.57 0.43

I 8
I

0.32 0.25 002l


0.22
o
S D
1
/
8.18 0014
Do I
Poll
O
I
0.07 0.04

Si Huffman Code

I 1 O

2 &O

3
1 I I
110
01 I

G O10)
O 10 O
Image Compression standards.

Data Compression
methods

lossless Methods lossy methods


. Y
Run Huffman Tempel
length ziv JPtG MPtG Mp3

Lossy compression
Many
·
methods of
lossy compression have
been developed
· A
family ofhas
techniques known Transform
as

to be most valuable.
coding proven

Transform coding method


·

·
Discard the
pinel coefficients that are

nearly zero.
reconstructed
When
images are
using
·

inverse transform, we get compressed


image in which little transformation
is lost.

·Image compression standards

continuous tone
images.
·

JPEG -

compress and code continues tone


-

and
monochecome color images of res

and to standard
-very simple
based easy discrete
use

that is on cosine

transform
- does not handle bi-level (black &
White
images very well.
Advantage of JPEG, allowing the
-

user

2 main modes: called baseline


Cossy:
-

lossless: produces compression


ration
-Most
mode
implementations support just the
lossy
mode includes &
lossy progressive
-

hierarchial coding.

JPEG, compression method, not a


-

complete standard for image


representation.

Image Compression for Binary image


-

Binary image only black & white pixels


-

Also called bi-level.


->

each
pinel is stored as a
single bit
be stored
binary image can in
-

memory
as a bitmap.
-

Binary
well
images
with
also
compress
simple run
length.
Binary
image compress well with
-

simple run length compression schemes

You might also like