Upload
others
View
16
Download
0
Embed Size (px)
Citation preview
2D Fourier Transform
Overview
• Signals as functions (1D, 2D)– Tools
• 1D Fourier Transform– Summary of definition and properties in the different cases
• CTFT, CTFS, DTFS, DTFT• DFT
• 2D Fourier Transforms– Generalities and intuition– Examples– A bit of theory
• Discrete Fourier Transform (DFT)
• Discrete Cosine Transform (DCT)
Signals as functions
• Continuous functions of real independent variables– 1D: f=f(x)– 2D: f=f(x,y) x,y– Real world signals (audio, ECG, images)
• Real valued functions of discrete variables– 1D: f=f[k]– 2D: f=f[i,j]– Sampled signals
• Discrete functions of discrete variables– 1D: fd=fd[k]– 2D: fd=fd[i,j]– Sampled and quantized signals
Images as functions
• Gray scale images: 2D functions– Domain of the functions: set of (x,y) values for which f(x,y) is defined :
2D lattice [i,j] defining the pixel locations– Set of values taken by the function : gray levels
• Digital images can be seen as functions defined over a discrete domain i,j: 0<i<I, 0<j<J
– I,J: number of rows (columns) of the matrix corresponding to the image– f=f[i,j]: gray level in position [i,j]
Example 1: δ function
[ ]⎩⎨⎧
≠≠==
=jiji
jiji
;0,001
,δ
[ ]⎩⎨⎧ ==
=−otherwise
JjiJji
0;01
,δ
Example 2: Gaussian
2
22
2
21),( σ
πσ
yx
eyxf+
=
2
22
2
21],[ σ
πσ
ji
ejif+
=
Continuous function
Discrete version
Example 3: Natural image
Example 3: Natural image
Convolution
( ) ( ) ( ) ( ) ( )
[ ] [ ] [ ] [ ] [ ]k
c t f t g t f g t d
c n f n g n f k g k n
τ τ τ+∞
−∞
+∞
=−∞
= ∗ = −
= ∗ = −
∫
∑
( , ) ( , ) ( , ) ( , ) ( , )
[ , ] [ , ] [ , ]k k
c x y f x y g x y f g x y d d
c i k f n m g i n k m
τ ν τ ν τ ν+∞ +∞
−∞ −∞
+∞ +∞
=−∞ =−∞
= ⊗ = − −
= − −
∫ ∫
∑ ∑
[n,m]
filter impulse response rotated by 180 deg
2D Convolution
• Associativity
• Commutativity
• Distributivity
g(k,l)
img(k,l) g(a-k,b-l)
1. fold about origin2. displace by ‘a’ and ‘b’
img(k,l)
k
l
g(a-k,b-l)
a
b
Tricky part: borders• (zero padding, mirror...)
3. compute integralof the box
2D Convolution
ConvolutionFiltering with filter h(x,y)
sampling property of the delta function
Fourier Transform
• Different formulations for the different classes of signals– Summary table: Fourier transforms with various combinations of
continuous/discrete time and frequency variables.– Notations:
• CT: continuous time• DT: Discrete Time• FT: Fourier Transform (integral synthesis)• FS: Fourier Series (summation synthesis)• P: periodical signals• T: sampling period• ωs: sampling frequency (ωs=2π/T)• For DTFT: T=1 → ωs=2π
1D FT: basics
Fourier Transform: Concept A signal can be represented as a weighted sum of sinusoids.
Fourier Transform is a change of basis, where the basis functions consist of sines and cosines (complex exponentials).
Fourier Transform
• Cosine/sine signals are easy to define and interpret.
• However, it turns out that the analysis and manipulation of sinusoidal signals is greatly simplified by dealing with related signals called complex exponential signals.
• A complex number has real and imaginary parts: z = x + j*y
• A complex exponential signal: r*exp(j*a) =r*cos(a) + j*r*sin(a)
Overview
Self dual
D
P
D
P
Discrete Time Fourier Series (DTFS)
Dual with CTFS
C
P
DDiscrete Time Fourier Transform (DTFT)
Dual with DTFT
DC
P
(Continuous Time) Fourier Series (CTFS)
Self-dual
CC(Continuous Time) Fourier Transform (CTFT)
DualityAnalysis/SynthesisFrequencyTimeTransform
( ) ( )
1( ) ( )2
j t
tj t
F f t e dt
f t F e d
ω
ω
ω
ω
ω ωπ
−=
=
∫
∫/ 2
2 /
/ 2
2 /
[ ] ( )
( ) [ ]
Tj kt T
T
j kt T
k
F k f t e dt
f t F k e
π
π
−
−
=
=
∫
∑
( )
( )
2 /
/ 22 /
/ 2
[ ]
1[ ]
s
s
s
s
j nj t
n
j nj t
s
F e f n e
f n F e e d
πω ωω
ωπω ωω
ω
ωω
−
−
=
=
∑
∫
12 /
01
2 /
0
1[ ] [ ]
[ ] [ ]
Nj kn T
nN
j kn T
n
F k f n eN
f n F k e
π
π
−−
=−
=
=
=
∑
∑
Dualities
FOURIER DOMAINSIGNAL DOMAIN
Sampling Periodicity
SamplingPeriodicity
DTFT
CTFS
Sampling+Periodicity Sampling +PeriodicityDTFS/DFT
Discrete time signals• Sequences of samples
• f[k]: sample values
• Assumes a unitary spacing among samples (Ts=1)
• Normalized frequency Ω
• Transform– DTFT for NON periodic
sequences– CTFS for periodic sequences– DFT for periodized sequences
• All transforms are 2π periodic
• Sampled signals
• f(kTs): sample values
• The sampling interval (or period) is Ts
• Non normalized frequency ω
• Transform– DTFT– CSTF– DFT– BUT accounting for the fact that
the sequence values have been generated by sampling a real signal → fk=f(kTs)
• All transforms are periodic with period ωs
sTωΩ =
CTFT
• Continuous Time Fourier Transform
• Continuous time a-periodic signal
• Both time (space) and frequency are continuous variables– NON normalized frequency ω is used
• Fourier integral can be regarded as a Fourier series with fundamental frequency approaching zero
• Fourier spectra are continuous– A signal is represented as a sum of sinusoids (or exponentials) of all
frequencies over a continuous frequency interval
( ) ( )
1( ) ( )2
j t
tj t
F f t e dt
f t F e d
ω
ω
ω
ω
ω ωπ
−=
=
∫
∫
analysis
synthesis
Fourier integral
CTFT: change of notations
Fourier Transform of a 1D continuous signal
( ) ( ) j xF f x e dxωω∞
−
−∞
= ∫
Inverse Fourier Transform1( ) ( )
2j xf x F e dωω ω
π
∞
−∞
= ∫
( ) ( )cos sinj xe x j xω ω ω− = −“Euler’s formula”
Change of notations:
222
x
y
uuv
ω πω πω π
→
→⎧⎨ →⎩
Then CTFT becomes
Fourier Transform of a 1D continuous signal
2( ) ( ) j uxF u f x e dxπ∞
−
−∞
= ∫
Inverse Fourier Transform
2( ) ( ) j uxf x F u e duπ∞
−∞
= ∫
( ) ( )2 cos 2 sin 2j uxe ux j uxπ π π− = −“Euler’s formula”
CTFS
• Continuous Time Fourier Series
• Continuous time periodic signals– The signal is periodic with period T0
– The transform is “sampled” (it is a series)
/ 22 /
/ 2
2 /
[ ] ( )
( ) [ ]
Tj kt T
T
j kt T
k
F k f t e dt
f t F k e
π
π
−
−
=
=
∫
∑
0
0
00
0
/ 2
0 / 2
00
1 ( )
( )
2
o
Tjn t
n TT
jn tT n
n
D f t e dtT
f t D e
T
ω
ω
πω
−
−
=
=
=
∫∑
our notations table notations
fundamental frequency
T0↔TDn ↔F[k]
CTFS
• Representation of a continuous time signal as a sum of orthogonal components in a complete orthogonal signal space– The exponentials are the basis functions
• Fourier series are periodic with period equal to the fundamental in the set (2π/T0)
• Properties– even symmetry → only cosinusoidal components– odd symmetry → only sinusoidal components
CTFS: example 1
CTFS: example 2
From sequences to discrete time signals
• Looking at the sequence as to a set of samples obtained by sampling a real signal with frequency ωs we can still use the formulas for calculating the transforms as derived for the sequences by – Stratching the time axis (and thus squeezing the frequency axis if Ts>1)
– Enclosing the sampling interval Ts in the value of the sequence samples (DFT)
( )k s sf T f kT=
22
s
ss
T
T
ωππ ω
Ω =
→ =
DTFT
• Discrete Time Fourier Transform
• Discrete time a-periodic signal
• The transform is periodic and continuous with period
( )
( )
2 /
/ 22 /
/ 2
[ ]
1[ ]
s
s
s
s
j nj t
n
j nj t
s
F e f n e
f n F e e d
πω ωω
ωπω ωω
ω
ωω
−
−
=
=
∑
∫( )2
( ) [ ]
1[ ]2
j k
k
j k
F f k e
f k F e dππ
+∞− Ω
=−∞
Ω
Ω =
= Ω Ω
∑
∫
0 2πΩ =
our notations table notations
( ) cs
F FT⎛ ⎞Ω
Ω = ⎜ ⎟⎝ ⎠normalized
frequencynon normalizedfrequencysTωΩ =
2 /s sT π ω=
Discrete Time Fourier Transform (DTFT)
• F(Ω) can be obtained from Fc(ω) by replacing ω with Ω/Ts. Thus F(Ω) is identical to Fc(ω) frequency scaled by a factor 1/Ts– Ts is the sampling interval in time domain
• Notations
( )
( ) ( )
( ) 2 /
2 2
( ) 2 /
( ) [ ] ( ) [ ] s
cs
s ss s
ss
s s
j kj ks
k k
F FT
TT
TT
F F T F
F f k e F T F f k e πω ω
π πωω
ω ω
ω πω ω
ω ω+∞ +∞
−− Ω
=−∞ =−∞
⎛ ⎞ΩΩ = ⎜ ⎟
⎝ ⎠
= → =
Ω= →Ω =
Ω → =
Ω = → = =∑ ∑
__
periodicity of the spectrum
normalized frequency (the spectrum is 2π-periodic)
DTFT: unitary frequency( )
2
12
2 2
12 12
2
12
2
12
2 2
( ) [ ] ( ) [ ]
1[ ] ( ) [ ] ( ) ( )2
( ) [ ]
[ ] ( )
j k j ku
k k
j k j ku j ku
j ku
k
j ku
u f
F f k e F u f k e
f k F e d f k F u e du F u e du
F u f k e
f k F u e du
π
π π
π
π
π
π ω π
π
∞ ∞− Ω −
=−∞ =−∞
Ω
−
∞−
=−∞
−
Ω = =
Ω = → =
= Ω Ω→ = =
⎧ =⎪⎪⎪⎨⎪ =⎪⎪⎩
∑ ∑
∫ ∫ ∫
∑
∫
NOTE: when Ts=1, Ω=ω and the spectrum is 2π-periodic. The unitary frequency u=2π/ Ωcorresponds to the signal frequency f=2π/ω. This could give a better intuition of the transform properties.
Connection DTFT-CTFT
0 Ts 4Ts
0 1 4
t
t
k
ω
ω
Ω
0
0
0
2π/Ts
2π
Fc(ω)
F(Ω)
sampling periodization
f(t)
f(kTs)Fc(ω)_
f[k]
Differences DTFT-CTFT
• The DTFT is periodic with period Ωs=2π (or ωs=2π/Ts)
• The discrete-time exponential ejΩk has a unique waveform only for values of Ω in a continuous interval of 2π
• Numerical computations can be conveniently performed with the Discrete Fourier Transform (DFT)
DTFS
• Discrete Time Fourier Series
• Discrete time periodic sequences of period N0
– Fundamental frequency
0 02 / NπΩ =
12 /
01
2 /
0
1[ ] [ ]
[ ] [ ]
Nj kn T
nN
j kn T
n
F k f n eN
f k F k e
π
π
−−
=−
=
=
=
∑
∑
00
00
1
00
1
0
1 [ ]
[ ]
Njr k
rk
Njr k
rr
D f k eN
f k D e
−− Ω
=
−Ω
=
=
=
∑
∑
our notations table notations
Discrete Fourier Transform (DFT)
• The DFT transforms N0 samples of a discrete-time signal to the same number of discrete frequency samples
• The DFT and IDFT are a self-contained, one-to-one transform pair for a length-N0 discrete-time signal (that is, the DFT is not merely an approximation to the DTFT as discussed next)
• However, the DFT is very often used as a practical approximation to the DTFT
0 00 0
0 00 0
21 1
0 021 1
0 00 0
00
1 1
2
N N j rkjr k N
r k kk k
N N jr kjr k N
k r rk k
F f e f e
f F e F eN N
N
π
π
π
− − −− Ω
= =
− −Ω
= =
= =
= =
Ω =
∑ ∑
∑ ∑
DFT
k
zero padding
0 N0
r0 2π
F(Ω)
4π2π/N0
Discrete Cosine Transform (DCT)
• Operate on finite discrete sequences (as DFT)
• A discrete cosine transform (DCT) expresses a sequence of finitely many data points in terms of a sum of cosine functionsoscillating at different frequencies
• DCT is a Fourier-related transform similar to the DFT but using only real numbers
• DCT is equivalent to DFT of roughly twice the length, operating on real data with even symmetry (since the Fourier transform of a real and even function is real and even), where in some variants the input and/or output data are shifted by half a sample
• There are eight standard DCT variants, of which four are common
• Strong connection with the Karunen-Loeven transform– VERY important for signal compression
DCT
• DCT implies different boundary conditions than the DFT or other related transforms
• A DCT, like a cosine transform, implies an even periodic extension of the original function
• Tricky part– First, one has to specify whether the function is even or odd at both the
left and right boundaries of the domain – Second, one has to specify around what point the function is even or
odd• In particular, consider a sequence abcd of four equally spaced data points,
and say that we specify an even left boundary. There are two sensible possibilities: either the data is even about the sample a, in which case the even extension is dcbabcd, or the data is even about the point halfwaybetween a and the previous point, in which case the even extension is dcbaabcd (a is repeated).
Symmetries
DCT
0
0
1
00 0
1
000 0
1cos 0,...., 12
2 1 1cos2 2
N
k nn
N
n kk
X x n k k NN
kx X X kN N
π
π
−
=
−
=
⎡ ⎤⎛ ⎞= + = −⎜ ⎟⎢ ⎥⎝ ⎠⎣ ⎦⎧ ⎫⎡ ⎤⎛ ⎞= + +⎨ ⎬⎜ ⎟⎢ ⎥⎝ ⎠⎣ ⎦⎩ ⎭
∑
∑
• Warning: the normalization factor in front of these transform definitions is merely a convention and differs between treatments.
– Some authors multiply the transforms by (2/N0)1/2 so that the inverse does not require any additional multiplicative factor.
• Combined with appropriate factors of √2 (see above), this can be used to make the transform matrix orthogonal.
Sinusoids
• Frequency domain characterization of signals
Frequency domain
Signal domain
( ) ( ) j tF f t e dtωω+∞
−
−∞
= ∫
Gaussian
rect
sinc function
Images vs Signals
1D
• Signals
• Frequency– Temporal– Spatial
• Time (space) frequency characterization of signals
• Reference space for– Filtering– Changing the sampling rate– Signal analysis– ….
2D
• Images
• Frequency– Spatial
• Space/frequency characterization of 2D signals
• Reference space for– Filtering– Up/Down sampling– Image analysis– Feature extraction– Compression– ….
2D spatial frequencies
• 2D spatial frequencies characterize the image spatial changes in the horizontal (x) and vertical (y) directions– Smooth variations -> low frequencies– Sharp variations -> high frequencies
x
y
ωx=1ωy=0 ωx=0
ωy=1
2D Frequency domain
ωx
ωy
Large vertical frequencies correspond to horizontal lines
Large horizontal frequencies correspond to vertical lines
Small horizontal and vertical frequencies correspond smooth grayscale changes in both directions
Large horizontal and vertical frequencies correspond sharp grayscale changes in both directions
Vertical grating
ωx
ωy
0
Double grating
ωx
ωy
0
Smooth rings
2D box2D sinc
Margherita Hack
Einstein
log amplite of the spectrum
What we are going to analyze
• 2D Fourier Transform of continuous signals (2D-CTFT)
• 2D Fourier Transform of discrete signals (2D-DTFT)
• 2D Discrete Fourier Transform (2D-DFT)
( ) ( ) , ( ) ( )j t j tF f t e dt f t F e dtω ωω ω+∞ +∞
−
−∞ −∞
= =∫ ∫
0 00 0
0
1 1
00 00 0
1 2[ ] , [ ] ,N N
jr k jr kr N r
k rF f k e f k F e
N Nπ− −
− Ω Ω
= =
= = Ω =∑ ∑
2
1( ) [ ] , [ ] ( )2
j k j k
kF f k e f k F e dt
ππ
∞− Ω Ω
=−∞
Ω = = Ω∑ ∫
1D
1D
1D
2D Continuous Fourier Transform
• Continuous case (x and y are real) – 2D-CTFT (notation 1)
( ) ( ) ( )
( ) ( ) ( )2
ˆ , ,
1 ˆ, ,4
x y
x y
j x yx y
j x yx y x y
f f x y e dxdy
f x y f e d d
ω ω
ω ω
ω ω
ω ω ω ωπ
+∞− +
−∞
+∞+
−∞
=
=
∫
∫
( ) ( ) ( ) ( )
( ) ( )
* *2
222
1 ˆ, , , ,ˆ4
1 ˆ, ,4
x y x y x y
x y x y
f x y g x y dxdy f g d d
f g f x y dxdy f d d
ω ω ω ω ω ωπ
ω ω ω ωπ
=
= → =
∫∫ ∫∫
∫∫ ∫∫
Parseval formula
Plancherel equality
2D Continuous Fourier Transform
• Continuous case (x and y are real) – 2D-CTFT
( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( )
2
222
222
22
ˆ , ,
1 ˆ, , 24
1 ˆ , 24
x
y
j ux vy
j ux vy
j ux vy
uv
f u v f x y e dxdy
f x y f u v e dudv
f u v e dudv
π
π
π
ω πω π
ππ
ππ
+∞− +
−∞
+∞+
−∞
+∞+
−∞
=
=
=
= =
=
∫
∫
∫
2D Continuous Fourier Transform
• 2D Continuous Fourier Transform (notation 2)
( ) ( ) ( )
( ) ( ) ( )
2
2
ˆ , ,
ˆ, ,
j ux vy
j ux vy
f u v f x y e dxdy
f x y f u v e dudv
π
π
+∞− +
−∞
+∞+
−∞
=
= =
∫
∫
22 ˆ( , ) ( , )f x y dxdy f u v dudv∞ ∞ ∞ ∞
−∞ −∞ −∞ −∞
=∫ ∫ ∫ ∫ Plancherel’s equality
2D Discrete Fourier Transform
00
00
0
1
0
1
00
00
[ ]
1[ ]
2
Njr k
rk
Njr k
N rr
F f k e
f k F eN
Nπ
−− Ω
=
−Ω
=
=
=
Ω =
∑
∑
0 00
0 00
0
1 1( )
0 0
1 1( )
20 00
00
[ , ] [ , ]
1[ , ] [ , ]
2
N Nj ui vk
i k
N Nj ui vk
Nu v
F u v f i k e
f i k F u v eN
Nπ
− −− Ω +
= =
− −Ω +
= =
=
=
Ω =
∑ ∑
∑ ∑
The independent variable (t,x,y) is discrete
Delta
• Sampling property of the 2D-delta function (Dirac’s delta)
• Transform of the delta function
0 0 0 0( , ) ( , ) ( , )x x y y f x y dxdy f x yδ∞
−∞
− − =∫
( ) 2 ( )( , ) ( , ) 1j ux vyF x y x y e dxdyπδ δ∞ ∞
− +
−∞ −∞
= =∫ ∫
( ) 0 02 ( )2 ( )0 0 0 0( , ) ( , ) j ux vyj ux vyF x x y y x x y y e dxdy e ππδ δ
∞ ∞− +− +
−∞ −∞
− − = − − =∫ ∫shifting property
Constant functions
Fourier Transform of the constant (=1 for all x and y)
2 ( )
( , ) 1 ,
( , )j ux vy
k x y x y
F k e dxdy u vπ δ∞ ∞
− +
−∞ −∞
= ∀
= =∫ ∫
1 2 ( ) 2 (0 0)( , ) ( , ) 1j ux vy j x vF u v u v e dudv eπ πδ δ∞ ∞
− + +
−∞ −∞
= = =∫ ∫
Take the inverse Fourier Transform of the impulse function
Trigonometric functions
• Cosinusoidal function oscillating along the x axis– Constant along the y axis
2 ( )
2 ( ) 2 ( )2 ( )
( , ) cos(2 )
cos(2 ) cos(2 )
2
j ux vy
j fx j fxj ux vy
s x y fx
F fx fx e dxdy
e e e dxdy
π
π ππ
π
π π∞ ∞
− +
−∞ −∞
∞ ∞ −− +
−∞ −∞
=
= =
⎡ ⎤+= ⎢ ⎥
⎣ ⎦
∫ ∫
∫ ∫
( ) ( )2 ( ) 2 ( )1 1 ( ) ( )2 2
j u f x j u f xe e dxdy u f u fπ π δ δ∞ ∞
− − − +
−∞ −∞
⎡ ⎤= + = − + +⎡ ⎤⎣ ⎦⎣ ⎦∫ ∫
Vertical grating
ωx
ωy
0
Ex. 1
Ex. 2
Ex. 3
Magnitudes
Examples
Properties
Linearity
Shifting
Modulation
Convolution
Multiplication
Separability
( , ) ( , ) ( , ) ( , )af x y bg x y aF u v bG u v+ ⇔ +
( , )* ( , ) ( , ) ( , )f x y g x y F u v G u v⇔
( , ) ( , ) ( , )* ( , )f x y g x y F u v G u v⇔
( , ) ( ) ( ) ( , ) ( ) ( )f x y f x f y F u v F u F v= ⇔ =
0 02 ( )0 0( , ) ( , )j ux vyf x x y x e F u vπ− +− − ⇔
0 02 ( )0 0( , ) ( , )j u x v ye f x y F u u v vπ + ⇔ − −
Separability
2 ( )( , ) ( , ) j ux vyF u v f x y e dxdyπ∞ ∞
− +
−∞ −∞
= ∫ ∫
2 2( , ) j ux j vyf x y e dx e dyπ π∞ ∞
− −
−∞ −∞
⎡ ⎤= ⎢ ⎥
⎣ ⎦∫ ∫
2( , ) j vyF u y e dyπ∞
−
−∞
= ∫
2D Fourier Transform can be implemented as a sequence of 1D Fourier Transform operations performed independently along the two axis
• Fourier Transform of a 2D a-periodic signal defined over a 2D discrete grid– The grid can be thought of as a 2D brush used for sampling the
continuous signal with a given spatial resolution (Tx,Ty)
2D Fourier Transform of a Discrete function
2
1( ) [ ] , [ ] ( )2
j k j k
kF f k e f k F e dt
ππ
∞− Ω Ω
=−∞
Ω = = Ω∑ ∫
( )
( )
1 2
1 2
1 2
1 2
22 2
( , ) [ , ]
1[ ] ( , )4
x y
x y
j k k
x yk k
j k kx y x y
F f k k e
f k F e dπ ππ
− Ω + Ω+∞ +∞
=−∞ =−∞
Ω + Ω
Ω Ω =
= Ω Ω Ω Ω
∑ ∑
∫ ∫
Unitary frequency notations
1 2
1 2
1 2
2 ( )1 2
1/ 2 1/ 22 ( )
1 21/ 2 1/ 2
22
( , ) [ , ]
[ , ] ( , )
x
y
j k u k v
k k
j k u k v
uv
F u v f k k e
f k k F u v e dudv
π
π
ππ
+∞ +∞− +
=−∞ =−∞
− +
− −
Ω =⎧⎨Ω =⎩
=
=
∑ ∑
∫ ∫
• The integration interval for the inverse transform has width=1 instead of 2π– It is quite common to choose
1 1,2 2
u v−≤ <
Properties
• Periodicity: 2D Fourier Transform of a discrete a-periodic signal is periodic with period– The period is 1 for the unitary frequency notations and 2π for
normalized frequency notations. Referring to the firsts:
( )2 ( ) ( )( , ) [ , ] j u k m v l n
m nF u k v l f m n e π
∞ ∞− + + +
=−∞ =−∞
+ + = ∑ ∑
( )2 2 2[ , ] j um vn j km j ln
m nf m n e e eπ π π
∞ ∞− + − −
=−∞ =−∞
= ∑ ∑
2 ( )[ , ] j um vn
m nf m n e π
∞ ∞− +
=−∞ =−∞
= ∑ ∑
1 1
( , )F u v=
Arbitrary integers
Properties
• Linearity
• shifting
• modulation
• convolution
• multiplication
• separability
• energy conservation properties also exist for the 2D Fourier Transform of discrete signals.
• NOTE: in what follows, (k1,k2) is replaced by (m,n)
Fourier Transform: Properties
Linearity
Shifting
Modulation
Convolution
Multiplication
Separable functions
Energy conservation
[ , ] [ , ] ( , ) ( , )af m n bg m n aF u v bG u v+ ⇔ +
0 02 ( )0 0[ , ] ( , )j um vnf m m n n e F u vπ− +− − ⇔
[ , ] [ , ] ( , )* ( , )f m n g m n F u v G u v⇔
[ , ]* [ , ] ( , ) ( , )f m n g m n F u v G u v⇔
0 02 ( )0 0[ , ] ( , )j u m v ne f m n F u u v vπ + ⇔ − −
[ , ] [ ] [ ] ( , ) ( ) ( )f m n f m f n F u v F u F v= ⇔ =2 2[ , ] ( , )
m nf m n F u v dudv
∞ ∞∞ ∞
=−∞ =−∞ −∞ −∞
=∑ ∑ ∫ ∫
Impulse Train
Define a comb function (impulse train) as follows
, [ , ] [ , ]M Nk l
comb m n m kM n lNδ∞ ∞
=−∞ =−∞
= − −∑ ∑
where M and N are integers
2[ ]comb n
n
1
2D-DTFT: delta
Define Kronecker delta function
Fourier Transform of the Kronecker delta function
1, for 0 and 0[ , ]
0, otherwisem n
m nδ= =⎧ ⎫
= ⎨ ⎬⎩ ⎭
( ) ( )2 2 0 0( , ) [ , ] 1j um vn j u v
m n
F u v m n e eπ πδ∞ ∞
− + − +
=−∞ =−∞
⎡ ⎤= = =⎣ ⎦∑ ∑
Fourier Transform: (piecewise) constant
Fourier Transform of 1
To prove: Take the inverse Fourier Transform of the Dirac delta function and use the fact that the Fourier Transform has to be periodic with period 1.
( )2
[ , ] 1
[ , ] 1
( , )
j um vn
m n
k l
f m n
F u v e
u k v l
π
δ
∞ ∞− +
=−∞ =−∞
∞ ∞
=−∞ =−∞
=
⎡ ⎤= =⎣ ⎦
= − −
∑ ∑
∑ ∑
Impulse Train
, [ , ] [ , ]M Nk l
comb m n m kM n lNδ∞ ∞
=−∞ =−∞
− −∑ ∑
[ ] 1, ,k l k l
k lm kM n lN u vMN M N
δ δ∞ ∞ ∞ ∞
=−∞ =−∞ =−∞ =−∞
⎛ ⎞− − ⇔ − −⎜ ⎟⎝ ⎠
∑ ∑ ∑ ∑
1 1,( , )
M N
comb u v, [ , ]M Ncomb m n
( ), ( , ) ,M Nk l
comb x y x kM y lNδ∞ ∞
=−∞ =−∞
− −∑ ∑
• Fourier Transform of an impulse train is also an impulse train:
Impulse Train
2[ ]comb n
n u
1 12
12
1 ( )2
comb u
12
Impulse Train
( ) 1, ,k l k l
k lx kM y lN u vMN M N
δ δ∞ ∞ ∞ ∞
=−∞ =−∞ =−∞ =−∞
⎛ ⎞− − ⇔ − −⎜ ⎟⎝ ⎠
∑ ∑ ∑ ∑
1 1,( , )
M N
comb u v, ( , )M Ncomb x y
( ), ( , ) ,M Nk l
comb x y x kM y lNδ∞ ∞
=−∞ =−∞
− −∑ ∑
• In the case of continuous signals:
Impulse Train
2 ( )comb x
x u
1 12
12
1 ( )2
comb u
12
2
Sampling revisitation
x
x
M
( )f x
( )Mcomb x
u
( )F u
u
1( )* ( )M
F u comb u
u1M
1 ( )M
comb u
x
( ) ( )Mf x comb x
Sampling revisitation
x
( )f x
u
( )F u
u
1( )* ( )M
F u comb u
x
( ) ( )Mf x comb x
WW−
M
W
1M1 2W
M>No aliasing if
Sampling and aliasing
u
1( )* ( )M
F u comb u
x
( ) ( )Mf x comb x
M
W
1M
If there is no aliasing, the original signal can be recovered from its samples by low-pass filtering.
12M
Sampling and aliasing
x
( )f x
u
( )F u
u
1( )* ( )M
F u comb u
( ) ( )Mf x comb x
WW−
W
1MAliased
Sampling and aliasing
x
( )f x
u
( )F u
u[ ]( )* ( ) ( )Mf x h x comb x
WW−
1M
Anti-aliasing filter
uWW−
( )* ( )f x h x1
2M
Sampling and aliasing
u[ ]( )* ( ) ( )Mf x h x comb x
1M
u( ) ( )Mf x comb x
W
1M
Without anti-aliasing filter:
With anti-aliasing filter:
Aliasing in images
• Without the anti-aliasing filter the recovered image (subsampling+upsampling) is different from the original.
• With anti-aliasing filter (low-pass), the smoothed version of the original image can be recovered by interpolation
Anti-Aliasing
a=imread(‘barbara.tif’);
Anti-Aliasing
a=imread(‘barbara.tif’);b=imresize(a,0.25);c=imresize(b,4);
Anti-Aliasing
a=imread(‘barbara.tif’);b=imresize(a,0.25);c=imresize(b,4);
H=zeros(512,512);H(256-64:256+64, 256-64:256+64)=1;
Da=fft2(a);Da=fftshift(Da);Dd=Da.*H;Dd=fftshift(Dd);d=real(ifft2(Dd));
Sampling
x
y
u
v
uW
vW
x
y
( , )f x y ( , )F u v
M
N
, ( , )M Ncomb x y
u
v
1M
1N
1 1,( , )
M N
comb u v
Sampling
u
v
uW
vW
,( , ) ( , )M Nf x y comb x y
1M
1N
1 2 uWM
>No aliasing if and 1 2 vWN>
Interpolation
u
v
1M
1N
1 1, for and v( , ) 2 2
0, otherwise
MN uH u v M N
⎧ ≤ ≤⎪= ⎨⎪⎩
12N
12M
Ideal reconstruction filter:
Ideal Reconstruction Filter1 1
2 22 ( ) 2 ( )
1 12 2
( , ) ( , )N M
j ux vy j ux vy
N M
h x y H u v e dudv MNe dudvπ π∞ ∞
+ +
−−∞ −∞
= =∫ ∫ ∫ ∫11
222 2
1 12 2
1 11 1 2 22 22 22 21 1
2 2
sin sin
NMj ux j vy
M N
j y j yj x j xN NM M
Me du Ne dv
M e e N e ej x j y
x yM N
x yM N
π π
π ππ π
π π
π π
π π
− −
−−
=
⎛ ⎞⎛ ⎞= − −⎜ ⎟⎜ ⎟
⎝ ⎠ ⎝ ⎠⎛ ⎞ ⎛ ⎞⎜ ⎟ ⎜ ⎟⎝ ⎠ ⎝ ⎠=
∫ ∫
( )1sin( )2
jx jxx e ej
−= −