Unit 7
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.
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
·
repetitive data.
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
-
Coding redundancy
redundan
·.
Psycho visual
redundancy.
·
*
Coding redundancy
·
Information represented in different
codes.
forms of
·
code
Technique assigns unique
·
a
to
symbols of message/pixels of image.
wrongchoicecreates
addictionis
unnecessary
·
called
extra bite are
redundancy.
·
⑤Inter pixel
redundancy.
·
redundary
· single pine is redundant, can be guessed from
the values of its
neighbours,
Psycho-visual redundancy
A
·
related to vision
image,
that
Deals
information
with is
·
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.
decompressed image.
2. Smaller the error value, better
the
quality of the compressed image.
ratio.
-
Peak
signal to noise
* Mean squared error.
used data.
for 24
->
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
=
image
esrz=5 I
JEEERis Peace
E"z [flecy)-fccessa
· Peak
Signal to Noise Ratio
PSNR=10logi E5
·
Excellent
&
-high quality of image
3
Fine
Image of acceptable
2.
qualityinterfere
Passable
waitasonable
3.
4.
Marginal
Inferior imagequalityobjectional
is
5.
poor
-
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
·
consists
image compression system of 2 main
·
blocks
encoder compressor
anout
·
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
-
is lost.
-
No part of data
·
some
to
aims the
minimize
date
a
-
·
Lossless Compression Techniques
1.
Dictionary
based techniques
2. Statistical based techniques
Based Technique
1.
Dictionary
·
@ 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
-
2. B 5 6
6,4
H I -
H
·
first code
specifies the
gray
value
followed by length of run.
* Drawbacks of RLC
-
At times, double of size of file.
Example:1, 2, 5, 3,
·
12.
1121513112 I
·
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
·
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
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
Lossy compression
Many
·
methods of
lossy compression have
been developed
· A
family ofhas
techniques known Transform
as
to be most valuable.
coding proven
·
Discard the
pinel coefficients that are
nearly zero.
reconstructed
When
images are
using
·
continuous tone
images.
·
JPEG -
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
hierarchial coding.
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
-