JPEG Coding
description
Transcript of JPEG Coding
JPEG Coding
CHEN GuowangFANG Wei
HUANG Baihan
General Coding
Source Data Source Coding Channel Coding Transmission
Reducing Redundancy
Adding Redundancy to
Ensure Correctness
JPEG Compression
Compressing each 8x8 block
Source Image Color Space Transformation Down Sample Break into 8x8
Blocks
2-D DCT Quantization Lossless Coding Compressed Image
Color Space Transformation• Y: brightness• Cb & Cr: blue-difference and red-difference
Original Down-sample all components
Preserve Y component
Compressing each 8x8 block
JPEG Compression
Source ImageColor Space
Transformation:RGB to YCbCr
Down Sample Cb, Cr
Components
Break into 8x8 Blocks
2-D DCT Quantization Lossless Coding Compressed Image
2-D Basis Images
2-D DCT
Input image block After 2-D DCT
139 144 149 153 155 155 155 155144 151 153 156 159 156 156 156150 155 160 163 158 156 156 156159 161 162 160 160 159 159 159159 160 161 162 162 155 155 155161 161 161 161 160 157 157 1571
( ,
2
)
62 16
f x y
161 163 162 157 157 157162 162 161 161 163 158 158 158
1260 1 12 5 2 2 3 123 17 6 3 3 0 0 111 9 2 2 0 1 1 07 2 0 1 1 0 0 0
( , )1 1 1 2 0 1 1 1
2 0 2 0 1 1 1 11 0 0 1 0 2 1 13 2 4 2 2 1 1 0
F u v
Quantization
÷ =
Coefficient Matrix ÷ Quantization Matrix = Result
Zigzag Scan & Run-length Coding
Numbers of Zeros Before Value
1 -2
0 -1
0 -1
0 -1
2 -1
End of Block
Q & A