89
Fourier Transform

2D Fourier Transform - Univr

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 2D Fourier Transform - Univr

Fourier Transform

Page 2: 2D Fourier Transform - Univr

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)

Page 3: 2D Fourier Transform - Univr

Signals as functions

1. Continuous functions of real independent variables– 1D: f=f(x)– 2D: f=f(x,y) x,y– Real world signals (audio, ECG, images)

2. Real valued functions of discrete variables– 1D: f=f[k]– 2D: f=f[i,j]– Sampled signals

3. Discrete functions of discrete variables– 1D: y=y[k]– 2D: y=y[i,j]– Sampled and quantized signals– For ease of notations, we will use the same notations for 2 and 3

Page 4: 2D Fourier Transform - Univr

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]

Page 5: 2D Fourier Transform - Univr

Example 1: δ function

[ ]⎩⎨⎧

≠≠==

=jiji

jiji

;0,001

[ ]⎩⎨⎧ ==

=−otherwise

JjiJji

0;01

Page 6: 2D Fourier Transform - Univr

Example 2: Gaussian

2

22

2

21),( σ

πσ

yx

eyxf+

=

2

22

2

21],[ σ

πσ

ji

ejif+

=

Continuous function

Discrete version

Page 7: 2D Fourier Transform - Univr

Example 3: Natural image

Page 8: 2D Fourier Transform - Univr

Example 3: Natural image

Page 9: 2D Fourier Transform - Univr

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:

• CTFT: continuous time FT: t is real and f real (f=ω) (CT, CF)• DTFT: Discrete Time FT: t is discrete (t=n), f is real (f=ω) (DT, CF)• CTFS: CT Fourier Series (summation synthesis): t is real AND the function is periodic, f

is discrete (f=k), (CT, DF)• DTFS: DT Fourier Series (summation synthesis): t=n AND the function is periodic, f

discrete (f=k), (DT, DF)• P: periodical signals• T: sampling period• ωs: sampling frequency (ωs=2π/T)• For DTFT: T=1 → ωs=2π

Page 10: 2D Fourier Transform - Univr

Continuous Time Fourier Transform (CTFT)

Time is a real variable (t)

Frequency is a real variable (ω)

Page 11: 2D Fourier Transform - Univr

CTFT: 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 sins and cosines (complex exponentials).

[Gonzalez Chapter 4]

Page 12: 2D Fourier Transform - Univr

Continuous Time Fourier Transform (CTFT)

T=1

Page 13: 2D Fourier Transform - Univr

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:

( )e cos sinjr r jα α α= +

Page 14: 2D Fourier Transform - Univr

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

Page 15: 2D Fourier Transform - Univr

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”

Page 16: 2D Fourier Transform - Univr

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

ω πω πω π

→⎧⎨ →⎩

Page 17: 2D Fourier Transform - Univr

CTFT

• Replacing the variables

• More compact notations

2(2 ) ( ) ( ) j uxF u F u f x e dxππ∞

−∞

= = =∫( )2 21( ) ( ) 2 ( )

2j ux j uxf x F u e d u F u e duπ ππ

π

∞ ∞

−∞ −∞

= =∫ ∫

( )

2

2

( ) ( )

( )

j ux

j ux

F u f x e dx

f x F u e du

π

π

∞−

−∞

−∞

=

=

Page 18: 2D Fourier Transform - Univr

Sinusoids

• Frequency domain characterization of signals

Frequency domain (spectrum, absolute value of the transform)

Signal domain

( ) ( ) j tF f t e dtωω+∞

−∞

= ∫

Page 19: 2D Fourier Transform - Univr

Gaussian

Frequency domain

Time domain

Page 20: 2D Fourier Transform - Univr

rect

sinc function

Frequency domain

Time domain

Page 21: 2D Fourier Transform - Univr

Example

Page 22: 2D Fourier Transform - Univr

Example

Page 23: 2D Fourier Transform - Univr

Discrete Fourier Transform (DFT)

The easiest way to get to it

Time is a discrete variable (t=n)

Frequency is a discrete variable (f=k)

Page 24: 2D Fourier Transform - Univr

DFT

• The DFT can be considered as a generalization of the CTFT to discrete series

• In order to calculate the DFT we start with k=0, calculate F(0) as in the formula below, then we change to u=1 etc

• F[0] is the average value of the function f[n] 0• This is also the case for the CTFT

12 /

01

2 /

0

1[ ] [ ]

[ ] [ ]

Nj kn N

nN

j kn N

k

F k f n eN

f n F k e

π

π

−−

=−

=

=

=

∑0,1, , 10,1, , 1

n Nk N= −= −

……

1 12 0 /

0 0

1 1[0] [ ] [ ]N N

j n N

n n

F f n e f n fN N

π− −

= =

= = =∑ ∑

Page 25: 2D Fourier Transform - Univr

Example 1

time

amplitude

0

frequency

|F[k]|F[0] low-pass

characteristic

Page 26: 2D Fourier Transform - Univr

Example 2

time

amplitude

0

frequency

|F[k]|F[0]=0

0

band-pass (or high-pass) characteristic

-M M

Page 27: 2D Fourier Transform - Univr

DFT

• About M2 multiplications are needed to calculate the DFT

• The transform F[k] has the same number of components of f[n], that is N

• The DFT always exists for signals that do not go to infinity at any point

• Using the Eulero’s formula

( ) ( )( )1 1

2 /

0 0

1 1[ ] [ ] [ ] cos 2 / sin 2 /N N

j kn N

n n

F k f n e f n j kn N j j kn NN N

π π π− −

= =

= = −∑ ∑

frequency component k discrete trigonometric functions

Page 28: 2D Fourier Transform - Univr

Intuition

• The FT decomposed the signal over its harmonic components and thus represents it as a sum of linearly independent complex exponential functions

• Thus, it can be interpreted as a “mathematical prism”

Page 29: 2D Fourier Transform - Univr

DFT is a complex number

• F[k] in general are complex numbers

[ ] [ ] [ ] [ ] [ ] [ ]

[ ] [ ] [ ]

[ ] [ ] [ ]

[ ] [ ]

2 2

1

2

Re Im

exp

Re Im

Imtan

Re

F k F k j F k

F k F k j F k

F k F k F k

F kF k

F k

P k F k

= +

=

⎧ ⎫= +⎪ ⎪⎪ ⎪⎨ ⎬⎧ ⎫

= −⎪ ⎪⎨ ⎬⎪ ⎪⎩ ⎭⎩ ⎭

=

magnitude or spectrum

phase or angle

power spectrum

Page 30: 2D Fourier Transform - Univr

Example

Page 31: 2D Fourier Transform - Univr

Let’s take a bit more advanced perspective…

Book: Lathi, Signal Processing and Linear Systems

Page 32: 2D Fourier Transform - Univr

OverviewTransform Time Frequency Analysis/Synthesis Duality

(Continuous Time) Fourier Transform (CTFT)

C C Self-dual

(Continuous Time) Fourier Series (CTFS)

C

P

D Dual with DTFT

Discrete Time Fourier Transform (DTFT)

D C

P

Dual with CTFS

Discrete Time Fourier Series (DTFS)

D

P

D

P

Self dual

( ) ( )

1( ) ( )2

j t

tj t

F f t e dt

f t F e d

ω

ω

ω

ω

ω ωπ

−=

=

∫/ 2

2 /

/ 2

2 /

1[ ] ( )

( ) [ ]

Tj kt T

T

j kt T

k

F k f t e dtT

f t F k e

π

π

=

=

12 /

01

2 /

0

1[ ] [ ]

[ ] [ ]

Nj kn T

nN

j kn T

n

F k f n eN

f n F k e

π

π

−−

=−

=

=

=

( )2

( ) [ ]

1[ ]2

j k

k

j k

F f k e

f k F e dππ

+∞− Ω

=−∞

Ω

Ω =

= Ω Ω

Page 33: 2D Fourier Transform - Univr

Linking continuous and discrete domains

• DT signals can be seen as sampled versions of CT signals

• Both CT and DT signals can be of finite duration or periodic

• There is a duality between periodicity and discretization– Periodic signals have discrete frequency (DF) transform (f=k) → CTFS– Discrete time signals have periodic transform → DTFT– DT periodic signals have DF periodic transforms → DTFS, DFT

t

ampl

itude

ampl

itude

n

fk=f(kTs)

Ts

Page 34: 2D Fourier Transform - Univr

Dualities

FOURIER DOMAINSIGNAL DOMAIN

Sampling

Periodicity

Periodicity

Sampling

DTFT

CTFS

Sampling+Periodicity Sampling +PeriodicityDTFS/DFT

Page 35: 2D Fourier Transform - Univr

Discrete time signalsSequences 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ωΩ =2

ssTπω =

2 2s s s ss

T TTπω πΩ = = =

Page 36: 2D Fourier Transform - Univr

Connection DTFT-CTFT

0 Ts 4Ts

0 1 4 k

t

t

ω

ω

Ω

0

0 2π

F(Ω)

Fc(ω)_0

2π/Ts

Fc(ω)sampling periodization

f(t)

f(kTs)

f[k]

Page 37: 2D Fourier Transform - Univr

CTFS

• Continuous Time Fourier Series

• Continuous time periodic signals– The signal is periodic with period T– The transform is “sampled” (it is a series)

/ 22 /

/ 2

2 /

1[ ] ( )

( ) [ ]

Tj kt T

T

j kt T

k

F k f t e dtT

f t F k e

π

π

=

=

t

ampl

itude

T

coefficients of the Fourier series

periodic signal

Page 38: 2D Fourier Transform - Univr

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

• Properties– even symmetry → only cosinusoidal components– odd symmetry → only sinusoidal components

Page 39: 2D Fourier Transform - Univr

DTFT

• Discrete Time Fourier Transform

• Discrete time a-periodic signal

• The transform is periodic and continuous with period

( )

( ) ( )

2 /

/ 2 /2 /

/ 2 /

[ ] [ ]

1 2[ ]

2 2 22

s s

s s

s s

s s

j n j nT

n nT

j n j nTj t j t

s s T

s s ss s

F f n e f n e

f n F e e d F e e dT

T TT

πω ω ω

ω ππω ω ωω ω

ω π

ω

πω ωωπ πω πωω ω

ω π

− −

− −

= =

= =

= → = =

∑ ∑

∫ ∫

non normalized frequency

2 /s sT π ω=

2s

sTπω =

sampling interval in time ↔ periodicity in frequencythe closer the samples, the farther the replicas

n

Page 40: 2D Fourier Transform - Univr

DTFT with normalized frequency

• Normalized frequency: change of variables

( )2

( ) [ ]

1[ ]2

jn

n

jk

F f k e

f n F e dππ

+∞− Ω

=−∞

Ω

Ω =

= Ω Ω

normalized frequency

( ) 1c

s s

F FT T

⎛ ⎞ΩΩ = ⎜ ⎟

⎝ ⎠

sTωΩ =

2s πΩ =

2 2s s s ss

T TTπω πΩ = = =

periodicity in the normalized frequency domain

Relation to the CTFT

If Ts>1, the DTFT can be seen as a stretched periodizedversion of the CTFT.

Page 41: 2D Fourier Transform - Univr

DTFT with normalized frequency

• F(Ω) can be obtained from Fc(ω) by replacing ω with Ω /Ts.

• Thus F(Ω) is identical to F(ω) frequency scaled and stratched by a factor 1/Ts, where Ts is the sampling interval in time domain

• Notations

( )

( ) ( )

( ) 2 /

1

2 2

( ) 2 /

( ) [ ] ( ) [ ] s

cs s

s ss s

ss

s s

j nj ns

n k

F FT T

TT

TT

F F T F

F f n e F T F f n e πω ω

π πωω

ω ω

ω ω π ω

ω ω+∞ +∞

−− Ω

=−∞ =−∞

⎛ ⎞ΩΩ = ⎜ ⎟

⎝ ⎠

= → =

Ω= →Ω =

Ω → =

Ω = → = =∑ ∑

_

periodicity of the spectrum

normalized frequency (the spectrum is 2π-periodic)

DTFT CTFT

Page 42: 2D Fourier Transform - Univr

DTFT with unitary frequency( )

2

12

2 2

12 12

2

12

2

12

2 2

( ) [ ] ( ) [ ]

1[ ] ( ) [ ] ( ) ( )2

( ) [ ]

[ ] ( )

j n j nu

n n

j n j nu j nu

j nu

n

j nu

u f

F f n e F u f n e

f n F e d f n F u e du F u e du

F u f k e

f n 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.

Page 43: 2D Fourier Transform - Univr

Summary

• Sampled signals are sequences of sampels

• Looking at the sequence as to a set of samples obtained by sampling a real signal with sampling 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

ωππ ω

Ω =

→ =

normalized frequency(sample series) frequency (sampled signal)

spectral periodicity in Ω spectral periodicity in ω

Page 44: 2D Fourier Transform - Univr

Connection DTFT-CTFT

0 Ts 4Ts

0 1 4 k

t

t

ω

ω

Ω

0

0 2π

F(Ω)

Fc(ω)_0

2π/Ts

Fc(ω)sampling periodization

f(t)

f(kTs)

f[k]

Page 45: 2D Fourier Transform - Univr

Differences DTFT-CTFT

• The DTFT is periodic with period Ωs=2π (or ωs=2π/Ts)

• The discrete-time exponential ejΩn 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)

