FOURIER
TRANSFORM
APPLICATION
TO
SIGNAL
PROCESSING
Pawel
A.
Penczek
The
University
of
Texas
Houston
Medical
School,
Department
of
Biochemistry
Wednesday, August 24, 2011
FOURIER TRANSFORMS
[Link] Transform
[Link] Series
[Link] Fourier Transform (DFT)
Wednesday, August 24, 2011
FOURIER TRANSFORMS
The Fourier transform is a generalization of the complex Fourier series
in the limit of L .
F (s) =
f ( x)e
2 isx
dx
f ( x) =
F (s) e
Wednesday, August 24, 2011
2 isx
ds
FOURIER TRANSFORMS
F (s) =
f ( x)e
2 isx
dx
f ( x) =
F (s) e
2 isx
ds
Euler's formula:
e = cos x + i sin x
ix
Since any function can be split into even and off portions:
1
fE ( x ) = f ( x ) + f ( x )
2
f ( x ) = fE ( x ) + fO ( x )
1
fO ( x ) = f ( x ) f ( x )
2
a Fourier transform can always be expressed in terms of the
Fourier cosine transform and Fourier sine transform as
F (s) =
f ( x ) cos ( 2 isx ) dx i f ( x ) sin ( 2 sx ) dx
E
Wednesday, August 24, 2011
COMPLEX ALGEBRA
Complex numbers versus vectors
i = 1
z,u
a,b
2
z = a + ib
z = a ib
z = a +b
2
zu = ?
zu = ?
z /u =?
*
Wednesday, August 24, 2011
DIRAC (DELTA) FUNCTION*
Fourier transform of a delta function
+
2 isx
x
e
dx = 1
(
)
2 isx
e
ds = ( x )
The Dirac delta function as the limit (in the sense of distributions) of the sequence of
Gaussians:
1 x 2 a2
a ( x) =
e
a0 a
The Dirac delta function, or function, is (informally) a generalized function
depending on a real parameter such that it is zero for all values of the parameter except
when the parameter is zero, and its integral over the parameter from to is equal to
one. It is also known as unit impulse function.
*a
misnomer, Dirac's delta is not a function, it is a distribution!
Wednesday, August 24, 2011
FOURIER PAIRS
Gaussian function
Wednesday, August 24, 2011
top-hat function
FOURIER PAIRS
cosine function
sine function
Wednesday, August 24, 2011
PROPERTIES OF FOURIER TRANSFORM
Linearity
If h ( x ) = af ( x ) + bg ( x ) , then H ( s ) = aF ( s ) + bG ( s )
Density scaling
Rotation
FT ( f ( Rx )) = H ( Rs )
If R is a rotation matrix,
Rotation of FT,
of power spectrum
Translation
If h ( x ) = f ( x t ) , then H ( s ) = ei 2 ts F ( s )
Lossless shift
Scaling
1 s
If h ( x ) = f ( ax ) , a 0, then H ( s ) = F
a a
Scaling
Conjugation
Parseval's theorem
Wednesday, August 24, 2011
FT 1 H ( s ) = f ( x )
f ( x)
dx =
F (s)
1D - mirror
2D - rotation by 180o
ds
Preservation of energy,
power spectrum
CONVOLUTION THEOREM
h = f g
h (t ) =
f ( x ) g ( x t ) dx = FT 1 ( F ( s ) G ( s ))
CROSS-CORRELATION THEOREM
c (t ) =
f ( x ) g ( x + t ) dx = FT ( F ( s ) G ( s ))
1
SPECIAL CASE OF CCF, AUTOCORRELATION FUNCTION
a (t ) =
f ( x ) f ( x + t ) dx = FT ( F ( s ) F ( s )) = FT
Wednesday, August 24, 2011
( F (s) )
2
CONVOLUTION THEOREM
h = f g
h (t ) =
f ( x ) g ( x t ) dx = FT 1 ( F ( s ) G ( s ))
CROSS-CORRELATION THEOREM
c (t ) =
f ( x ) g ( x + t ) dx = FT ( F ( s ) G ( s ))
1
SPECIAL CASE OF CCF, AUTOCORRELATION FUNCTION
a (t ) =
f ( x ) f ( x + t ) dx = FT ( F ( s ) F ( s )) = FT
Wednesday, August 24, 2011
( F (s) )
2
FOURIER SERIES
A Fourier series is an expansion of a periodic function in terms of an infinite sum of sines and cosines.
Fourier series make use of the orthogonality relationships of the sine and cosine functions.
period
1
f ( x ) = a0 + an cos ( nx ) + bn sin ( nx )
2
n =1
n =1
1
a0 = f ( x ) dx
1
an = f ( x ) cos ( nx ) dx
1
bn = f ( x ) sin ( nx ) dx
Wednesday, August 24, 2011
FOURIER SERIES
GIBBS PHENOMENON
Ringing artifact near sharp edges that is due to truncation of Fourier series. Note the
amplitude of oscillation is constant, does not depend on the number of Fourier coefficients
included. Often observed when filter is incorrect (too sharp). Ringing can be reduced by
making filter "smooth" - an extreme is a Gaussian filter. Regrettably, the cut-off frequency
of a Gaussian filter is poorly defined and much noise in high frequencies passes through.
There are many filters designed that offer a trade-off between sharpness (and thus
artifacts) and smoothness (fewer artifacts but more noise): Butterworth, tangent..
Wednesday, August 24, 2011
Digital filters.
Comparison of Gaussian and Butterworth filters.
Wednesday, August 24, 2011
Effects of top-hat, Gaussian, and Butterworth filters on a step function
FOURIER SERIES
AS AN EXPANSION IN AN ORTHONORMAL BASIS
1
f ( x ) = a0 + an cos ( nx ) + bn sin ( nx )
2
n =1
n =1
einx = cos nx + i sin nx
Using Euler's formula
f ( x) =
ce
n =
inx
with Fourier coefficients
(complex!) given by
1
cn =
2
f ( x ) einx dx
an = cn + c n ,
n = 0,1, 2,
bn = i ( cn c n ) ,
n = 1, 2,
The set of functions en = einx , n forms an orthonormal basis for the Hilbert space L2 [ , ]
(of squared integrable functions on [ , ] ) with an inner product
Indeed,
en , em
Wednesday, August 24, 2011
1
=
2
1
inx imx
e e dx = 2
i (n m) x
e
dx = nm .
1
f,g =
2
def
f ( x ) g ( x ) dx.
DISCRETE FOURIER TRANSFORM (DFT)
AS A REPRESENTATION IN AN ORTHONORMAL BASIS
DFT is a transformation of a finite (and presumably periodic) sequence of real or complex number
into a finite space whose orthonormal basis is spanned by complex exponentials (discretized).
N
X k = xn e
2 i
kn
N
k = 0,, N 1
xn
n=0
2 i
kn
1 N
N
xk = X k e
N k=0
n = 0,, N 1
Re ( X ) 0 Re ( X ) Im ( X )
0
1
1
Wednesday, August 24, 2011
Re ( X2 ) Im ( X 3 ) Re ( X 3 ) Im ( X 3 )
Re ( X 4 ) 0
DISCRETE FOURIER TRANSFORM (DFT)
AS A REPRESENTATION IN AN ORTHONORMAL BASIS
DFT is a transformation of a finite (and presumably periodic) sequence of real or complex number
into a finite space whose orthonormal basis is spanned by complex exponentials (discretized).
N
X k = xn e
2 i
kn
N
k = 0,, N 1
xn
n=0
2 i
kn
1 N
N
xk = X k e
N k=0
n = 0,, N 1
Re ( X ) 0 Re ( X ) Im ( X )
0
1
1
Wednesday, August 24, 2011
Re ( X2 ) Im ( X 3 ) Re ( X 3 ) Im ( X 3 )
Re ( X 4 ) 0
DISCRETE FOURIER TRANSFORM (DFT)
AS A REPRESENTATION IN AN ORTHONORMAL BASIS
DFT is a transformation of a finite (and presumably periodic) sequence of real or complex number
into a finite space whose orthonormal basis is spanned by complex exponentials (discretized).
N
X k = xn e
2 i
kn
N
k = 0,, N 1
xn
n=0
2 i
kn
1 N
N
xk = X k e
N k=0
n = 0,, N 1
Re ( X ) 0 Re ( X ) Im ( X )
0
1
1
Wednesday, August 24, 2011
Re ( X2 ) Im ( X 3 ) Re ( X 3 ) Im ( X 3 )
Re ( X 4 ) 0
DISCRETE FOURIER TRANSFORM (DFT)
AS A REPRESENTATION IN AN ORTHONORMAL BASIS
DFT is a transformation of a finite (and presumably periodic) sequence of real or complex number
into a finite space whose orthonormal basis is spanned by complex exponentials (discretized).
N
X k = xn e
2 i
kn
N
xn
k = 0,, N 1
n=0
2 i
kn
1 N
N
xk = X k e
N k=0
n = 0,, N 1
Re ( X ) 0 Re ( X ) Im ( X )
0
1
1
X0
X1
X N 1
wN = e
wN0i0
1i0
w
=
N
wN( N 1)i0
2 i
Wednesday, August 24, 2011
wN0i1
wN0i( N 1)
w1i1
N
N 1)
w1i(
N
wN( N 1)i1
wN( N 1)i( N 1)
Re ( X2 ) Im ( X 3 ) Re ( X 3 ) Im ( X 3 )
x
0
x1
x N 1
Re ( X 4 ) 0
FAST FOURIER TRANSFORM (FFT) ALGORITHM FOR DFT
RADIX-2
Cooley, James W., and John W. Tukey, "An algorithm for the machine calculation of complex Fourier series," Math. Comput. 19, 297301 (1965)
Gauss, Carl Friedrich, "Nachlass: Theoria interpolationis methodo nova tractata", Werke, Band 3, 265327 (Knigliche Gesellschaft der Wissenschaften, Gttingen, 1866) (1805)
X0
X1
X N 1
wN = e
wN0i0
1i0
w
=
N
wN( N 1)i0
2 i
Wednesday, August 24, 2011
wN0i1
wN0i( N 1)
w1i1
N
N 1)
w1i(
N
wN( N 1)i1
wN( N 1)i( N 1)
FN - N2 fps
x
0
x1
x N 1
FAST FOURIER TRANSFORM (FFT) ALGORITHM FOR DFT
RADIX-2
Cooley, James W., and John W. Tukey, "An algorithm for the machine calculation of complex Fourier series," Math. Comput. 19, 297301 (1965)
Gauss, Carl Friedrich, "Nachlass: Theoria interpolationis methodo nova tractata", Werke, Band 3, 265327 (Knigliche Gesellschaft der Wissenschaften, Gttingen, 1866) (1805)
X0
X1
X N 1
wN = e
=
8
w
0
0
0
w
0
0
0
w
0
0
0
w
0
0
0
wN0i0
1i0
w
=
N
wN( N 1)i0
2 i
0
w
0
0
0
w
0
0
Wednesday, August 24, 2011
wN0i1
wN0i( N 1)
w1i1
N
N 1)
w1i(
N
wN( N 1)i1
0
w
0
0
0
w
0
0
wN( N 1)i( N 1)
x
0
x1
x N 1
FN - N2 fps
0
0
w
0
0
0
w
0
0
0
w
0
0
0
w
0
0
0
0
w
0
0
0
w
0
0
0
w
0
0
0
w
w
0
0
0
w
0
0
0
0
w
0
0
0
w
0
0
w
0
0
w
0
0
0
0
w 0
0 w
0
0
0
0
0
0
w
0
0
0
w
0
0
0
0
w
0
0
0
w
0
0 w
0
0 0
w 0 0
0 w 0
0
0 w
0
0 0
w
0 0
0
w 0
0
w
0
0
0
w
0
0
0
0
w
0
0
0
w
0
0
0
0
w
0
0
0
w
w
0
0
0
0
w
0
0
0
0
w
0
0
0
0
w
w 0
0
0
0 w 0
0
0
0 w 0
0
0
0 w
FAST FOURIER TRANSFORM (FFT) ALGORITHM FOR DFT
RADIX-2
Cooley, James W., and John W. Tukey, "An algorithm for the machine calculation of complex Fourier series," Math. Comput. 19, 297301 (1965)
Gauss, Carl Friedrich, "Nachlass: Theoria interpolationis methodo nova tractata", Werke, Band 3, 265327 (Knigliche Gesellschaft der Wissenschaften, Gttingen, 1866) (1805)
X0
X1
X N 1
wN = e
=
8
w
0
0
0
w
0
0
0
w
0
0
0
w
0
0
0
wN0i0
1i0
w
=
N
wN( N 1)i0
2 i
0
w
0
0
0
w
0
0
wN0i1
wN0i( N 1)
w1i1
N
N 1)
w1i(
N
wN( N 1)i1
0
w
0
0
0
w
0
0
wN( N 1)i( N 1)
x
0
x1
x N 1
FN - N2 fps
0
0
w
0
0
0
w
0
0
0
w
0
0
0
w
0
0
0
0
w
0
0
0
w
0
0
0
w
0
0
0
w
w
0
0
0
w
0
0
0
0
w
0
0
0
w
0
0
w
0
0
w
0
0
0
0
w 0
0 w
0
0
0
0
0
0
w
0
0
0
w
0
0
0
0
w
0
0
0
w
0
0 w
0
0 0
w 0 0
0 w 0
0
0 w
0
0 0
w
0 0
0
w 0
FFT - 2N log2N fps!
Wednesday, August 24, 2011
0
w
0
0
0
w
0
0
0
0
w
0
0
0
w
0
0
0
0
w
0
0
0
w
w
0
0
0
0
w
0
0
0
0
w
0
0
0
0
w
w 0
0
0
0 w 0
0
0
0 w 0
0
0
0 w
FAST FOURIER TRANSFORM (FFT) ALGORITHM FOR DFT
RADIX-2
Cooley, James W., and John W. Tukey, "An algorithm for the machine calculation of complex Fourier series," Math. Comput. 19, 297301 (1965)
Gauss, Carl Friedrich, "Nachlass: Theoria interpolationis methodo nova tractata", Werke, Band 3, 265327 (Knigliche Gesellschaft der Wissenschaften, Gttingen, 1866) (1805)
X0
X1
X N 1
wN = e
wN0i0
1i0
w
=
N
wN( N 1)i0
2 i
wN0i1
wN0i( N 1)
w1i1
N
N 1)
w1i(
N
wN( N 1)i1
wN( N 1)i( N 1)
x
0
x1
x N 1
FN - N2 fps
FFT - 2N log2N fps!
Wednesday, August 24, 2011
FOURIER
DECOMPOSITION
Amplitudes
8.2
3.1
2.1
1.0
1.5
2.0
0.6
1.0
Wednesday, August 24, 2011
SYNTHESIS
2D FT
( )
amplitude: Ai, j = ci, j = Re ci, j
phase:
Wednesday, August 24, 2011
c0,0
c0,1
c0,2
c1,0
c1,1
c1,2
c2,0
c3,0
c4,0
c5,0
c6,0
c7,0
c7,1
( )
+ Im ci, j
( ( ) ( ))
i, j = atan2 Im ci, j , Re ci, j
c0, 3
c0, 4
c0,5
c0,6
c0, 7
c7, 7
DFT CASE STUDY:
POWER SPECTRUM (PS)
Stationary random process (signal + noise): f(x)
The power spectrum S(f) is the Fourier transform
of the autocorrelation function of the process.
S f (s) =
2 is
a
e
d
()
Periodogram is the squared amplitude of the Fourier transform of the process.
Pf ( s ) =
f ( x ) e2 isx dx
Periodogram is a very poor estimator of the power spectrum: its relative error is 100% and it is biased.
Finally, it does not converge to the true power spectrum with increased window size.
Ansemble average (expected value) of periodogram approximates power spectrum.
E Pf ( s ) S f ( s )
Wednesday, August 24, 2011
DFT CASE STUDY:
POWER SPECTRUM (PS) ESTIMATION
AVERAGING OF PERIODOGRAMS - WELCH METHOD
Average of periodograms
reduced variance
.
.
.
50% overlap
Wednesday, August 24, 2011
+
Rotational average
Zhu, J., Penczek, P.A., Schrder, R., and Frank, J. (1997). Three-dimensional reconstruction with
contrast transfer function correction from energy-filtered cryoelectron micrographs: procedure and
application to the 70S Escherichia coli ribosome. Journal of Structural Biology 118, 197-219.
DFT CASE STUDY:
CROSS-CORRELATION
c (t ) =
f ( x ) g ( x + t ) dx = FT ( F ( s ) G ( s ))
1
ck = fl gl + k = FT
Wednesday, August 24, 2011
(F G)
DFT CASE STUDY:
CROSS-CORRELATION
c (t ) =
f ( x ) g ( x + t ) dx = FT ( F ( s ) G ( s ))
1
ck = fl gl + k = FT
Wednesday, August 24, 2011
(F G)
DFT CASE STUDY:
CROSS-CORRELATION
c (t ) =
f ( x ) g ( x + t ) dx = FT ( F ( s ) G ( s ))
1
ck = fl gl + k = FT
Wednesday, August 24, 2011
(F G)
DFT CASE STUDY:
CROSS-CORRELATION
Discrete FT is periodic, thus it "sees" a single image
as periodic.
wrap-around effect
N 1
ck = fl g(l + k ) mod N = FT
0
k = N 2 ,, N 2
Wednesday, August 24, 2011
(F G)
...
...
DFT CASE STUDY:
CROSS-CORRELATION
Discrete FT is periodic, thus it "sees" a single image
as periodic.
wrap-around effect
N 1
ck = fl g(l + k ) mod N = FT
0
k = N 2 ,, N 2
Wednesday, August 24, 2011
(F G)
...
...
DFT CASE STUDY:
CROSS-CORRELATION
To avoid wrap-around effect, pad image
with zeroes (or something else??).
N 1
ck = fl
pad
l=0
pad
l+k
= FT
(F
pad
pad
k = N 2 ,, N 2
Each ccf coefficient is computed using
different number of image points!
Wednesday, August 24, 2011
DFT CASE STUDY:
CROSS-CORRELATION
To avoid wrap-around effect, pad image
with zeroes (or something else??).
N 1
ck = fl
pad
l=0
pad
l+k
= FT
(F
pad
pad
k = N 2 ,, N 2
Each ccf coefficient is computed using
different number of image points!
Wednesday, August 24, 2011
DFT CASE STUDY:
CROSS-CORRELATION
To avoid wrap-around effect, pad image
with zeroes (or something else??).
N 1
ck = fl
pad
l=0
pad
l+k
= FT
(F
pad
pad
k = N 2 ,, N 2
Each ccf coefficient is computed using
different number of image points!
Wednesday, August 24, 2011
DFT CASE STUDY:
CROSS-CORRELATION
To avoid uneven normalization problem,
normalize by lag padded ccf.
1
ck =
N k
N 1
f
l=0
pad
pad
l+k
k = N 2 ,, N 2
The variance of ccf coefficients increases
with lags!
Wednesday, August 24, 2011
1
1
pad pad
=
FT F G
N k
DFT CASE STUDY:
CROSS-CORRELATION
To avoid uneven normalization problem,
normalize by lag padded ccf.
1
ck =
N k
N 1
f
l=0
pad
pad
l+k
k = N 2 ,, N 2
The variance of ccf coefficients increases
with lags!
Wednesday, August 24, 2011
1
1
pad pad
=
FT F G
N k
DFT CASE STUDY:
CROSS-CORRELATION
To avoid uneven normalization problem,
normalize by lag padded ccf.
1
ck =
N k
N 1
f
l=0
pad
pad
l+k
k = N 2 ,, N 2
The variance of ccf coefficients increases
with lags!
Wednesday, August 24, 2011
1
1
pad pad
=
FT F G
N k
DFT CASE STUDY:
CROSS-CORRELATION
Which ccf should I use?
N 1
ck = fl g(l + k ) mod N = FT 1 F G
0
N 1
ck = fl
pad
l=0
1
ck =
N k
Wednesday, August 24, 2011
pad
l+k
= FT
(F
N 1
f
l=0
pad
pad
l+k
pad
)
pad
)
(
1
1
pad pad
=
FT F G
N k
Tomography
historical background
1956 - Bracewell reconstructed sun spots from multiple projection views of the Sun from
the Earth.
1967 - Medical Research Council Laboratory, Cambridge, England: Aaron Klug and grad
student David DeRosier reconstructed three-dimensional structures of viruses.
1969 W. Hoppe (Germany) proposed three-dimensional high resolution electron
microscopy of non-periodic biological structures.
1972 - British engineer Godfrey Hounsfield of EMI Laboratories, England, and
independently South African born physicist Allan Cormack of Tufts University,
Massachusetts, invented CAT (Computed Axial Tomography) scanner. Tomography
is from the Greek word meaning "slice" or "section" and graphia meaning
"describing".
Wednesday, August 24, 2011