Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Time Frequency Analysis and Wavelet Transforms Oral Presentation Image Compression JPEG and JPEG 2000 Presenter :郭起霖 November 26,2015 1."— Presentation transcript:

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

2 Goal  Save the memories  Reduce the transmission time 2

3 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

4 Evaluation 4

5 Flowchart of JPEG 5

6 Correlation between pixels 6

7 RGB to YCbCr 7

8 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

9 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

10 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

11 Formulas of DCT: 11

12 DCT bases 12

13 Example of DCT 13 -76, -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: -415.37, -30.19, -61.20, 27.24, 56.13, -20.10, -2.39, 0.46, 4.47, -21.86, -60.76, 10.25, 13.15, -7.09, -8.54, 4.88, -46.83, 7.37, 77.13, -24.56, -28.91, 9.93, 5.42, -5.65, -48.53, 12.07, 34.10, -14.76, -10.24, 6.30, 1.83, 1.95, 12.13, -6.55, -13.20, -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, -415.37, -30.19, -61.20, 27.24, 56.13, -20.10, -2.39, 0.46, 4.47, -21.86, -60.76, 10.25, 13.15, -7.09, -8.54, 4.88, -46.83, 7.37, 77.13, -24.56, -28.91, 9.93, 5.42, -5.65, -48.53, 12.07, 34.10, -14.76, -10.24, 6.30, 1.83, 1.95, 12.13, -6.55, -13.20, -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,

14 Quantization 14 Luminance quantization table 1611101624405161 12 141926586055 1413162440576956 1417222951878062 182237566810910377 243555648110411392 49647887106121120101 7292959811210010399 1718244799 1821266699 24265699 476699 Chrominance quantization table

15 Example of Quantization Before Quantization After Quantization 15 -415.37, -30.19, -61.20, 27.24, 56.13, -20.10, -2.39, 0.46, 4.47, -21.86, -60.76, 10.25, 13.15, -7.09, -8.54, 4.88, -46.83, 7.37, 77.13, -24.56, -28.91, 9.93, 5.42, -5.65, -48.53, 12.07, 34.10, -14.76, -10.24, 6.30, 1.83, 1.95, 12.13, -6.55, -13.20, -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, -415.37, -30.19, -61.20, 27.24, 56.13, -20.10, -2.39, 0.46, 4.47, -21.86, -60.76, 10.25, 13.15, -7.09, -8.54, 4.88, -46.83, 7.37, 77.13, -24.56, -28.91, 9.93, 5.42, -5.65, -48.53, 12.07, 34.10, -14.76, -10.24, 6.30, 1.83, 1.95, 12.13, -6.55, -13.20, -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

16 Zigzag Scan 16 -26-3-622 00 0 -2-411 000 -315 000 -312 0000 1 0000000 00000000 00000000 00000000 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

17 Entropy Coding & Huffman Coding Encode the high/low probability symbols with short/long code length. 17 SymbolBinary Code 000 1010 2011 3100 4101 …… 8111110 91111110 1011111110 11111111110 DC luminance Huffman Table SymbolBinary Code RunSize 0100 ……… 0101111111110000011 ……… 6111110110 ……… 15101111111111111110 EOB1010 ZRL1111 AC luminance Huffman Table

18 Flowchart of JPEG2000 18

19 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

20 Forward Multicomponent Transformation 20

21 Tiles  Size : tile >> block  重點區塊處理( Region of Interest ):不同的區域可以挑選不同的壓縮品質 21

22 2D-DWT 22

23 A rectangular after 2D-DWT 23

24 The three stage 2D-DWT  遞進性( Progressive ): 解析度隨解碼長度遞增  可適性( Scaling ): 編碼內容可於任意位置截斷  當需要高壓縮率 → 丟棄後方編碼資料 24

25 Inverse DWT 25

26 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

27 Quantization for JPEG 2000 27,

28 Tier-1 Encoder Embedded Block Coding  Code-block : 32*32 or 64*64  Bit-plane : Bit depth → MSB( 高位元 ) 到 LSB( 低位元 )  Pass : 每個位元層都再依 「 重要性 」 分為三個分流 , 分開套用內容統計模型 Pass1 : 最重要的資料 , 該處上一層還沒出現過最高有效位元但鄰近處出現者 Pass2 : 該位置已經出現過最高有效位元 , 對於較低位元繼續記錄其位元 值 Pass3 : 該處上一層還沒出現過最高有效位元 , 且鄰近處也都不曾出現過 28

29 內容統計模型 (Context modeling)  零編碼( zero coding ): 用於分流一、三,紀錄非最高有效位元者。  正負號編碼( sign coding ): 用於分流一、三,紀錄出現最高有效位元者。  精細編碼( Magnitude refinement coding ): 用於分流二。  遊程編碼( Run-length coding ): 用於分流三,紀錄全都不是最高有效位元的狀況。 29

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

31 Arithmetic coding-range encoding 31

32 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. 0.4375 0.46875 所以編碼的結果為

33 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

34 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

35 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

36 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

37 Referenc e  [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, “JPEG2000”, https://zh.wikipedia.org/wiki/JPEG_2000 37

38 The End 38


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

Similar presentations


Ads by Google