Professional Documents
Culture Documents
DFT Computation
DFT Computation
DFT Computation
http://fourier.eng.hmc.edu/e101/lectures/Image_Processing/node4.html
next
previous
Next: Fast Fourier Transform Up: Image_Processing Previous: Four Forms of Fourier
DFT Computation
Vector Form of DFT Consider an N by N matrix with its (m,n)th element defined as:
where
or
or in matrix form:
where and are N by 1 column (vertical) vectors representing the signal in time and frequency domain, respectively. Similarly, the inverse transform DFT can be written as
or in matrix form:
where
. Left multiplying
i.e.,
, or satisfying
is symmetric.
1 of 6
16-04-2012 21:02
DFT Computation
http://fourier.eng.hmc.edu/e101/lectures/Image_Processing/node4.html
satisfying is called an orthogonal matrix. Any such unitary or orthogonal matrix define a unitary or orthogonal transform:
can be used to
for (n=0; n<N; n++) { Xr[n]=Xi[n]=0; for (m=0; m<N; m++) { w=2*pi*m*n/N; if (forward) w=-w; wr=cos(w); wi=sin(w); Xr[n]=Xr[n]+wr*xr[m]-wi*xi[m]; Xi[n]=Xi[n]+wr*xi[m]+wi*xr[m]; } Xr[n]=Xr[n]/sqrt(N); Xi[n]=Xi[n]/sqrt(N); }
Example 1 Consider a discrete signal of real values (imaginary components are 0):
or
2 of 6
16-04-2012 21:02
DFT Computation
http://fourier.eng.hmc.edu/e101/lectures/Image_Processing/node4.html
or
, we find
and get
Note that the above matrix multiplication is a complex operation, and the product of two complex numbers is defined as
3 of 6
16-04-2012 21:02
DFT Computation
http://fourier.eng.hmc.edu/e101/lectures/Image_Processing/node4.html
and
In particular,
and
4 of 6
16-04-2012 21:02
DFT Computation
http://fourier.eng.hmc.edu/e101/lectures/Image_Processing/node4.html
and
of a real signal
and
For
is odd symmetric:
Spectrum Centralization In the spectrum of the example above, the N values DC component is on the left, the highest frequency component represent all frequency components. The is in the middle (not on the right!), while the
low frequency components are close to the two ends. Alternatively, it we want the DC component in the middle and the
5 of 6
16-04-2012 21:02
DFT Computation
http://fourier.eng.hmc.edu/e101/lectures/Image_Processing/node4.html
higher components close to the two ends, we can centralize the spectrum by shifting it to either left or right by
When
, we have
i.e., by changing the sign of all time samples with an odd index ( with DC component in the middle.
next
previous
Next: Fast Fourier Transform Up: Image_Processing Previous: Four Forms of Fourier Ruye Wang 2007-11-15
6 of 6
16-04-2012 21:02