Page 46: 2D Fourier Transform - Univr

DTFS

• Discrete Time Fourier Series

• Discrete time periodic sequences of period N0– Fundamental frequency

0 02 / NπΩ =

00

00

12 /

001

2 /

0

1[ ] [ ]

[ ] [ ]

Njkn N

nN

jkn N

k

F k f n eN

f n F k e

π

π

−−

=−

=

=

=

Page 47: 2D Fourier Transform - Univr

DTFS: Example

[Lathi, pag 621]

N0=20Ts=1Ωs=2πΩ0= π/10

Page 48: 2D Fourier Transform - Univr

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-N0discrete-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 nkjn k N

n nn n

N N jn kjn k N

k k

F k f e f e

f n F k e F k eN N

N

π

π

π

− − −− Ω

= =

− −Ω

= =

= =

= =

Ω =

∑ ∑

∑ ∑

Page 49: 2D Fourier Transform - Univr

DFT

n

zero padding

0 N0

k0 2π

F(Ω)

4π2π/N0

Page 50: 2D Fourier Transform - Univr

DFT

n

zero padding

0N0

k0 2π

F(Ω)

4π2π/N0

Increasing the number of zeros augments the “resolution” of the transform since the samples of the DFT gets “closer”

Page 51: 2D Fourier Transform - Univr

