1 / 26

JPG picture compresion

Learn about the JPG compression terminology, sequential and progressive storing, color model changing, subsampling, discrete cosine transformation, quantization, Huffman encoding, compression ratios, DCT coefficients, quantization matrices, and encoding techniques.

aandersen
Download Presentation

JPG picture compresion

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JPG picture compresion

  2. Terminology‏ • JPG, JPEG = Join Photograph Expert Group • JFIF = JPEF File Interchange Format • JFIF Variants • Sequential, most used JPG • Progressive – for network transmiting • Lossles • Hierarchical – more resolution in one file (similar to format TIFF)

  3. Sequential JPG storing process Original Picture RGB True Color] Color model Changing] Subsampling User input Discrete Cosine Transformation (DCT) Quantisation User input Huffman Encoding Picture in JFIF Format

  4. Color Model Changing Original Picture RGB True Color] Color model Changing] Subsampling User input Discrete Cosine Transformation (DCT) Quantisation User input Huffman Encoding Picture in JFIF Format

  5. Color Model Changing Brightness

  6. Color Model Transformation RGB → Y Cb Cr Y= 0,299*R + 0,587*G + 0,114*B (brightness)‏ Cb = - 0,1687*R - 0,3313*G + 0,5*B + 128 Cr = 0,5*R - 0,4187*G - 0,0813*B + 128 R = Y + 1.402*(Cr-128)‏ G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)‏ B = Y + 1.772*(Cb-128)‏

  7. Color Model Changing Original Picture RGB True Color] Color model Changing] Subsampling User input Discrete Cosine Transformation (DCT) Quantisation User input Huffman Encoding Picture in JFIF Format

  8. Subsampling Cb,Cr 2 pixels subsampling Y1 Cb1Cr1 Y2 Cb2Cr2 6 Bytes Y1 Y2 ØCb ØCr 4 Bytes Compresion Ratio 67%

  9. Subsampling Cb,Cr 4 pixels subsampling Y1 Cb1Cr1 Y2 Cb2Cr2 12 Bytes Y3 Cb3Cr3 Y4 Cb4Cr4 Y1 Y2 Y3 Y4 ØCb ØCr 6 Bytes Compresion Ratio 50%

  10. Color Model Changing Original Picture RGB True Color] Color model Changing] Subsampling User input Discrete Cosine Transformation (DCT) Quantisation User input Huffman Encoding Picture in JFIF Format

  11. DCT transformation where for for

  12. DCT Pro 8x8 pixels block

  13. Example 139 144 149 153 155 155 155 155 144 151 153 156 159 156 156 156 150 155 160 163 158 156 156 156 159 161 162 160 160 159 159 159 159 160 161 162 162 155 155 155 161 161 161 161 160 157 157 157 162 162 161 163 162 157 157 157 162 162 161 161 163 158 158 158

  14. DCT Coeficients AC coeficient (= 8 times average brightness)

  15. Quantisation Original Picture RGB True Color] Color model Changing] Subsampling User input Discrete Cosine Transformation (DCT) Quantisation User input Huffman Encoding Picture in JFIF Format

  16. Quantisation Matrix (Brightnes, 90% quality)

  17. Quantisation Matrices • . Defined by JPEG . For Brightness, for Cb, for Cr • Defined for (so called) quality 10% and 90%. • For quality values between 10% and 90% linear interpolation is used • For quality values under 10% or above 90% linear extrapolation can me mathematicaly used, but it is not recomanded by JPEG.

  18. Quantisation Coeficients

  19. AC coeficients • Stored separately • No comprimation • Possible use for a quick picture prewiew

  20. Quantisation Original Picture RGB True Color] Color model Changing] Subsampling User input Discrete Cosine Transformation (DCT) Quantisation User input Huffman Encoding Picture in JFIF Format

  21. Huffmanov encoding + Run Lenghth Encoding

  22. Example 0, -2, -1, -1, -1, 0, 0, -1, -1

  23. Quantisation Original Picture RGB True Color] Color model Changing] Subsampling User input Discrete Cosine Transformation (DCT) Quantisation User input Huffman Encoding Picture in JFIF Format

  24. Reconstructed DCT coefficients table

  25. Inverse DCT

  26. Differencies

More Related