Image Coding/ Compression David Hemmert Pradeep Suthram Tammo Heeren All Mathcad files [MCD/PDF] can be found on: http://webpages.acs.ttu.edu/theeren
Overview Review DCT (Discrete Cosine Transform) JPEG compression/ decompression Wavelet compression/ decompression
Review Linear Quantization Quantization of gray levels in equidistance quantization steps
Review adaptive Quantization
DCT Discrete Cosine transform Transformation of spatial image information into its spatial frequency components f f
DCT Math
DCT 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
DCT Results 0.005%/ 22000 / 8.8 dB 0.1%/ 864/ 10.3 dB
SNR and visual artifact Procedure/ Transform SNR of no visual artifacts Compression ratio Linear quantization 35 dB 1.6 Adaptive quantization 31 dB 2 DCT 34 dB JPEG Wavelet 9.3
JPEG compression of Lenna 512 X 512 pixels 1 pixel = 8 bits 64 bytes = 8 x 8 submatrix = block 4096 submatrices 262144 total/elements total
JPEG Algorithm Discrete Cosine Transform of every element 8x8 pixel block DCT Level-shift Quantizer Encoder Data Discrete Cosine Transform of every element Gray scale image level-shifted by –128 for n = 8, 2^(n-1) = 128
using a typical normalization matrix JPEG Algorithm 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 ] Normalization using a standard table
JPEG Algorithm Zig-zag pattern Removal of zeros Convert to binary Compare the number of bits used
Discrete Wavelet Transform (DWT) 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)
Common Orthogonal Wavelet Bases Haar wavelet (averaging) Mexican Hat wavelet (2nd derivative of Gaussian distribution) Daub4 wavelet (most common used)
(Daub4 Nth order matrix) Filtering Scheme Lowpass N-1 times Highpass DWT (Daub4 Nth order matrix) Row 1 Pixels (l to r) Row 1 Coefficients Row 1
Coefficients for First Row DWT Transformation
Generating Coefficients DWT each row Regroup coefficients into Low/Hi subvectors DWT all columns of transformed matrix Low-Low Hi-Hi 90 % of the coefficients zeroed
Application to “Lenna” original 50% coefficients 10% coefficients 2% coefficients 0.5% coefficients 0.1% coefficients
Signal to Noise Ratio 2%
References Rafael C. Gonzalez, Richard E. Wood, “Digital Image Processing”, Addison Wesley, 1993 Geoffrey M. Davis, Aria Nosratinia, “Wavelet-based Image Coding: An Overview”, http://www.geoffdavis.net/ Subhasis, Saha, “Image Compression - from DCT to Wavelets : A Review”, http://www.acm.org/crossroads/xrds6-3/sahaimgcoding.html Weidong Kou, “Digital Image Compression Algorithms and Standards,” Kluwer Academic Publishers, 1995. “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. “Fractal Image Compression Theory and Application,” Yuval Fisher, Ed., Springer-Verlag New York, 1995. Bernd Jaehne, “Digital Image Processing”, Third Edition, Springer-Verlag, New York 1995