Professional Documents
Culture Documents
DIP S8ECE MODULE5 Part4
DIP S8ECE MODULE5 Part4
DIP S8ECE MODULE5 Part4
Software Research
2D Transforms
• Energy packing
– 2D transforms pack most of the energy
into small number of coefficients located
at the upper left corner of the 2D array
Energy
Packing
Software Research
2D Transforms
• Consider an image f(x,y) of size N x N
Forward transform
N 1 N 1
T (u, v) f ( x, y ) g ( x, y, u , v)
x 0 y 0
u, v 0, 1, 2,..., N 1.
g(x,y,u,v) is the forward transformation kernel or basis functions
Software Research
2D Transforms
• Inverse transform
N 1 N 1
f ( x, y ) T (u, v)h( x, y, u , v)
u 0 v 0
x, y 0, 1, 2,..., N 1.
Software Research
DCT
One of the most frequently used transformations
for image compression is the DCT
forward
inverse
if u=0 if v=0
if u>0 if v>0
DCT (cont’d)
• Basis set of functions for a 4x4 image
(i.e.,cosines of different frequencies).
DCT (cont’d)
DFT WHT DCT
8 x 8 subimages
64 coefficients
per subimage
50% of the
coefficients
truncated
• Modes of operation:
(1) Sequential DCT-based encoding
(2) Progressive DCT-based encoding
(3) Lossless encoding
(4) Hierarchical encoding
JPEG Compression
(Sequential DCT-based encoding)
Entropy
encoder
Entropy
decoder
JPEG Steps
1. Divide the image into 8x8 subimages;
(i.e., non-centered
spectrum)
JPEG Steps
4. Quantize the coefficients (i.e.,
reduce the amplitude of coefficients
that do not contribute a lot).
Quantization
JPEG Steps (cont’d)
5. Order the coefficients using zig-
zag ordering
- Place non-zero coefficients first
- Create long runs of zeros (i.e., good for run-length
encoding)
Example
JPEG Steps (cont’d)
• Image Restoration –
• Degradation model –
• Inverse filtering –
• Wiener Filter –
• Interactive restoration –
• Image analysis & vision -basic
principles only.