Properties

( ) ( )( ) ( ) ( )

( ) ( ) ( ) ( )'

ˆ

ˆ ˆ

Pr

ˆ' 'j t j t

f t f

f t f foof

f t f t e dt f t e dt fω ω

ω

ω ω

ω

+∞ +∞−

−∞ −∞

− → − =

ℑ − = − = = −∫ ∫

For real signals f(t)

Page 52: 2D Fourier Transform - Univr

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 functions oscillating 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, out of which four are common

• Strong connection with the Karunen-Loeven transform– VERY important for signal compression

Page 53: 2D Fourier Transform - Univr

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 halfway between a and the previous point, in which case the even extension is dcbaabcd (a is repeated).

Page 54: 2D Fourier Transform - Univr

Symmetries

Page 55: 2D Fourier Transform - Univr

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.

Page 56: 2D Fourier Transform - Univr

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– ….

Page 57: 2D Fourier Transform - Univr

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

Page 58: 2D Fourier Transform - Univr

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

Page 59: 2D Fourier Transform - Univr

Vertical grating

ωx

ωy

0

Page 60: 2D Fourier Transform - Univr

Double grating

ωx

ωy

0

Page 61: 2D Fourier Transform - Univr

Smooth rings

ωx

ωy

Page 62: 2D Fourier Transform - Univr

