0% found this document useful (0 votes)
17 views23 pages

Lecture 12

The document discusses the Fourier Transform and its applications in digital image processing, highlighting the differences between time and frequency domains. It explains the existence of the Fourier Transform for signals with finite sums and introduces the Discrete Fourier Transform (DFT) and the Fast Fourier Transform (FFT) algorithm, which improves computational efficiency. The FFT algorithm reduces the complexity from O(N^2) to O(N log N) for computing DFTs, emphasizing that it is simply a faster method for the same mathematical process.

Uploaded by

raad.r.abzakh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views23 pages

Lecture 12

The document discusses the Fourier Transform and its applications in digital image processing, highlighting the differences between time and frequency domains. It explains the existence of the Fourier Transform for signals with finite sums and introduces the Discrete Fourier Transform (DFT) and the Fast Fourier Transform (FFT) algorithm, which improves computational efficiency. The FFT algorithm reduces the complexity from O(N^2) to O(N log N) for computing DFTs, emphasizing that it is simply a faster method for the same mathematical process.

Uploaded by

raad.r.abzakh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

Digital Image Processing

Fourier Transform
(II)
Time Domain vs Frequency Domain
Last time, we saw the equations that
calculate the Fourier Transform and its
inverse.
Use the Fourier transform, denoted F, to
get the weights (amount) of each
harmonic component in a signal:

F s   F  f t   f t e  j2 s t dt

Time Domain vs Frequency Domain
And use the Inverse Fourier Transform,
denoted F-1, to recombine the weighted
harmonics into the original signal:


f t   F -1F s   Fs  e j2 s t ds

Time Domain vs Frequency Domain
This gives us two ways of looking at a
signal:
 either by looking at the signal itself in the time
domain or
by looking at its Fourier transform in the
frequency domain.
Does the Fourier Transform of a
?Function Always Exist
This raises a valid question: does the
Fourier Transform of a signal always
exist?
The answer is yes, as long as the signal
has a finite sum (area under the curve):

f t  dt

 B

For some non-infinite bound B


Does the Fourier Transform of a
?Function Always Exist
Basically, if the bound on the signal’s sum
is infinite, at least one of the weights F(s)
must also become infinite.
If the signal f(t) is periodic, we only need
to make this test over one period P:
P

f t  dt
0
 B
Does the Fourier Transform of a
?Function Always Exist
A constant function technically doesn’t meet this
bounding requirement.
So, it’s weight at s = 0 is infinite.
However, if we treat a constant function as the
limit of cos(s) as s goes to 0, then its Fourier
Transform in the limit goes to a delta function.
Thus, the integrated transform is still finite. (We’ll
come back later and talk more about integrated
transforms.)
The Discrete Fourier Transform
Because sinusoids repeat periodically, the
Fourier Transforms for periodic functions tend to
be simpler than those for non-periodic ones.
Let us first consider the one-dimensional case:
 If we take a function with limited domain N units wide
and cause it to repeat every N units,
 Then, the spectrum of the periodic function must only
have components with frequencies 1/N, 2/N, ... N/N
 all sinusoids that make up the Fourier Transform of this
periodic image must resynchronize at the edges of the
image in order to begin again.
The Discrete Fourier Transform
Instead of continuous frequency space,
we have a discrete one.
The Fourier transform thus becomes

N1
1
F s  
N
 f n e
n 0
 j2 s n N
The Discrete Fourier Transform
and,
N1
f n   F s e j2 s n N

s 0

Notice that the n in the exponent from the


continuous transform becomes n/N in the
discrete transform so that it ranges from 0
to 1 as one goes across the domain of the
function.
The Discrete Fourier Transform

1. What would the code for the discrete


Fourier transform look like?
2. What would the computational complexity
be?
The Fast Fourier Transform
Algorithm (FFT)
If we let
 j2 N
WN  e

Then, the DFT can be written as

N1
1
F s  
N
 f xW
x 0
sx
N
The Fast Fourier Transform
Algorithm (FFT)
If N is a multiple of 2, i.e N = 2M
Then
2M  1
1
F s  
2M
 f xW
x 0
sx
2M
FFT Algorithm
If we separate the ODD and EVEN terms

M1
 1 
  f 2 x W s 2 x 
2M 
M
1  
x 0

F s    
2 M1 
1
  f 2 x  1W2 M 
s 2 x 1
 M x 0 
FFT Algorithm
However,

2s s
W 2M W M

and
2 s 1 s s
W 2M W W
M 2M
FFT Algorithm
Therefore,

M1
 1 
  f 2 x Wsx
M 
M
1  
x 0

F s    
2 M1 
1
  f 2 x  1WM W2 M 
sx s
 M x 0 
FFT Algorithm
Notice that this is the Fourier Transform of
the even terms (we’ll call it Feven(s)) plus a
constant Ws2M times the Fourier Transform
of the odd terms (we’ll call it Fodd(s)).
FFT Algorithm
This means that the first M terms of the
Fourier Transform of 2M items can be
computed by
1
F s  
2
 Feven s   Fodd s Ws
2M 
Similarly, the last M terms can be computed by
1
F s  
2
 Feven s   Fodd s Ws
2M 
FFT Algorithm
This means that an N-point transform can
be computed by separating the odd and
even elements of the original function,
computing their individual N/2 element
DFTs, and then combining them
FFT Algorithm
If N is a power of two (N=2p),we can
repeat this process recursively
Eventually, we get down to two one-point
transforms, each of which is its own
transform
We combine these, recombine the results,
recombine those results, etc. until we have
the complete transform
FFT Algorithm
This divide-and-conquer Fast Fourier
Transform (FFT) algorithm takes O(N
logN) operations,
as compared to O(N2) for the Discrete
Fourier Transform.
FFT Algorithm
You should realize that the Fast Fourier
Transform is nothing but an algorithm for
computing the Discrete Fourier Transform
in a faster way. It is not anything different.
A lot of people say they “compute the FFT
of an image”, but doing so is like saying
they “quicksort some data”.
FFT Algorithm
One sorts data
 Quicksort is one algorithm for doing it.
Likewise, one computes Discrete Fourier
Transforms
 The FFT is one algorithm for doing it.
Also keep in mind that the FFT only works when
N is a power of two.
When N is not a power of two, one can usually
pad the data to make it so.

You might also like