Fourier Analysis and Sampling Theory: Reading
Fourier Analysis and Sampling Theory: Reading
( ) ( ) ( )
( ') ( ') '
( ') ( ' ) '
g x f x h x
f x h x x dx
f x h x x dx
=
=
=
where ( ) ( ). h x h x
8
Convolution in 2D
In two dimensions, convolution becomes:
( , ) ( , ) ( , )
( ', ') ( ', ') ' '
( ', ') ( ' , ' ) ' '
g x y f x y h x y
f x y h x x y y dx dy
f x y h x x y y dx dy
=
=
=
where ( , ) ( , ). h x y h x y =
*
=
f(x,y) h(x,y) g(x,y)
9
Fourier transforms
Convolution, while a bit cumbersome looking,
actually has a beautiful structure when viewed in
terms of Fourier analysis.
We can represent functions as a weighted sum of
sines and cosines.
We can think of a function in two complementary
ways:
Spatially in the spatial domain
Spectrally in the frequency domain
The Fourier transformand its inverse convert
between these two domains:
2
( ) ( )
i sx
F s f x e dx
=
2
( ) ( )
i sx
f x F s e ds
=
Frequency
domain
Spatial
domain
10
Fourier transforms (contd)
f(x) is usually a real signal, but F(s) is generally
complex:
where magnitude |F(s)| and phase (s) are:
Where do the sines and cosines come in?
[ ]
= +
=
2 2
1
( ) ( ) ( )
( ) tan ( ) / ( )
F s A s B s
s B s A s
= + =
2 ( )
( ) ( ) ( ) ( )
i s
F s A s iB s F s e
2
( ) ( )
i sx
F s f x e dx
=
2
( ) ( )
i sx
f x F s e ds
=
Frequency
domain
Spatial
domain
11
Fourier transform example
<
= =
>
1 1/ 2
( ) 1/ 2 1/ 2
0 1/ 2
x
x x
x
12
More 1D Fourier examples
I derived the cosine version, but actually
\int_-inf^inf cos()dx is not well-defined,
so problematic.
13
Some properties of FTs
Amplitude scaling:
Additivity:
Domain scaling:
2
( ) ( )
i sx
F s f x e dx
=
14
2D Fourier transform
2 ( )
( , ) ( , )
x y
i s x s y
x y
F s s f x y e dxdy
+
=
2 ( )
( , ) ( , )
x y
i s x s y
x y x y
f x y F s s e ds ds
+
=
Frequency
domain
Spatial
domain
Spatial domain Frequency domain
( , )
x y
F s s ( , ) f x y
15
2D Fourier examples
Spatial
domain
Frequency
domain
( , )
x y
F s s
( , ) f x y
16
Fourier transforms and convolution
What is the Fourier transform of the convolution of
two functions? (The answer is very cool!)
?? f h
17
Convolution theorems
Convolution theorem: Convolution in the spatial
domain is equivalent to multiplication in the
frequency domain.
Symmetric theorem: Convolution in the frequency
domain is equivalent to multiplication in the spatial
domain.
f h F H
f h F H
18
1D convolution theorem example
19
2D convolution theorem example
*
f(x,y)
h(x,y)
g(x,y)
|F(s
x
,s
y
)|
|H(s
x
,s
y
)|
|G(s
x
,s
y
)|
20
Convolution properties
Convolution exhibits a number of basic, but important
propertieseasily proved in the Fourier domain.
Commutativity:
Associativity:
Linearity:
= [ ( ) ( )] ( ) ( ) [ ( ) ( )] a x b x c x a x b x c x
( ) ( ( ) ( )) ( ) ( ) ( ) ( ) a x b x c x a x b x a x c x + = +
= ( ) ( ) ( ) ( ) a x b x b x a x
= ( ) [ ( )] [ ( ) ( )] a x k b x k a x b x
21
The delta function
The Dirac delta function (or impulse function), (x),
is a handy tool for sampling theory.
It has zero width, infinite height, and unit area.
Can be computed as a limit of various functions, e.g.:
It is usually drawn as:
2
2
0 0
1 1
( ) lim exp lim
2 2
w
x x
x
w w
= =
22
Sifting and shifting
For sampling, the delta function has two important
properties.
Sifting:
Shifting:
( ) ( ) ( ) ( ) f x x a f a x a =
( ) ( ) ( ) f x x a f x a =
23
The shah/comb function
A string of delta functions is the key to sampling. The
resulting function is called the shah or comb
function or impulse train:
which looks like:
We can also define an impulse train in terms of a
desired delta function spacing, T:
which looks like:
III( ) ( )
n
x x n
=
=
III( ; ) ( )
n
x T x nT
=
=
24
The shah/comb function, contd
If we multiply an input function by the impulse train,
we get:
III ( ) ( ; ) ( ) ( )
n
f x x T f x x nT
=
=
25
The shah/comb function, contd
Amazingly, the Fourier transform of the shah
function is also the shah function:
One can also show that:
where s
o
= 1/T.
We can visualize this as:
For convenience, I wont draw the delta functions as
scaled vertically, though mathematically, one must
keep track of these scale factors.
III III ( ) ( ) x s
( ) ( ) III III III
1
( ; ) ;1/ ;
o o
x T s T s s s
T
=
26
Now, we can talk about sampling.
The Fourier spectrum gets replicated by spatial
sampling!
How do we recover the signal?
Sampling
27
Sampling and reconstruction
28
Sampling and reconstruction in 2D
29
Sampling theorem
This result is known as the Sampling Theoremand is
due to Claude Shannon who first discovered it in
1949:
A signal can be reconstructed from its samples
without loss of information, if the original signal
has no frequencies above the sampling
frequency.
For a given bandlimited function, the minimum rate
at which it must be sampled is the Nyquist
frequency.
30
Reconstruction filters
The sinc filter, while ideal, has two drawbacks:
It has large support (slow to compute)
It introduces ringing in practice
We can choose from many other filters
31
Cubic filters
Mitchell and Netravali (1988) experimented with
cubic filters, reducing them all to the following form:
The choice of B or C trades off between being too
blurry or having too much ringing. B=C=1/3 was
their visually best choice.
The resulting reconstruction filter is often called the
Mitchell filter.
3 2
3 2
(12 9 6 ) ( 18 12 6 ) (6 2 ) 1
1
( ) (( 6 ) (6 30 ) ( 12 48 ) (8 24 ) 1 2
6
0
B C x B C x B x
r x B C x B C x B C x B C x
otherwise
+ + + + <
= + + + + + <