Time Frequency Analysis and Wavelet Transforms Oral Presentation

  • Slides: 39
Download presentation
Time Frequency Analysis and Wavelet Transforms Oral Presentation Image Compression JPEG and JPEG 2000

Time Frequency Analysis and Wavelet Transforms Oral Presentation Image Compression JPEG and JPEG 2000 Presenter:許銘宸 November 9, 2017 1

Goal Save the memories Reduce the transmission time 2

Goal Save the memories Reduce the transmission time 2

How Low frequency parts correlation between pixels→high sensitive for the human eyes ex:large area

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

Evaluation 4

Evaluation 4

Flowchart of JPEG 5

Flowchart of JPEG 5

Correlation between pixels 6

Correlation between pixels 6

RGB to YCb. Cr 7

RGB to YCb. Cr 7

Downsampling 4: 4: 4 (No downsampling) Y Cb 4: 2: 2 (Downsampling every 2

Downsampling 4: 4: 4 (No downsampling) Y Cb 4: 2: 2 (Downsampling every 2 pixels in vertical or horizontal direction. ) Cb Cr Y or Cb Cr 4: 2: 0(Downsampling every 2 pixels in both vertical and horizontal direction. ) Cb Cr Y 8

KL Transform & DCT Transform Fourier Transform & Fourier Series (1 -Dimension): combination of

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

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 it’s good enough. 10

Formulas of DCT: 11

Formulas of DCT: 11

DCT bases 12

DCT bases 12

Example of DCT Before DCT: -76, -73, -67, -62, -58, -67, -64, -55, -69,

Example of DCT Before DCT: -76, -73, -67, -62, -58, -67, -64, -55, -69, -73, -38, -19, -43, -59, -56, -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, -51, -60, -70, -53, -43, -57, -64, -69, -73, -67, -63, -45, -41, -49, -59, -60, -63, -52, -50, -34 After DCT: -415. 37, -30. 19, 4. 47, -21. 86, -46. 83, 7. 37, -48. 53, 12. 07, 12. 13, -6. 55, -7. 73, 2. 91, -1. 03, 0. 18, -0. 17, 0. 14, -61. 20, 27. 24, -60. 76, 10. 25, 77. 13, -24. 56, 34. 10, -14. 76, -13. 20, -3. 95, 2. 38, -5. 94, 0. 42, -2. 42, -1. 07, -4. 19, 56. 13, -20. 10, 13. 15, -7. 09, -28. 91, 9. 93, -10. 24, 6. 30, -1. 88, 1. 75, -2. 38, 0. 94, -0. 88, -3. 02, -1. 17, -0. 10, -2. 39, 0. 46, -8. 54, 4. 88, 5. 42, -5. 65, 1. 83, 1. 95, -2. 79, 3. 14, 4. 30, 1. 85, 4. 12, -0. 66, 13 0. 50, 1. 68,

Quantization 16 11 10 16 24 40 51 61 17 18 24 47 99

Quantization 16 11 10 16 24 40 51 61 17 18 24 47 99 99 12 12 14 19 26 58 60 55 18 21 26 66 99 99 14 13 16 24 40 57 69 56 24 26 56 99 99 99 14 17 22 29 51 87 80 62 47 66 99 99 99 18 22 37 56 68 109 103 77 99 99 24 35 55 64 81 104 113 92 99 99 49 64 78 87 106 121 120 101 99 99 72 92 95 98 112 100 103 99 99 99 Luminance quantization table Chrominance quantization table 14

Example of Quantization Before Quantization -415. 37, -30. 19, 4. 47, -21. 86, -46.

Example of Quantization Before Quantization -415. 37, -30. 19, 4. 47, -21. 86, -46. 83, 7. 37, -48. 53, 12. 07, 12. 13, -6. 55, -7. 73, 2. 91, -1. 03, 0. 18, -0. 17, 0. 14, -61. 20, 27. 24, -60. 76, 10. 25, 77. 13, -24. 56, 34. 10, -14. 76, -13. 20, -3. 95, 2. 38, -5. 94, 0. 42, -2. 42, -1. 07, -4. 19, After Quantization -26, -3, 0, -2, -3, 1, 1, 0, 0, -6, 2, -4, 1, 5, -1, 2, -1, 0, 0, 2, 1, -1, 0, 0, 0, 56. 13, -20. 10, -2. 39, 0. 46, 13. 15, -7. 09, -8. 54, 4. 88, -28. 91, 9. 93, 5. 42, -5. 65, -10. 24, 6. 30, 1. 83, 1. 95, -1. 88, 1. 75, -2. 79, 3. 14, -2. 38, 0. 94, 4. 30, 1. 85, -0. 88, -3. 02, 4. 12, -0. 66, -1. 17, -0. 10, 0. 50, 1. 68, Quantize by luminance quantization table -1, 0, 0, 0, 0, 0, 15 0, 0, 0,

Zigzag Scan -26 -3 -6 2 2 -1 0 0 0 -2 -4 1

Zigzag Scan -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 0 0 0 0 0 Zigzag Scan We get a sequence after the zigzag process: − 26, − 3, 0, − 3, − 2, − 6, 2, − 4, 1 − 3, -3, 1, 1, 5, 1, 2, − 1, 1, − 1, 2, 0, 0, 0, − 1, 0, ……, 0. The sequence can be expressed as: (0: -26), (0: -3), (1: -3), …, (0: 2), (5: -1), (0: -1), EOB Run-Length Encoding 16

17

17

Entropy Coding & Huffman Coding Encode the high/low probability symbols with short/long code length.

Entropy Coding & Huffman Coding Encode the high/low probability symbols with short/long code length. Symbol Binary Code 0 00 Run Size Binary Code 1 010 0 1 00 2 011 … … … 3 100 0 10 111110000011 4 101 … … … 6 1 11110110 8 111110 … … … 9 1111110 15 10 111111110 10 11111110 EOB 1010 11 11110 ZRL 1111 DC luminance Huffman Table Symbol 18 AC luminance Huffman Table

Flowchart of JPEG 2000 19

Flowchart of JPEG 2000 19

For high compression ratio For JPEG 2000, there is no need to divide the

For high compression ratio For JPEG 2000, there is no need to divide the image into many 8 x 8 blocks JPEG both has Strong block effect and blur JPEG-2000 only has blur 20

Forward Multicomponent Transformation 21

Forward Multicomponent Transformation 21

2 D-DWT 23

2 D-DWT 23

A rectangular after 2 D-DWT 24

A rectangular after 2 D-DWT 24

Inverse DWT 26

Inverse DWT 26

Cohen-Daubechies-Feauveau wavelet (CDF) filter irreversible DWT is the CDF 9/7 wavelet filter reversible DWT

Cohen-Daubechies-Feauveau wavelet (CDF) filter irreversible DWT is the CDF 9/7 wavelet filter reversible DWT is the CDF 5/3 wavelet filter 27

Quantization for JPEG 2000 , 28

Quantization for JPEG 2000 , 28

Tier-1 Encoder 算術編碼(Arithmetic coding) Huffman coding 是將每一筆資料分開編碼 Arithmetic coding 則是將多筆資料一起編碼, 因此壓縮效率比 Huffman coding 更高,近年來的資料壓縮技術大

Tier-1 Encoder 算術編碼(Arithmetic coding) Huffman coding 是將每一筆資料分開編碼 Arithmetic coding 則是將多筆資料一起編碼, 因此壓縮效率比 Huffman coding 更高,近年來的資料壓縮技術大 多使用 arithmetic coding 31

Arithmetic coding-range encoding 32

Arithmetic coding-range encoding 32

Arithmetic coding-range encoding where C and b are integers (b is as small as

Arithmetic coding-range encoding 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. 0. 4375 0. 46875 所以編碼的結果為 33

Rate control and Tier-2 encoder Rate Control: Maintain the minimum distortion for the best

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. 34

Conclusion for JPEG We transfer RGB to YCb. Cr since the luminance is sensitive

Conclusion for JPEG We transfer RGB to YCb. Cr 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 8 x 8 blocks into sequence for purpose of run-length-coding We encode the sequences by Huffman-coding to minimize code length 35

Conclusion for JPEG-2000 We transfer RGB to YCb. Cr by ICT or RCT to

Conclusion for JPEG-2000 We transfer RGB to YCb. Cr 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. 36

JPEG 2000 is not as popular as JPEG For JPEG 2000 We have to

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 8 x 8 blocks during the compression. The cost of memory for JPEG is small. JPEG 2000是基於小波變換的圖像壓縮標準。 JPEG 2000的壓縮比更高,而且不會產生原先的基於離散餘弦變換的JPEG標準產 生的塊狀模糊瑕疵。JPEG 2000同時支持破壞性資料壓縮和非破壞性資料壓縮。 另外,JPEG 2000也支持更複雜的漸進式顯示和下載。 由於JPEG 2000在非破壞性壓縮下仍然能有比較好的壓縮率,所以JPEG 2000在圖 像品質要求比較高的醫學圖像的分析和處理中已經有了一定程度的廣泛應用。 37

Reference [1] 酒井善則、吉田俊之 共著,白執善 編譯,影像壓縮技術 映像情報符号化, 全華科技圖書股份有限公司, Oct. 2004 [2] Discrete Wavelet Transform for

Reference [1] 酒井善則、吉田俊之 共著,白執善 編譯,影像壓縮技術 映像情報符号化, 全華科技圖書股份有限公司, Oct. 2004 [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, “JPEG 2000”, https: //zh. wikipedia. org/wiki/JPEG_2000 38

The End 39

The End 39