You are on page 1of 8

Fourier Transform and Data Compression

Problem: compress audio and video data for more efficient storage/transmission.
General Approach:
Transform Quantize Encode
x
X
LOSSLESS LOSSY
X

Inverse
Transform
Decode
x

s
s
The Fourier Series is an example of an efficient representation of a signal. In fact take any
continuous time signal with finite length :

+
=
=
k
t kF j
k
e a t x
0
2
) (
t
0
T
0
T
0
t
) (t x
| |
k
a
k
1 2 3 4 1 2 3 4
}
=
0
0
0
2
0
) (
1
T
t kF jk
k
dt e t x
T
a
t
Recall Parcevals Theorem:
< =
}

+
=
0
0
2
0
2
| ) ( |
1
| |
T
k
k
dt t x
T
a

0 lim =

k
k
a
We can approximate a continuous time signal arbitrarily closely by a finite set of coefficients.
However: large errors at discontinuities.
) (t x
) ( t x
N
Example:
t
0
0
T
) (t x
discontinuities
Large errors at the
boundaries, since we
assume the signal to be
extended periodically.
t
0
0
T
) (t x
E
0
T
We can easily solve this problem by expanding the signal

s s
s s
=
0 if ) (
0 if ) (
) (
0
0
t T t x
T t t x
t x
E
No Discontinuities at the Boundaries
From the symmetry, all Fourier Coefficients are real. Therefore

+
=
+ =
1
0 0
) cos( ) (
k
k
t kF c c t x t
0
0 T t s s
}
=
0
0
0
) cos( ) (
T
k k
dt t kF t x m c t with

>
=
=
1 if
2
0 if
1
0
0
k
T
k
T
m
k
This is easily extended to discrete time signals.
There are several ways of defining the DCT (Discrete Cosine Transform). For example:
1
2
0
1
2
0
(2 1)
[ ] { [ ]} [ ] [ ]cos , 0,..., 1
2
(2 1)
[ ] { [ ]} [ ] [ ]cos , 0,... 1
2
N
II
N
n
N
II
N
k
k n
X k DCT II x n C k x n k N
N
k n
x n IDCT II X k C k X k n N
N
t
t

=
+
| |
= = =
|
\ .
+
| |
= = =
|
\ .

=
=
=
0 if 2 / 1
0 if 1
] [
k
k
k C
with
DCT II
DCT II
x II
X
DCT
Example:
) (t x
Divide the signal into blocks of length N and take the DCT within each block:
n
N ) 1 (
DFT DFT DFT

X
N
127 128
) (i p
all values with similar p(i):
High Entropy
127 128
) (i p
Small values have large p(i),
large values have small p(i):
Low Entropy
DFT or
DCT
] [n x
signal
DCT
Histogram
Histogram
Example:

You might also like