Title: Image Compression
1 DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY OF
JOENSUU JOENSUU, FINLAND
- Image Compression
- Lecture 15
- Transform Coding KLT, DCT
- Alexander Kolesnikov
2Transformation
- The main goal of transformation is decorrelation
of data.
C
X
Q(Y)
Y
Transformation
Quantization
Encoding
Model
3Correlation matrix
i
j
where E? is mathematical expectance (average
value)
is mean value (average) of the signal x
is variance of the input signal x
4Karhunen-Loeve Transform (KLT)
- Find eigenvectors and eigenvalues ?j for
- correlation matrix R
- Construct orthonormal basis with transform
matrix T
- Transform x into new basis
5Independence of KLT coefficients
KLT coefficients y are decorrelated!
6KLT Example for N2
2. Find eigenvectors
1. Find eigenvalues
7KLT Example for N2
3. Normalization
8KLT Example for N2
4. Check orthogonality
9KLT Example for N2
5. Basis
10KLT
- KLT is rotation is signal space
- Other names of KLT
- Hotelling Transform
- Principal Component Transform
11KLT is optimal, but...
- Decorrelation of data ? redundancy reduction
- Energy compactness
- but
- KLT is signal dependent, complexity of basis
calculation - O(N4)
- The basis has to be sent to decoder
Lets introduce a model!
121st order Markov process
- Image as 1st-order Markov process
- xn?xn-1 ?n, where ?n is (white) noise
- Correlation matrix Rx
13Correlation function
14KLT Example N2
15KLT Example N8
T,Leig(Rx) for k1N subplot(2,4,k)
stem(T(,1N-k)) axis(0 N1 -0.8 0.8
) end
16KLT? DFT ? DCT
- Discrete Fourier Transform (DFT) is asimptotics
of KLT - for the model. In other words, the KLT is
spectral - decomposition of image data!
- KLT ?DFT
- Why Discrete Cosine Transform (DCT) is better
than DFT? - DFT?DCT
- What about Discrete Sine Transform (DST)?
17KLT DCT N8, k0..3
KLT
DCT
18KLT DCT N8, k4..7
KLT
DCT
191-D DCT N8
201-D DCT
- Complexity O(N2)?
- Fast algorithm O(N log2N)
21Inverse 1-D DCT
222-D DCT
- The 2-D DCT is performed as two sequential 1-D
DCTs - Complexity of DCT is O(N logN) instead of O(N4)
Image
x 1-D DCT
y 1-D DCT
2-D DCT
232-D DCT N4
2-D DCT basis functions
24Zig-zag DCT coefficients ordering
25Where is compression?
- DCT is reversible transformation
- YTX ? XT-1Y
- Where is compression?
- Data decorrelation and energy compactness
- ? Quantization (lossy operation)
- ? Statistical encoding
261st DCT coefficient distribution
272nd DCT coefficient distribution
283rd DCT coefficient distribution
29Example