Download presentation
Presentation is loading. Please wait.
1
JPG picture compresion
1
2
Terminology JFIF = JPEF File Interchange Format JFIF Variants
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) 2
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 3
4
Color Model Changing User input User input
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
5
Color Model Changing Brightness 5
6
Color Model Transformation
RGB → Y Cb Cr Y= 0,299*R ,587*G + 0,114*B (brightness) Cb = - 0,1687*R - 0,3313*G + 0,5*B Cr = 0,5*R ,4187*G - 0,0813*B + 128 R = Y *(Cr-128) G = Y *(Cb-128) *(Cr-128) B = Y *(Cb-128) 6
7
Color Model Changing User input User input
Original Picture RGB True Color] Color model Changing] Subsampling User input Discrete Cosine Transformation (DCT) Quantisation User input Huffman Encoding Picture in JFIF Format 7
8
Subsampling Cb,Cr Compresion Ratio 67% 2 pixels subsampling Y1 Cb1Cr1
6 Bytes Y1 Y2 ØCb ØCr 4 Bytes Compresion Ratio 67% 8
9
Subsampling Cb,Cr Compresion Ratio 50% 4 pixels subsampling Y1 Cb1Cr1
12 Bytes Y3 Cb3Cr3 Y4 Cb4Cr4 Y1 Y2 Y3 Y4 ØCb ØCr 6 Bytes Compresion Ratio 50% 9
10
Color Model Changing User input User input
Original Picture RGB True Color] Color model Changing] Subsampling User input Discrete Cosine Transformation (DCT) Quantisation User input Huffman Encoding Picture in JFIF Format 10
11
DCT transformation where for for
12
DCT Pro 8x8 pixels block 12
13
Example 13
14
DCT Coeficients AC coeficient (= 8 times average brightness) 14
15
Quantisation User input User input Original Picture RGB True Color]
Color model Changing] Subsampling User input Discrete Cosine Transformation (DCT) Quantisation User input Huffman Encoding Picture in JFIF Format 15
16
Quantisation Matrix (Brightnes, 90% quality)
16
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
18
19
AC coeficients Stored separately No comprimation Possible use for a quick picture prewiew
20
Quantisation User input User input Original Picture RGB True Color]
Color model Changing] Subsampling User input Discrete Cosine Transformation (DCT) Quantisation User input Huffman Encoding Picture in JFIF Format 20
21
Huffmanov encoding + Run Lenghth Encoding 21
22
Example 0, -2, -1, -1, -1, 0, 0, -1, -1
23
Quantisation User input User input Original Picture RGB True Color]
Color model Changing] Subsampling User input Discrete Cosine Transformation (DCT) Quantisation User input Huffman Encoding Picture in JFIF Format 23
24
Reconstructed DCT coefficients table
25
Inverse DCT
26
Differencies
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.