Time Frequency Analysis and Wavelet Transforms Image Compression

  • Slides: 41
Download presentation
Time Frequency Analysis and Wavelet Transforms Image Compression JPEG and JPEG 2000 Presenter:蔡開遠

Time Frequency Analysis and Wavelet Transforms Image Compression JPEG and JPEG 2000 Presenter:蔡開遠

Outline WHY JPEG introduction JPEG 2000 Conclusion Reference

Outline WHY JPEG introduction JPEG 2000 Conclusion Reference

Why Color image 512 x 512 (pixel) R-G-B: 8 x 3(bits) Data: 0. 78

Why Color image 512 x 512 (pixel) R-G-B: 8 x 3(bits) Data: 0. 78 Mega bytes Modem: 56 K bit per second Time: 112(sec)

640 x 480 (pixel) 30 frames/s 26 days!!!

640 x 480 (pixel) 30 frames/s 26 days!!!

JPEG introduction JPEG is a widely used Standard Method for Distortion Compression for photo

JPEG introduction JPEG is a widely used Standard Method for Distortion Compression for photo images This name stands for Joint Photographic Experts Group The team was founded in 1986, announced JPEG standards in 1992,and obtained ISO 109918 -1 accreditation in 1994。 。

Goal Save the memories Reduce the transmission time

Goal Save the memories Reduce the transmission time

How

How

RGB to YCb. Cr

RGB to YCb. Cr

4: 4: 4(NO downsampling) Downsampling Y Cb Cr 4: 2: 2 (Downsampling every 2

4: 4: 4(NO downsampling) Downsampling Y Cb Cr 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)

Remove correlation between pixels Karhunen-Loeve Transform (KLT): Every image has its own bases Advantage:

Remove correlation between pixels 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 in Eecode side→ More data and time

Fomula of DCT

Fomula of DCT

Remove correlation between pixels Discrete Cosine Transform (DCT): Compress different image by the “same”

Remove correlation between pixels 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.

Example of DCT

Example of DCT

Quantization The luminance Quantization Table The Chrominance Quantization Table

Quantization The luminance Quantization Table The Chrominance Quantization Table

Example of Quantization The quatization step is the major information losing step in JPEG

Example of Quantization The quatization step is the major information losing step in JPEG compression

Encoding

Encoding

Differential encoding For sequence: 5, 4, 5, 6, 7, 9 Differential output: 5, -1,

Differential encoding For sequence: 5, 4, 5, 6, 7, 9 Differential output: 5, -1, 1, 1, 2

Zigzag scan We get a sequence after zigzag scan: 0, -3, -6, -2, -3,

Zigzag scan We get a sequence after zigzag scan: 0, -3, -6, -2, -3, 1, -4, 2, 2, 1, 5, 1, 1, 0, 0, 2, -1, 1, -1, 0, 0, -1, 0… 0 The sequence can be expressed as: Run-Length Encoding (1: -3), (0: 6), …, (2: 2), (0: -1), (0: 1)(2: -1), (0, -1), EOB

DC luminance Huffman Table AC luminance Huffman Table

DC luminance Huffman Table AC luminance Huffman Table

Florchart of JPEG 2000 Source image Tier-2 Encoder Code Image Forward Multicomponent transformation Tier-1

Florchart of JPEG 2000 Source image Tier-2 Encoder Code Image Forward Multicomponent transformation Tier-1 Encoder Forward Wavelet transformation quantization

Color Transformation

Color Transformation

Tiles Size:tile >> block (8 x 8 for jpeg)

Tiles Size:tile >> block (8 x 8 for jpeg)

2 D-DWT

2 D-DWT

Example

Example

Inverse DWT

Inverse DWT

Wavelet filter irreversible DWT is the CDF 9/7 wavelet filter reversible DWT is the

Wavelet filter irreversible DWT is the CDF 9/7 wavelet filter reversible DWT is the CDF 5/3 wavelet filter

Quantization for JPEG 2000

Quantization for JPEG 2000

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

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

Arithmetic coding-range encoding

Arithmetic coding-range encoding

 0. 4375 0. 46875 Encode output:

0. 4375 0. 46875 Encode output:

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.

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

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.

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在圖像 品質要求比較高的醫學影像的分析和處理中已經有了一定程度的廣泛應用

Evaluation

Evaluation

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 [6] http: //ir. lib. ypu. edu. tw/bitstream/310904600 Q/8747/2/07. pdf