Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion JPEG Compression Ian Snyder December 11, 2009 Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion JPEG Image Compression Standard ◮ Need for a standard Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion JPEG Image Compression Standard ◮ Need for a standard ◮ History, develpoment and adoption of JPEG’s standard Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion JPEG Image Compression Standard ◮ Need for a standard ◮ History, develpoment and adoption of JPEG’s standard ◮ Widespread use Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Image Compression Definition: The compression of graphics for storage and/or transmission. Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Compression Methods ◮ Lossless Compression: Compression that does not remove any data from the original file. Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Compression Methods ◮ Lossless Compression: Compression that does not remove any data from the original file. ◮ Lossy Compression: Compression that deletes information in order to achieve a better compression ratio. Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Bitmap Images A bitmap image is represented by an array of bits that correspond to pixel colors. Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Image Types There are three general types of bitmap images: ◮ Intensity Images ◮ Indexed (256-color) Images ◮ RGB (Truecolor) Images Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion RGB Example Image Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Seal Image This is the intensity image that was compressed step by step. Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion JPEG Compression Steps ◮ The Discrete Cosine Transform ◮ Quantization ◮ Reordering ◮ Huffman Coding Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Block Division of Image Matrix When an image is JPEG compressed, it it first sliced into 8 × 8 matrix blocks of pixel entries. Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Example Image Matrix This is the matrix taken from the top left corner of the ‘Seal’ image: 182 181 176 178 176 177 173 175 182 184 177 176 179 174 176 173 176 176 176 180 178 174 171 168 182 174 176 180 177 169 168 168 O = 180 172 181 178 171 170 173 172 181 170 171 170 170 178 174 174 176 174 170 170 171 182 179 166 176 173 170 176 173 181 179 168 Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Discrete Cosine Transform ◮ The discrete cosine transform converts an image matrix from its spatial domain into a frequency domain. Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Discrete Cosine Transform ◮ The discrete cosine transform converts an image matrix from its spatial domain into a frequency domain. ◮ Greater changes in luminosity across the image are represented by higher frequencies. Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Discrete Cosine Transform ◮ The discrete cosine transform converts an image matrix from its spatial domain into a frequency domain. ◮ Greater changes in luminosity across the image are represented by higher frequencies. ◮ The greatest frequencies are concentrated in the upper left of the matrix. Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion DCT Equation M − 1 N − 1 A mn cos π (2 m + 1) u cos π (2 n + 1) v � � C uv = α u α v 2 M 2 N m =0 n =0 0 ≤ u ≤ M − 1 , 0 ≤ v ≤ N − 1 Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion DCT Equation Continued √ � 1 / M , if p = 0 , α u = � 2 / M , if 1 ≤ p ≤ M − 1 √ � 1 / M , if p = 0 , α v = � 2 / M , if 1 ≤ p ≤ M − 1 Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion DCT Matrix The previous equation produces this DCT matrix ‘C’: . 353 . 353 . 353 . 353 . 353 . 353 . 353 . 353 . 490 . 415 . 277 . 097 − . 097 − . 277 − . 415 − . 490 . 461 . 191 − . 191 − . 461 − . 461 − . 191 . 191 . 461 . 415 − . 097 − . 490 − . 277 . 277 . 490 . 097 − . 415 C = . 353 − . 353 − . 353 . 353 . 353 − . 353 − . 353 . 353 . 277 − . 490 . 097 . 415 − . 415 − . 097 . 490 − . 277 . 191 − . 461 . 461 − . 191 − . 191 . 461 − . 461 . 191 . 097 − . 277 . 415 − . 490 . 490 − . 415 . 277 − . 097 Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Applying the DCT Matrix ‘C’ is then applied to each 8 × 8 block matrix ‘A’ as follows: D = CAC T Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion DCT Applied to the Example Matrix The DCT is now applied to the example 8 × 8 matrix: 376 . 12 13 . 58 − . 99 10 . 16 . 37 6 . 70 . 54 − 2 . 06 9 . 64 9 . 97 − 1 . 75 − 7 . 70 6 . 32 − 6 . 77 − 2 . 98 1 . 77 5 . 24 − 6 . 02 2 . 05 7 . 20 − 7 . 09 − 3 . 05 − 3 . 76 − 4 . 34 . 48 − 2 . 14 8 . 93 − . 52 − . 65 . 10 5 . 10 . 051 D = 1 . 12 3 . 51 − 1 . 91 − 4 . 79 4 . 37 2 . 96 . 92 − . 19 − 3 . 62 . 35 − 2 . 44 3 . 88 . 042 − . 70 . 32 − 1 . 94 − 2 . 03 − 3 . 09 − 1 . 01 . 22 2 . 80 . 22 2 . 94 − 2 . 40 − . 34 − 9 . 40 − 3 . 36 − 2 . 92 − 3 . 73 1 . 89 . 15 − . 24 Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Quantization ◮ Quantization is where compression really happens in JPEG’s process. Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Quantization ◮ Quantization is where compression really happens in JPEG’s process. ◮ Information is discarded from the image at this point, and it cannot be recovered. Ian Snyder JPEG Compression
Outline Introduction Images and Compression Walkthrough of JPEG Compression Steps Complete Compression Process Results and Conclusion Quantization Process ◮ The quantization process takes DCT matrix D and divides each entry in that matrix by each entry in a quantization matrix Q , resulting in the quantized matrix R . Ian Snyder JPEG Compression
Recommend
More recommend