![Page 1: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/1.jpg)
Image Coding/ CompressionImage Coding/ Compression
David HemmertPradeep SuthramTammo Heeren
All Mathcad files [MCD/PDF] can be found on:http://webpages.acs.ttu.edu/theeren
![Page 2: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/2.jpg)
OverviewOverview
ReviewDCT (Discrete Cosine Transform)JPEG compression/ decompressionWavelet compression/ decompression
![Page 3: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/3.jpg)
ReviewReviewLinear QuantizationLinear Quantization
0 17 34 51 68 85 102 119 136 153 170 187 204 221 238 2550
17
34
51
68
85
102
119
136
153
170
187
204
221
238
255Quantization steps
Grayscale levels
quan
tized
gra
ysca
le le
vels
Quantization of gray levels in equidistance quantization steps
![Page 4: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/4.jpg)
ReviewReviewadaptive Quantizationadaptive Quantization
0 17 34 51 68 85 102 119 136 153 170 187 204 221 238 2550
17
34
51
68
85
102
119
136
153
170
187
204
221
238
255Quantization steps
Grayscale levels
quan
tized
gra
ysca
le le
vels
0 17 34 51 68 85 102 119 136 153 170 187 204 221 238 2550
2000
4000
6000Image histogram
![Page 5: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/5.jpg)
DCTDCT
Discrete Cosine transform Transformation of spatial image information into
its spatial frequency components
f
f0
![Page 6: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/6.jpg)
DCT MathDCT Math
DCTfy fx G
fy fx0
X 1
x 0
Y 1
y
imagey x kx x fx( ) ky y fy( )
IDCTy x
0
X 1
fx 0
Y 1
fy
Gfy fx DCT
fy fx kx x fx( ) ky y fy( )
kx x fx( ) cos 2 x 1( )fx 2 X
ky y fy( ) cos 2 y 1( )fy 2 Y
![Page 7: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/7.jpg)
DCTDCT
Essentially taking the 2D fourier transform and only keeping the real part of the coefficients
Works with any orthogonal kernel (e.g. in wavelet compression/ decompression)
DCT used in JPEG coding/ decoding
![Page 8: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/8.jpg)
DCT ResultsDCT Results
1 10 100 1 1030
10
20
30
40
50
60SNR vs. Compression Ratio
Compression Ration
SN
R
0.005%/ 22000 / 8.8 dB 0.1%/ 864/ 10.3 dB 0.8%/ 128/ 13.5 dB 2%/ 49/ 15.2 dB
13%/ 7.7 / 20.4 dB
5%/ 20 / 17.5 dB
82%/ 1.2 / 34.4 dB
![Page 9: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/9.jpg)
SNR and visual artifactSNR and visual artifact
Procedure/ TransformSNR of no
visual artifactsCompression
ratio
Linear quantization 35 dB 1.6
Adaptive quantization 31 dB 2
DCT 34 dB 2
JPEG
Wavelet 35 dB 9.3
![Page 10: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/10.jpg)
JPEG compression of LennaJPEG compression of Lenna
• 512 X 512 pixels
•1 pixel = 8 bits
• 64 bytes = 8 x 8 submatrix = block
• 4096 submatrices
• 262144 total/elements total
![Page 11: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/11.jpg)
8x8 pixel block
DCT QuantizerLevel-shift Encoder Data
• Discrete Cosine Transform of every element
• Gray scale image level-shifted by –128
• for n = 8, 2^(n-1) = 128
JPEG AlgorithmJPEG Algorithm
![Page 12: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/12.jpg)
Quantization
using a typical normalization matrix
[ 16 11 10 16 24 40 51 61
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99 ]
JPEG AlgorithmJPEG Algorithm
• Normalization using a standard table
![Page 13: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/13.jpg)
JPEG AlgorithmJPEG Algorithm
Zig-zag pattern Removal of zeros Convert to binary Compare the number
of bits used
![Page 14: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/14.jpg)
- Orthogonal Basis
- Area of basis equals zero
- Low pass / High pass filtering scheme to generate basis coefficients
- Compression by reducing the number of coefficient (zeroing least significant coefficients)
Discrete Wavelet Transform Discrete Wavelet Transform (DWT)(DWT)
![Page 15: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/15.jpg)
Haar wavelet(averaging)
Mexican Hat wavelet(2nd derivative of Gaussian distribution)
Daub4 wavelet(most common used)
2
2
g Mex_Hat x( )
33 x
2 0 2
2
1
1
21.1
1.1
g Haar x( )
1.10 x
0 0.5 1
1
1
0.15
0.12
Wi
512200 i
200 300 400 500
0.2
0.1
0.1
Common Orthogonal Wavelet Common Orthogonal Wavelet BasesBases
![Page 16: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/16.jpg)
A Row 1
C 0
C 3
0
0
0
0
C 2
C 1
C 1
C 2
0
0
0
0
C 3
C 0
C 2
C 1
C 0
C 3
0
0
0
0
C 3
C 0
C 1
C 2
0
0
0
0
0
0
C 2
C 1
C 0
C 3
0
0
0
0
C 3
C 0
C 1
C 2
0
0
0
0
0
0
C 2
C 1
C 0
C 3
0
0
0
0
C 3
C 0
C 1
C 2
a
b
c
d
e
f
g
h
Low 1
Hi 1
Low 2
Hi 2
Low 3
Hi 3
Low 4
Hi 4
Low 1
Low 2
Low 3
Low 4
Hi 1
Hi 2
Hi 3
Hi 4
Lowpass
Highpass
DWT(Daub4 Nth order matrix)
Row 1Pixels(l to r)
Row 1Coefficients
Row 1C 0
1 3
4 2C 1
3 3
4 2
C 23 3
4 2C 3
1 3
4 2
Low 1A
Low 1B
Low 2A
Low 2B
Hi 1A
Hi 1B
Hi 2A
Hi 2B
N-1times
Filtering SchemeFiltering Scheme
![Page 17: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/17.jpg)
Coefficients for First Row Coefficients for First Row DWT TransformationDWT Transformation
![Page 18: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/18.jpg)
- DWT each row- Regroup coefficients into Low/Hi subvectors
- DWT all columns of transformed matrix- Regroup coefficients into Low/Hi subvectors
WavA
Wav
Hi-Hi
Low-Low
Wav comp
90 % of thecoefficientszeroed
Generating CoefficientsGenerating Coefficients
![Page 19: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/19.jpg)
original 50% coefficients 10% coefficients
2% coefficients 0.5% coefficients 0.1% coefficients
Application to “Lenna”Application to “Lenna”
![Page 20: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/20.jpg)
2%
Signal to Noise RatioSignal to Noise Ratio
![Page 21: Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on:](https://reader036.vdocuments.us/reader036/viewer/2022070418/5697c0241a28abf838cd484b/html5/thumbnails/21.jpg)
ReferencesReferences
1. Rafael C. Gonzalez, Richard E. Wood, “Digital Image Processing”, Addison Wesley, 1993
2. Geoffrey M. Davis, Aria Nosratinia, “Wavelet-based Image Coding: An Overview”, http://www.geoffdavis.net/
3. Subhasis, Saha, “Image Compression - from DCT to Wavelets : A Review”, http://www.acm.org/crossroads/xrds6-3/sahaimgcoding.html
4. Weidong Kou, “Digital Image Compression Algorithms and Standards,” Kluwer Academic Publishers, 1995.
5. “Selected Papers on Image Coding and Compression,” Majid Rabbani, Ed., Brian J. Thompson, Gen. Ed., SPIE Milestone Series, Vol MS-48, SPIE Optical Engineering Press, 1992.
6. “Fractal Image Compression Theory and Application,” Yuval Fisher, Ed., Springer-Verlag New York, 1995.
7. Bernd Jaehne, “Digital Image Processing”, Third Edition, Springer-Verlag, New York 1995