310 likes | 529 Views
Image transforms of Image compression. Presenter: Cheng-Jin Kuo 郭政錦 Advisor: Jian-Jiun Ding, Ph. D. Professor 丁建均教授 Digital Image & Signal Processing Lab Graduate Institute of Communication Engineering National Taiwan University, Taipei, Taiwan, ROC. Outline. Introduction
E N D
Image transforms of Image compression Presenter: Cheng-Jin Kuo 郭政錦 Advisor: Jian-Jiun Ding, Ph. D. Professor 丁建均教授 Digital Image & Signal Processing Lab Graduate Institute of Communication Engineering National Taiwan University, Taipei, Taiwan, ROC
Outline • Introduction • Image compression scheme • Image Transform • Orthogonal Transform • DCT transform • Subband Transform • Haar Wavelet transform
Introduction • Image types: • bi-level image • grayscale image • color image : e.g. RGB, YCbCr • continuous-tone image : -natural scene; -image noise; -clouds, mountains, surface of lakes;
Introduction • discrete-tone image(graphical image or synthetic image) : -artificial image; -sharp and well-defined edges; -high contrasted from the background; • cartoon-like image: -uniform color;
Introduction • The principle of Image compression: • removing the redundancy -the neighboring pixels are highly correlated -the correlation is called spatial redundancy
Image compression scheme Arithmetic coding, Huffman coding, 1.Orthogonal transform(Walsh-Hamadard transform, RLE, ……. DCT, …) 2.Subband transform(wavelet transform, …) quantization error image transform quantizer encoder Compressed image file image’ Inverse transform decoder
Image transform • Two properties and main goals: -to reduce image redundancy -to isolate the various freq. of the image (identify the important parts of the image)
Image transform • Two main types: -orthogonal transform: e.g. Walsh-Hdamard transform, DCT -subband transform: e.g. Wavelet transform
Orthogonal transform • Orthogonal matrix W C=W.D • Reducing redundancy • Isolating frequencies
Orthogonal transform • One choice of W: (Walsh-Hadamard transform) C=W.D • W should be Invertible (for inverse transform) • Other properties?
Orthogonal transform • Reducing redundancy (Energy weighted) • example: d=[5 6 7 8] after multiply by W/2 c=[13 -2 0 -1] energy of d = energy of c= 174 • energy ratio of the first index: d:25/174 =14% c:169/174 =97%
Orthogonal transform • Reducing redundancy (Energy weighted) • d=[4 6 5 2] ; c=[8.5 1.5 -2.5 0.5] ; E=81 In general, we ignore several smallest elements in d’, and get c=[8.5 0 -2.5 0] quantize it and get the inverse c=[3 5.5 5.5 3] E=81.75 • Property 1: should be large while others, small.
Orthogonal transform • Isolating frequencies (freq. weighted) • example: d=[1 0 0 1]c=[2 0 2 0] W= d=0.5[1 1 1 1]+0.5[1 -1 -1 1] d=[0 0.33 -0.33 -1]c=[0 2.66 0 1.33] d=0.66[1 1 -1 -1]+0.33[1 -1 1 -1]
Orthogonal transform • Isolating frequencies (freq. weighted) • Property 2: should correspond to zero freq. while other coefficients correspond to higher and higher freq. W= , W= (Walsh-Hadamard transform)
Orthogonal transform • So how do we choose W? • Invertible matrix • Coefficients in the first row are all positive • Each row represents the different freq. • Orthogonal matrix
Discrete Cosine Transform • W matrix of DCT: • W=
Discrete Cosine Transform • 1D DCT: , for f=0~7 = , f=0 1 , f>0 • Inverse DCT(IDCT):
Discrete Cosine Transform • 2D DCT: • Inverse DCT(IDCT):
Subband Transform • Separate the high freq. and the low freq. by subband decomposition
Subband Transform • Filter each row and downsample the filter output to obtain two N x M/2 images. • Filter each column and downsample the filter output to obtain four N/2 x M/2 images
Haar wavelet transform • Haar wavelet transform: • Average : resolution • Difference : detail Example for one dimension
Haar wavelet transform • Example: data=(5 7 6 5 3 4 6 9) -average:(5+7)/2, (6+5)/2, (3+4)/2, (6+9)/2 -detail coefficients: (5-7)/2, (6-5)/2, (3-4)/2, (6-9)/2 • n’= (6 5.5 3.5 7.5 |-1 0.5 -0.5 -1.5) • n’’= (23/4 22/4 | 0.25 -2-1 0.5 -0.5 -1.5) • n’’’= (45/8 | 1/8 0.25 -2-1 0.5 -0.5 -1.5)
Subband Transform • The standard image wavelet transform • The Pyramid image wavelet transform
Reference • David Salomon, Coding for Data and Computer Communication, Springer, 2005. • A. Uhl, A. Pommer, Image and Video Encryption, Springer, 2005 • David Salomon, Data Compression - The Complete Reference 3rd Edition, Springer, 2004. • Khalid Sayood, Introduction to Data Compression 2nd Edition, Morgan Kaufmann, 2000. • J.Goswami, A.Chan, Fundamentals of Wavelets – Theory, Algorithms, and Application, Wiley Interscience, 1999 • C.S. Burrus, R. A. Gopinath, H. Guo, Introduction to Wavelets and Wavelet Transforms – A Primer, Prentice-Hall, 1998