Transform Coding
Transform Coding
PROCESSING
Lossy Image compression II DIP DAY 30 26-03-2015
DIP DAY 30 26-03-2015
Learning Objectives
• Explain Transform coding approach for
Lossy image compression.
Introduction
• Transform Selection
• Bit allocation
DIP DAY 30 26-03-2015
• Transform Selection
Transforms
• Discrete Fourier Transform
• KL Transform
• Wavelet Transform
2-D Walsh Transform
N1 N1 n 1
1
f ( x, y )
N
u 0
W
v 0
(u , v ) ( 1) bi ( x ) bn 1 i ( u ) bi ( y ) bn 1 i ( v )
i 0
N1
(2 x 1)u
f ( x) a (u )C (u ) cos
u 0 2N
• Where
▫ x = 0,1,……N-1
▫ u = 0,1,……N-1
1
N u 0
a (u )
2
u 1, , N 1
N
1 1 1 1
0.924 0.383 0.383 0.924
0.707 0.707 0.707 0.707
0.383 0.924 0.924 0.383
DIP DAY 30 26-03-2015
DIP DAY 30 26-03-2015
N 1N 1
(2 x 1)u (2 y 1)v
f ( x, y ) a (u )a (v)C (u , v) cos cos
u 0 v 0
2N
2N
u , v 0,1, , N 1
DIP DAY 30 26-03-2015
2-D DCT Basis Images
v
0 1 2 3
3
DIP DAY 30 26-03-2015
DCT-Advantages
• The DCT is a real and orthogonal transform.
• It is a separable transform.
Example
• Example: x(n) = [1 2 3 4]
• C(k) = [5 -2.23 0 -0.16]
• Reconstruction with first 2 coefficients
▫ x(n) = [1.04 1.89 3.10 3.96]
• With DFT:
• X(k) = [10 -2+ 2i -2 -2- 2i]
• Reconstruction with first 2 coefficients
▫ x(n) = [1.5 1.5 3.5 3.5]
Example:2-D
BIT ALLOCATION
DIP DAY 30 26-03-
2015
ˆ T (u , v)
T (u , v) round
Z (u , v )
where,
Tˆ (u , v) thresholde d and quantized approximat ion of T (u , v).
Z (u , v) element of the transform normalization array.
DIP DAY 30 26-03-2015
DIP DAY 30 26-03-
2015