Time Frequency Analysis and Wavelet Transforms Oral Presentation Image Compression JPEG and JPEG 2000 Presenter :郭起霖 November 26,2015 1

Embed Size (px)

DESCRIPTION

How  Low frequency parts correlation between pixels→high sensitive for the human eyes ex : large area with the same color  High frequency parts correlation between pixel→low insensitive for the human eyes ex : edge 、 corner  High frequency parts are the information that we are uninterested 3

Citation preview

Time Frequency Analysis and Wavelet Transforms Oral Presentation Image Compression JPEG and JPEG 2000 Presenter November 26,2015 1 Goal Save the memories Reduce the transmission time 2 How Low frequency parts correlation between pixelshigh sensitive for the human eyes ex large area with the same color High frequency parts correlation between pixellow insensitive for the human eyes ex edge corner High frequency parts are the information that we are uninterested 3 Evaluation 4 Flowchart of JPEG 5 Correlation between pixels 6 RGB to YCbCr 7 Downsampling 4:4:4 (No downsampling) 4:2:2 (Downsampling every 2 pixels in vertical or horizontal direction.) 4:2:0(Downsampling every 2 pixels in both vertical and horizontal direction.) 8 YCbCb CrCr Y Y CbCb CrCr or Y CbCb CrCr CbCb CrCr KL Transform & DCT Transform Fourier Transform & Fourier Series (1-Dimension): combination of sines and cosines. KL Transform & DCT Transform (2-Dimension): combination of many kinds of simple pattern (i.e. bases). 9 KLT & DCT Karhunen-Loeve Transform (KLT): Every image has its own bases Advantage: Minimums the Mean Square Error(MSE). Disadvantage: We need to find the bases information Computationally expensive. We need to save the bases information More data. Discrete Cosine Transform (DCT): Compress different image by the same bases Advantage: Computationally efficient. Disadvantage: The performance of MSE is not as well as KL Transform But its good enough. 10 Formulas of DCT: 11 DCT bases 12 Example of DCT , -73, -67, -62, -58, -67, -64, -55, -65, -69, -73, -38, -19, -43, -59, -56, -66, -69, -60, -15, 16, -24, -62, -55, -65, -70, -57, -6, 26, -22, -58, -59, -61, -67, -60, -24, -2, -40, -60, -58, -49, -63, -68, -58, -51, -60, -70, -53, -43, -57, -64, -69, -73, -67, -63, -45, -41, -49, -59, -60, -63, -52, -50, -34 Before DCT: After DCT: , , , 27.24, 56.13, , -2.39, 0.46, 4.47, , , 10.25, 13.15, -7.09, -8.54, 4.88, , 7.37, 77.13, , , 9.93, 5.42, -5.65, , 12.07, 34.10, , , 6.30, 1.83, 1.95, 12.13, -6.55, , -3.95, -1.88, 1.75, -2.79, 3.14, -7.73, 2.91, 2.38, -5.94, -2.38, 0.94, 4.30, 1.85, -1.03, 0.18, 0.42, -2.42, -0.88, -3.02, 4.12, -0.66, -0.17, 0.14, -1.07, -4.19, -1.17, -0.10, 0.50, 1.68, , , , 27.24, 56.13, , -2.39, 0.46, 4.47, , , 10.25, 13.15, -7.09, -8.54, 4.88, , 7.37, 77.13, , , 9.93, 5.42, -5.65, , 12.07, 34.10, , , 6.30, 1.83, 1.95, 12.13, -6.55, , -3.95, -1.88, 1.75, -2.79, 3.14, -7.73, 2.91, 2.38, -5.94, -2.38, 0.94, 4.30, 1.85, -1.03, 0.18, 0.42, -2.42, -0.88, -3.02, 4.12, -0.66, -0.17, 0.14, -1.07, -4.19, -1.17, -0.10, 0.50, 1.68, Quantization 14 Luminance quantization table Chrominance quantization table Example of Quantization Before Quantization After Quantization , , , 27.24, 56.13, , -2.39, 0.46, 4.47, , , 10.25, 13.15, -7.09, -8.54, 4.88, , 7.37, 77.13, , , 9.93, 5.42, -5.65, , 12.07, 34.10, , , 6.30, 1.83, 1.95, 12.13, -6.55, , -3.95, -1.88, 1.75, -2.79, 3.14, -7.73, 2.91, 2.38, -5.94, -2.38, 0.94, 4.30, 1.85, -1.03, 0.18, 0.42, -2.42, -0.88, -3.02, 4.12, -0.66, -0.17, 0.14, -1.07, -4.19, -1.17, -0.10, 0.50, 1.68, , , , 27.24, 56.13, , -2.39, 0.46, 4.47, , , 10.25, 13.15, -7.09, -8.54, 4.88, , 7.37, 77.13, , , 9.93, 5.42, -5.65, , 12.07, 34.10, , , 6.30, 1.83, 1.95, 12.13, -6.55, , -3.95, -1.88, 1.75, -2.79, 3.14, -7.73, 2.91, 2.38, -5.94, -2.38, 0.94, 4.30, 1.85, -1.03, 0.18, 0.42, -2.42, -0.88, -3.02, 4.12, -0.66, -0.17, 0.14, -1.07, -4.19, -1.17, -0.10, 0.50, 1.68, -26, -3, -6, 2, 2, -1, 0, 0, 0, -2, -4, 1, 1, 0, 0, 0, -3, 1, 5, -1, -1, 0, 0, 0, -3, 1, 2, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -26, -3, -6, 2, 2, -1, 0, 0, 0, -2, -4, 1, 1, 0, 0, 0, -3, 1, 5, -1, -1, 0, 0, 0, -3, 1, 2, -1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Quantize by luminance quantization table Zigzag Scan Zigzag Scan 26, 3, 0, 3, 2, 6, 2, 4, 1 3,-3, 1, 1, 5, 1, 2, 1, 1, 1, 2, 0, 0, 0, 0, 0, 1, 1, 0, ,0. We get a sequence after the zigzag process: The sequence can be expressed as: (0:-26),(0:-3),(1:-3),,(0:2),(5:-1),(0:-1),EOB Run-Length Encoding Entropy Coding & Huffman Coding Encode the high/low probability symbols with short/long code length. 17 SymbolBinary Code DC luminance Huffman Table SymbolBinary Code RunSize 0100 EOB1010 ZRL1111 AC luminance Huffman Table Flowchart of JPEG For high compression ratio For JPEG 2000, there is no need to divide the image into many 8x8 blocks JPEG both has Strong block effect and blur JPEG-2000 only has blur 19 Forward Multicomponent Transformation 20 Tiles Size tile >> block Region of Interest 21 2D-DWT 22 A rectangular after 2D-DWT 23 The three stage 2D-DWT Progressive Scaling 24 Inverse DWT 25 Cohen-Daubechies-Feauveau wavelet (CDF) filter irreversible DWT is the CDF 9/7 wavelet filter reversible DWT is the CDF 5/3 wavelet filter 26 Quantization for JPEG , Tier-1 Encoder Embedded Block Coding Code-block 32*32 or 64*64 Bit-plane Bit depth MSB( ) LSB( ) Pass Pass1 Pass2 Pass3 28 (Context modeling) zero coding sign coding Magnitude refinement coding Run-length coding 29 Tier-1 Encoder Arithmetic coding Huffman coding Arithmetic coding Huffman coding arithmetic coding 30 Arithmetic coding-range encoding 31 Arithmetic coding-range encoding 32 where C and b are integers (b is as small as possible), then the data X can be encoded by where means that using k-ary (k ) and b bits to express C Rate control and Tier-2 encoder Rate Control Maintain the minimum distortion for the best image quality with the optimal bitrate to specify the image data size Tier-2 encoder Packages the output of the Tier-1 encoder into the bit-stream. 33 Conclusion for JPEG We transfer RGB to YCbCr since the luminance is sensitive to the human eyes We reduce the correlation between pixels by applying DCT to concentrate the energy in DC term We quantize the DCT blocks to reduce the high frequency components (i.e.AC terms). We transfer the 8x8 blocks into sequence for purpose of run-length-coding We encode the sequences by Huffman-coding to minimize code length 34 Conclusion for JPEG-2000 We transfer RGB to YCbCr by ICT or RCT to choose lossy or lossless compression We perform DWT to split each tile into several subbands to reduce the correlation between pixels We quantize the DWT coefficients by adjusting the quantization step to achieve lossy or lossless compression We encode the quantized DWT coefficients by Tier-1 encoder, Tier-2 encoder and Rate Control with arithmetic coding to get a compressed image. 35 JPEG 2000 is not as popular as JPEG For JPEG 2000 We have to input the entire image into the memory buffer of hardware. For JPEG It divides the image into several 8x8 blocks during the compression. The cost of memory for JPEG is small. JPEG-2000 JPEG-2000 36 Referenc e [1] , Oct [2] Discrete Wavelet Transform for JPEG 2000 [3] Tier 1 and Tier 2 Encoding Techniques for JPEG 2000 [4] WIKIPEDIA, JPEG, https://zh.wikipedia.org/wiki/JPEG [5] WIKIPEDIA, JPEG2000, https://zh.wikipedia.org/wiki/JPEG_ The End 38