N U X X F U A U C: 1-D Discrete Cosine Transform

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 18

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
 u0
 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.5 0.5 0.5 0.5

0 0 0 0

-0.5 -0.5 -0.5 -0.5

-1.0 -1.0 -1.0 -1.0

u=4 u=5 u=6 u=7


1.0 1.0 1.0 1.0

0.5 0.5 0.5 0.5

0 0 0 0

-0.5 -0.5 -0.5 -0.5

-1.0 -1.0 -1.0 -1.0


1-D Basis Functions N=16
Example: 1D signal
2-D DISCRETE COSINE TRANSFORM
DCT

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.

• The DCT has excellent energy compaction


properties.

• There are fast algorithms to compute the


DCT similar to the FFT.
2-D Basis Functions N=4
v
0 1 2 3

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

N  point 2 N  point DFT 2 N  point N  point


f ( x)  g( x)  G (u )  C f (u )
From DFT to DCT (Cont.)

DCT has a higher compression ration than DFT


- DCT avoids the generation of spurious spectral
components
Transform (DCT)

You might also like