2D box2D sinc

Page 63: 2D Fourier Transform - Univr

Margherita Hack

log amplitude of the spectrum

Page 64: 2D Fourier Transform - Univr

Einstein

log amplitude of the spectrum

Page 65: 2D Fourier Transform - Univr

What we are going to analyze

• 2D Fourier Transform of continuous signals (2D-CTFT)

• 2D Fourier Transform of discrete space 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

Page 66: 2D Fourier Transform - Univr

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

Page 67: 2D Fourier Transform - Univr

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

π

π

π

ω πω π

ππ

ππ

+∞− +

−∞

+∞+

−∞

+∞+

−∞

=

=

=

= =

=

Page 68: 2D Fourier Transform - Univr

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

Page 69: 2D Fourier Transform - Univr

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

−− Ω

=

−Ω

=

=

=

Ω =

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

− −− Ω +

= =

− −Ω +

= =

=

=

Ω =

∑ ∑

∑ ∑

The independent variable (t,x,y) is discrete

[Lathi’s notations]

Page 70: 2D Fourier Transform - Univr

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

Page 71: 2D Fourier Transform - Univr

Constant functions

• Inverse transform of the impulse function

• Fourier Transform of the constant (=1 for all x and y)

( ) 2 ( )

( , ) 1 ,

, ( , )j ux vy

k x y x y

F u v e dxdy u vπ δ∞ ∞

− +

−∞ −∞

= ∀

= =∫ ∫

1 2 ( ) 2 (0 0)( , ) ( , ) 1j ux vy j x vF u v u v e dudv eπ πδ δ∞ ∞

− + +

−∞ −∞

= = =∫ ∫

Page 72: 2D Fourier Transform - Univr

Trigonometric functions

