Lecture 8 - JPEG Compression (Part 3) : Klara Nahrstedt Spring 2012
Lecture 8 - JPEG Compression (Part 3) : Klara Nahrstedt Spring 2012
Lecture 8 JPEG
Compression (Part 3)
Klara Nahrstedt
Spring 2012
Lossy Coding
Lossless Coding
RLE, Huffman or
Arithmetic
CS 414 - Spring 2012 Coding
JPEG Compression (Baseline)
8x8 blocks Source
Image
Image Preparation
B
G
R
DCT-based encoding
Entropy Compressed
FDCT Quantizer
Encoder image data
Image Processing
Table Table
1
for u 0,
where C (u ) 2
1 otherwise
1
for u 0,
where C (u ) 2
1 otherwise
Inverse DCT:
2 m 1 n 1 (2 x 1)u (2 y 1)v
I ( y, x)
nm v 0 u 0
F ( v , u )C (u )C ( v ) cos
2n
* cos
2m
Visualization of 2D DCT Basis
FunctionsIncreasing frequency
Increasing frequency
F(0,1) . F(7,7)
are called AC coefficients
Their frequency is non-zero in one or both
directions
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99
values
2.76M
600K
350K
240K
144K
88K