Вы находитесь на странице: 1из 6

DISCRETE COSINE TRANSFORM

The DCT is a widely used transformation for data compression. It is an orthogonal transform,
which has a fixed set of (image independent) basis functions, an efficient algorithm for
computation, and good energy compaction and correlation reduction properties. The DCT-II is
probably the most commonly used form, and is often simply referred to as "the DCT". [1]
In many images, there will be high correlation between adjacent pixels intensity values, by
eliminating the redundant information we can achieve compression. When we have applied DCT
transformation for a signal, most of the energy is concentrated in the lower frequencies of
components. Compression is achieved by sending only transformed lower frequent components
and at the receiver side we pad with zeroes for higher frequency components and compute
inverse transform and reconstruct the original signal/image.

FORWARD 1D DCT-II:
The most common DCT definition of a 1-D sequence of length N is

N
1
x n cos [ (n+ )K ]K =0,1 , N 1
2
N 1

X K =C K
n=0

C k =1 for k =0,

C k=

2
for k 0
N

This above equation Xk represents a linear combination of basis vectors. The case of K=0,X(0) is
the first transform coefficient is average value of the sequence. The first term is referred as DC
coefficient and other transform coefficients are referred as AC coefficients.


N
The plot of

1
x n cos [ (n+ )K ]
2

for N=8 is shown below, the top left waveform shows us

N1

n=0

the DC component and rest seven components are AC components at progressive increasing
frequencies, these waveforms are called as Cosine Basis Functions(CBF). These basis functions
are orthogonal imply that if a waveform is multiplied with other waveform at all points and
summed it results 0. Orthogonal waveforms are independent i.e. none of the basis function can
be written in the combination of other basis functions.

If the sample sequence has more than N points, then we can subdivide it and apply transform for
small chunk of N points, in this method basis functions value doesnt change for every cycle of
computation, only the pixel value x n will change and so we can compute these basis functions
offline and then multiply with sub-sequences.

BACKWARD DCT:
Backward DCT is calculated by below equation.

N
1
C K { X K cos [ (n+ ) K ]} K=0,1 , N1
2
N 1

x n=
K =0

2-Dimensional DCT:
The 2-D DCT is a direct extension of the 1-D case and is given by

N
1
1
cos [ (x + ) v ]f ( x , y)cos [ ( y + ) u ]
2
2
N 1

y=0

N1

X (u , v )=C u C v
x=0

u , v=0,1 , N1

PROPERTIES OF DCT
ENERGY COMPACTION:

A transforms efficiency can be known by its packing of data into fewer coefficients as possible,
as quantizer can discard relatively lower amplitude parts, DCT exhibits good energy compaction
for highly correlated images.

DECORRELATION:
The main advantage of applying transform over an image is that we can remove redundancy of
neighboring pixels and this would lead to uncorrelated transform coefficients which would be
encoded independently.

Seperability:
The multi dimensional DCT can be computed by successive 1-D transforms. For a 2-D DCT we
can compute 2D DCT coefficients in two steps by computing 1D DCT on rows and columns
successively.

3 DIMENSIONAL DCT
We can extend 2 Dimensional DCT to Three dimension(time) DCT, In addition to two spatial
dimensions we consider time domain additionally, so N RxNC block is extended to NRxNCxNF
cube. There are NF successive frames of an NRxNC blocks forming a cube in 3D-DCT space.
FORWARD 3-D DCT:
N R 1

F(u , v , w)=C3 D

x=0

N C1

N F 1

f ( x , y , z ) cos ( t 1 ) cos ( t 2 ) cos( t 3 )


y=0

z=0

t 1 =[

Where

C 3 D=

1
( x+ )u]
NR
2

t 2 =[

1
( y+ )v]
NC
2

t 3 =[

1
(z + )w]
NF
2

8
C (u ) C ( v ) C ( w)
N R NC N F

C( k )=1 for k 0
NR

is number of Rows, N C

is number of columns and

NF

is number of frames and

f(x,y,z) is a pixels intensity value.

Backward 3D DCT:
N R 1

N C 1

f ( x , y , z )=
u =0

v=0

N F 1

C 3 D F ( u , v , w ) cos ( t1 ) cos ( t 2 ) cos( t3 )

w=0

Since DCT is a seperable transform we can apply three 1D DCTs along rows, colums and
frames successively.

Video cube of 8 x 8 x8 pixels.

Вам также может понравиться