N U X X F U A U C: 1-D Discrete Cosine Transform
N U X X F U A U C: 1-D Discrete Cosine Transform
N U X X F U A U C: 1-D Discrete Cosine Transform
DCT
N 1
(2 x 1)u
C (u ) a (u ) f ( x) cos
x 0 2 N
u 0,1, , N 1
1
u0
N
a(u )
2
u 1, , N 1
N
1-D INVERSE DISCRETE COSINE TRANSFORM
IDCT
N 1
(2 x 1)u
f ( x) a (u )C (u ) cos
u 0 2 N
1-D 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
N 1N 1
(2 x 1)u (2 y 1)v
C (u , v) a (u )a (v) f ( x, y ) cos cos
x 0 y 0
2N
2 N
N 1N 1
(2 x 1)u (2 y 1)v
f ( x, y ) a (u )a (v)C (u , v) cos cos
u 0 v 0
2N
2 N
u, v 0,1, , N 1
ADVANTAGES
• Notice that the DCT is a real transform.
3
2-D Basis Functions N=8
Separable
Example: 2D signal
8x8 Block DCT
Example: Energy Compaction
Relation between DCT and DFT
• Define
g ( x ) f ( x ) f (2 N 1 x )
f ( x ), 0 x N 1
f ( 2 N 1 x ), N x 2 N 1