• Cosine 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 ( ) 2

2 2 ( ) 2 ( ) 2 ( ) 2 ( )

12

1 112 2

1 ( ) ( )2

j u f x j u f x j vy

j vy j u f x j u f x j u f x j u f x

e e e dxdy

e dy e e dx e e dx

u f u f

π π π

π π π π π

δ δ

∞ ∞− − − + −

−∞ −∞

∞ ∞ ∞− − − − + − − − +

−∞ −∞ −∞

⎡ ⎤= + =⎣ ⎦

⎡ ⎤ ⎡ ⎤= + = + =⎣ ⎦ ⎣ ⎦

− + +

∫ ∫

∫ ∫ ∫

Page 73: 2D Fourier Transform - Univr

Vertical grating

ωx

ωy

0-2πf 2πf

Page 74: 2D Fourier Transform - Univr

Ex. 1

Page 75: 2D Fourier Transform - Univr

Ex. 2

Page 76: 2D Fourier Transform - Univr

Ex. 3

Magnitudes

Page 77: 2D Fourier Transform - Univr

Examples

Page 78: 2D Fourier Transform - Univr

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π + ⇔ − −

Page 79: 2D Fourier Transform - Univr

Separability

1. Separability of the 2D Fourier transform– 2D Fourier Transforms can be implemented as a sequence of 1D Fourier

Transform operations performed independently along the two axis

( )

2 ( )

2 2 2 2

2

( , ) ( , )

( , ) ( , )

( , ) ,

j ux vy

j ux j vy j vy j ux

j vy

F u v f x y e dxdy

f x y e e dxdy e dy f x y e dx

F u y e dy F u v

π

π π π π

π

∞ ∞− +

−∞ −∞

∞ ∞ ∞ ∞− − − −

−∞ −∞ −∞ −∞

∞−

−∞

= =

= =

= =

∫ ∫

∫ ∫ ∫ ∫

2D DFT 1D DFT along the rows

1D DFT along the cols

Page 80: 2D Fourier Transform - Univr

Separability

• Separable functions can be written as

2. The FT of a separable function is the product of the FTs of the two functions

( ) ( )

( ) ( )

2 ( )

2 2 2 2

( , ) ( , )

( ) ( )

j ux vy

j ux j vy j vy j ux

F u v f x y e dxdy

h x g y e e dxdy g y e dy h x e dx

H u G v

π

π π π π

∞ ∞− +

−∞ −∞

∞ ∞ ∞ ∞− − − −

−∞ −∞ −∞ −∞

= =

= =

=

∫ ∫

∫ ∫ ∫ ∫

( ) ( ) ( ) ( ) ( ) ( ), ,f x y h x g y F u v H u G v= ⇒ =

( ) ( ) ( ),f x y f x g y=

Page 81: 2D Fourier Transform - Univr

• 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π ππ

− Ω + Ω+∞ +∞

=−∞ =−∞

Ω + Ω

Ω Ω =

= Ω Ω Ω Ω

∑ ∑

∫ ∫

1D

2D

Ωx,Ωy: normalized frequency

Page 82: 2D Fourier Transform - Univr

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−≤ <

Page 83: 2D Fourier Transform - Univr

Properties

• Periodicity: 2D Fourier Transform of a discrete a-periodic signal is periodic– The period is 1 for the unitary frequency notations and 2π for normalized

frequency notations. – Proof (referring to the firsts case)

( )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

Page 84: 2D Fourier Transform - Univr

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)

Page 85: 2D Fourier Transform - Univr

2D DTFT 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= ⇔ =1/ 2 1/ 2

2 2

1/ 2 1/ 2

[ , ] ( , )m n

f m n F u v dudv∞ ∞

=−∞ =−∞ − −

=∑ ∑ ∫ ∫

Page 86: 2D Fourier Transform - Univr

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

Page 87: 2D Fourier Transform - Univr

Appendix

Page 88: 2D Fourier Transform - Univr

2D-DTFT: delta

Define Kronecker delta function

DT 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π πδ∞ ∞

− + − +

=−∞ =−∞

⎡ ⎤= = =⎣ ⎦∑ ∑

Page 89: 2D Fourier Transform - Univr

2D DT Fourier Transform: 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 uk vl

k l

k l

f k l k l

F u v e

u k v l

π

δ

∞ ∞− +

=−∞ =−∞

∞ ∞

=−∞ =−∞

= ∀

⎡ ⎤= =⎣ ⎦

= − −

∑ ∑

∑ ∑ periodic with period 1 along u and v