Jpeg
Jpeg
JPEG
JPEG
• JPEG = Joint Photographic Experts Group
8x8 blocks
Table Table
Specifications Specifications
Compressed Entropy
D equantizer IDCT Reconstructed
Image Data Decoder Image Data
Table Table
Specifications Specifications
Divide image into NN blocks
8x8 block
High High
Low High
2-D Transform Coding
y00 + y23
y01 y10 y12
...
1-D DCT basis functions: N=8
u=0 u=1 u=2 u=3
1.0 1.0 1.0 1.0
0 0 0 0
0 0 0 0
1
N 1
2 j 1k N
for k 0
x j k C k cos
k
k 0 2 N 2
N
for k 1,2,..., N 1
Zig-zag ordering of DCT coefficients
Matlab: y=dct(x)
Distribution of DCT coefficients
DC coefficient AC coefficient
hi
1
12
p ( x) dx
i
13 3
Optimal bit allocation for DCT coefficients
Solution of the optimization task with Lagrange multiplier
method:
B 1 i 1 2
hi
Bitrate: bi log 2 2 log 2
N 2 2 H
Distortion: D NH 2 2 B N
1N 1N
N 1
2 N 1
where k
2
; H hk
k 0 k 0
Minimal distortion
Distortion: D NH 2 2 B N
1N
N 1
2
where k
2
k 0
yyqq(k,l)=round[y(k,l)/Q(k,l)]
(k,l)=round[y(k,l)/Q(k,l)]
zz(k,l)=y
(k,l)=yqq(k,l)·Q(k,l)
(k,l)·Q(k,l)
Examples: 236/16 15
-22/11 -2
See: x=idct(y)
Original block
Encoding of quantized DCT coefficients