+ All Categories
Home > Documents > Fourier Transform

Fourier Transform

Date post: 22-Oct-2014
Category:
Upload: resming
View: 512 times
Download: 1 times
Share this document with a friend
Description:
CS804B, M1_3, Lecture Notes
Popular Tags:
63

Click here to load reader

Transcript
Page 1: Fourier Transform

Resmi N.G.Resmi N.G.Reference: Digital Image Processing

Rafael C. GonzalezRichard E. Woods

Page 2: Fourier Transform

Mathematical Background:Complex Numbers

� A complex number x is of the form:

a: real part, b: imaginary part

, 1x a jb where j= + = −

a: real part, b: imaginary part

� Addition

� Multiplication

( ) ( ) ( ) ( )a jb c jd a c j b d+ + + = + + +

( ).( ) ( ) ( )a jb c jd ac bd j ad bc+ + = − + +

3/19/2012 2CS04 804B Image Processing - Module1

Page 3: Fourier Transform

� Magnitude-Phase (Vector) representation

Magnitude:

Phase:

φ Phase – Magnitude notation:

3/19/2012 3CS04 804B Image Processing - Module1

Page 4: Fourier Transform

� Multiplication using magnitude-phase representation

� Complex conjugate

� Properties

3/19/2012 4CS04 804B Image Processing - Module1

Page 5: Fourier Transform

Sine and Cosine Functions

π

π

3/19/2012 5CS04 804B Image Processing - Module1

Page 6: Fourier Transform

Shifting or translating the sine function by a constant b.

Note: Cosine is a shifted sine function.

cos( ) sin( )2

t tπ

= +

3/19/2012 6CS04 804B Image Processing - Module1

Page 7: Fourier Transform

Image Transforms� Key steps:

(1) Transform the image(2) Perform the task(s) in the transformed domain.(3) Apply inverse transform to return to the spatial domain.(3) Apply inverse transform to return to the spatial domain.

3/19/2012 CS04 804B Image Processing - Module1 7

Page 8: Fourier Transform

Fourier Series

� Any function that periodically repeats itself can beexpressed as the sum of sines and/or cosines of differentfrequencies each multiplied by a different coefficient.

3/19/2012 8CS04 804B Image Processing - Module1

Page 9: Fourier Transform

3/19/2012 CS04 804B Image Processing - Module1 9

Page 10: Fourier Transform

3/19/2012 CS04 804B Image Processing - Module1 10

Page 11: Fourier Transform

Fourier Transform

� Functions that are not periodic but whose area under thecurve is finite can be expressed as the integral of sinesand/or cosines multiplied by a weighing function.and/or cosines multiplied by a weighing function.

� Transforms a function from spatial domain to frequencydomain.

3/19/2012 11CS04 804B Image Processing - Module1

Page 12: Fourier Transform

Why is Fourier Transform Useful?

� Easier to remove undesirable frequencies.

� Faster to perform certain operations in the frequency� Faster to perform certain operations in the frequencydomain than in the spatial domain.

3/19/2012 12CS04 804B Image Processing - Module1

Page 13: Fourier Transform

Example: Removing undesirable frequencies

frequenciesnoisy signal

remove highfrequencies

reconstructedsignal

To remove certain frequencies, set their corresponding F(u)coefficients to zero!

3/19/2012 13CS04 804B Image Processing - Module1

Page 14: Fourier Transform

How do frequencies show up in an image?

� Low frequencies correspond to slowly varyinginformation (e.g., continuous surface).

� High frequencies correspond to quickly varyinginformation (e.g., edges)information (e.g., edges)

Original Image Low-passed

3/19/2012 14CS04 804B Image Processing - Module1

Page 15: Fourier Transform

� A function expressed in either a Fourier Series or FourierTransform can be reconstructed completely via an inverseprocess.process.

3/19/2012 CS04 804B Image Processing - Module1 15

Page 16: Fourier Transform

Fourier Transforms of Some Simple Shapes

3/19/2012 CS04 804B Image Processing - Module1 16

Page 17: Fourier Transform

3/19/2012 CS04 804B Image Processing - Module1 17

Page 18: Fourier Transform

3/19/2012 CS04 804B Image Processing - Module1 18

Page 19: Fourier Transform

One Dimensional Fourier Transform and its Inverse

� The Fourier Transform F(u) of a single variablecontinuous function f(x) is defined by

where

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

−∞

= − − − −∫= −� where

� Given F(u), f(x) can be obtained by means of inverseFourier Transform

� (1) and (2) constitute the Fourier Transform pair.

3/19/2012 CS04 804B Image Processing - Module1 19

−∞1j = −

2( ) ( ) (2)j uxf x F u e duπ∞

−∞

= − − − −∫

Page 20: Fourier Transform

/22 2

/2

2 2/22 2 2

/2

2 2

( ) ( ) 1.

2 2

2sin

2

Tj ux j ux

T

T Tj u j uTj ux

T

T Tj u j u

F u f x e dx e dx

e e ej u j u

uTe e uT

π π

π ππ

π π

π π

ππ

∞− −

−∞ −

−− −−

= =

− = = − −

∫ ∫

3/19/2012 CS04 804B Image Processing - Module1 20

2 22 2

sin22 sin

2 2

2sin

22

2

j u j ue e uT

u j

uT

TuT

π ππ

π

π

π

− − = = −

=

Q

Page 21: Fourier Transform

3/19/2012 CS04 804B Image Processing - Module1 21

Page 22: Fourier Transform

/42 2

/4

2 2/42 4 4

/4

2 2

( ) ( ) 2.

22 2

2sin

2

Tj ux j ux

T

T Tj u j uTj ux

T

T Tj u j u

F u f x e dx e dx

e e ej u j u

uTe e uT

π π

π ππ

π π

π π

ππ

∞− −

−∞ −

−− −−

= =

− = = − −

∫ ∫

3/19/2012 CS04 804B Image Processing - Module1 22

2 24 4

sin242 sin

2 4

2sin

422

4

j u j ue e uT

u j

uT

TuT

π ππ

π

π

π

− − = = −

=

Q

Page 23: Fourier Transform

3/19/2012 CS04 804B Image Processing - Module1 23

Page 24: Fourier Transform

Discrete Fourier Transform (DFT)

� Fourier Transform of a discrete function of one variable,f(x), x = 0, 1, 2, …, M-1 is given by

� where u = 0, 1, 2, …, M-1.

3/19/2012 CS04 804B Image Processing - Module1 24

1 2

0

1( ) ( )

M j uxM

x

F u f x eM

π− −

=

= ∑

Page 25: Fourier Transform

Inverse DFT1 2

0

1( ) ( )

M j uxM

u

f x F u eM

π−

=

= ∑

� where x = 0, 1, 2, …, M-1.

� The product of multipliers used in DFT and its inverseshould be equal to 1/M.

3/19/2012 CS04 804B Image Processing - Module1 25

Page 26: Fourier Transform

� Euler’s Formula :

� Therefore,

cos sinje jθ θ θ= +

( ) ( )11 2 2( ) ( ) cos sin

Mux uxF u f x jM M

π π−

= − ∑

� where u = 0, 1, 2, …, M-1.

� Each term of Fourier Transform F(u), for each value of u, is composed of sum of all values of function f(x).

3/19/2012 CS04 804B Image Processing - Module1 26

( ) ( )0

2 2( ) ( ) cos sinx

ux uxF u f x jM MMπ π

=

= − ∑

Page 27: Fourier Transform

� Values of f(x) are in turn multiplied by sines and cosinesof various frequencies.

� The domain (values of u) over which the values of F(u)range is called the frequency domain, because urange is called the frequency domain, because udetermines the frequency components of the transform.

� Each of the M terms of F(u) is called a frequencycomponent of the transform.

3/19/2012 CS04 804B Image Processing - Module1 27

Page 28: Fourier Transform

� Analogy –� Prism separates light into various color components each

depending on its wavelength or frequency content.

� Fourier Transform separates a function into variouscomponents based on frequency content.

3/19/2012 CS04 804B Image Processing - Module1 28

Page 29: Fourier Transform

� Fourier Transform in Polar Co-ordinates

� where

( )( ) ( ) j uF u F u e φ−=

12 2 2( ) ( ) ( )F u R u I u = +

� is called the magnitude or spectrum of Fourier Transformand

� is called the phase angle of Fourier Transform.

3/19/2012 CS04 804B Image Processing - Module1 29

( ) ( ) ( )F u R u I u = +

1 ( )( ) tan

( )I u

uR u

φ − =

Page 30: Fourier Transform

� Power Spectrum or Spectral Density� 2

2 2

( ) ( )

( ) ( )

P u F u

R u I u

=

= +

3/19/2012 CS04 804B Image Processing - Module1 30

Page 31: Fourier Transform

� Fourier Transform is centered at origin, but DFT is centered atM/2.

3/19/2012 CS04 804B Image Processing - Module1 31

Page 32: Fourier Transform

� DFT spectrum can be centered at u=0, by multiplying f(x) by(-1)x before taking the transform (Centering). F(0) will then beat u=M/2.

3/19/2012 CS04 804B Image Processing - Module1 32

Page 33: Fourier Transform

3/19/2012 CS04 804B Image Processing - Module1 33

Page 34: Fourier Transform

� Height of the spectrum doubles as area under the curve inx-domain doubles.

� Number of zeroes in the spectrum in the same intervaldoubles as the length of the function doubles.doubles as the length of the function doubles.

3/19/2012 CS04 804B Image Processing - Module1 34

Page 35: Fourier Transform

More on DFT� Samples are equally spaced.� Samples need not be at integer values of x in [0, M-1].� Can be spaced at x0, x0+∆x, …, x0+(M-1)∆x.� kth sample f(k) is at x0+k∆x.

3/19/2012 CS04 804B Image Processing - Module1 35

0( ) (x x)f x f x= + ∆

( ) ( )F u F u u= ∆1

xu

M∆ =

Page 36: Fourier Transform

2D-Fourier Transform2 ( )( , ) ( , ) j ux vyF u v f x y e dxdyπ

∞ ∞− +

−∞ −∞

= ∫ ∫

3/19/2012 CS04 804B Image Processing - Module1 36

2 ( )( , ) ( , ) j ux vyf x y F u v e dudvπ∞ ∞

+

−∞ −∞

= ∫ ∫

Page 37: Fourier Transform

2D-Discrete Fourier Transform and its Inverse

� 2D-DFT of image f(x,y) of size MxN is given by

( )1 1 2

0 0

1( , ) ( , )

vyM N uxj M N

x y

F u v f x y eMN

π− − − +

= =

= ∑∑

� These equations constitute a 2D-DFT pair.� u, v – are transform or frequency variables.� x, y – are spatial or image variables.

3/19/2012 CS04 804B Image Processing - Module1 37

( )1 1 2

0 0

( , ) ( , )vyM N uxj M N

u v

f x y F u v eπ− − +

= =

= ∑ ∑

Page 38: Fourier Transform

� Fourier Spectrum:

� Phase Angle:

12 2 2( , ) ( , ) ( , )F u v R u v I u v = +

1 ( , )( , ) tan

( , )I u v

u vR u v

φ − =

� Power Spectrum:

3/19/2012 CS04 804B Image Processing - Module1 38

( , )R u v

2

2 2

( , ) ( , )

( , ) ( , )

P u v F u v

R u v I u v

=

= +

Page 39: Fourier Transform

� Centering is done by multiplying the input image functionby (-1)x+y prior to computing the transform. F(0,0) will thenbe at u=M/2, v=N/2.

M N

3/19/2012 CS04 804B Image Processing - Module1 39

( , ).( 1) ( , )2 2

x y M Nf x y F u v+ ℑ − = − −

Page 40: Fourier Transform

� gives the average of f(x,y).� That is, the value of Fourier Transform at the origin is

1 1

0 0

1(0,0) ( , )

M N

x y

F f x yMN

− −

= =

= ∑∑

� That is, the value of Fourier Transform at the origin isequal to the average gray level of the image.

� It corresponds to the dc component of the spectrum(frequencies are zero at the origin).

3/19/2012 CS04 804B Image Processing - Module1 40

Page 41: Fourier Transform

Properties of Fourier Transform� Linearity

� If F(u) and G(u) are Fourier transforms of f(x) and g(x)� If F(u) and G(u) are Fourier transforms of f(x) and g(x)respectively, then

� where a and b are constants.

3/19/2012 CS04 804B Image Processing - Module1 41

[ ( ) ( )] ( ) ( )F af x bg x aF u bG u+ = +

Page 42: Fourier Transform

� Proof:

2

2 2

[ ( ) ( )] [ ( ) ( )]

( ) ( )

j ux

j ux j ux

F af x bg x af x bg x e dx

af x e dx bg x e dx

π

π π

∞−

−∞

∞ ∞− −

+ = +

= +

∫ ∫

3/19/2012 CS04 804B Image Processing - Module1 42

2 2

( ) ( )

( ) ( )

( ) ( )

j ux j ux

af x e dx bg x e dx

a f x e dx b g x e dx

aF u bG u

π π

−∞ −∞

∞ ∞− −

−∞ −∞

= +

= +

= +

∫ ∫

∫ ∫

Page 43: Fourier Transform

� Linearity� Additivity: The property that performing a linear process on

the sum of inputs is same as that of performing theoperations individually and then summing up the resuts.operations individually and then summing up the resuts.

� Homogeneity: The property that the response of a linearsystem to a constant times an input is same as the responseto the original input multiplied by a constant.

3/19/2012 CS04 804B Image Processing - Module1 43

Page 44: Fourier Transform

� Change of Scale Property� If F(u) is the Fourier transform of f(x), then

� Proof:

1[ ( )] , 0

uF f ax F a

a a = ≠

2[ ( )] ( ) j uxF f ax f ax e dxπ∞

−= ∫

3/19/2012 CS04 804B Image Processing - Module1 44

2[ ( )] ( )

,

,

j uxF f ax f ax e dx

Let ax t

tOr x

adt

dxa

π−

−∞

=

=

=

∴ =

Page 45: Fourier Transform

2

2

[ ( )] ( )

1( )

1

j ux

tj u

a

u

F f ax f ax e dx

f t e dta

π

π

∞−

−∞

∞−

−∞

=

=

3/19/2012 CS04 804B Image Processing - Module1 45

21( )

1

uj t

af t e dta

uF

a a

π∞

−∞

=

=

Page 46: Fourier Transform

� Shifting Property� If F(u) is the Fourier transform of f(x), then

� Proof:

020[ ( )] ( )j uxF f x x e F uπ−− =

2[ ( )] ( ) j uxF f x x f x x e dxπ∞

−− = −∫

3/19/2012 CS04 804B Image Processing - Module1 46

0 0

0

0

[ ( )] ( )

,

,

F f x x f x x e dx

Let x x t

Or x x t

dx dt

−∞

− = −

− =

= +

∴ =

Page 47: Fourier Transform

0

0

2 ( )0

22

[ ( )] ( )

( ) .

j u t x

j uxj ut

F f x x f t e dt

f t e e dt

π

ππ

∞− +

−∞

∞−−

−∞

− =

=

3/19/2012 CS04 804B Image Processing - Module1 47

0

0

2 2

2

( )

( )

j ux j ut

j ux

e f t e dt

e F u

π π

π

−∞

∞− −

−∞

=

=

Page 48: Fourier Transform

Properties of 2D-DFT

� 1. Translation

0 02( , ) ( , ) (1)

u x v yj M Nf x y e F u u v vπ + ⇔ − − −− −

3/19/2012 CS04 804B Image Processing - Module1 48

0 0( , ) ( , ) (1)M Nf x y e F u u v v ⇔ − − −− −

0 02

0 0( , ) ( , ) (2)u x v yj M Nf x x y y F u v e

π − + − − ⇔ −−−

Page 49: Fourier Transform

� When

� Therefore, (1) and (2) can be written as:

0 02 2NMu and v= =

0 02( ) ( 1)

u x v yj M N j x y x ye eπ π + + + = = −

M N

3/19/2012 CS04 804B Image Processing - Module1 49

( , )( 1) ,2 2

x y M Nf x y F u v+ − ⇔ − −

, ( , )( 1)2 2

u vM Nf x y F u v + − − ⇔ −

Page 50: Fourier Transform

� 2. Distributivity

[ ] [ ] [ ]1 2 1 2( , ) ( , ) ( , ) ( , )f x y f x y f x y f x yℑ + = ℑ +ℑ

[ ] [ ] [ ]1 2 1 2( , ). ( , ) ( , ) . ( , )f x y f x y f x y f x yℑ ≠ ℑ ℑ

� 3. Scaling

3/19/2012 CS04 804B Image Processing - Module1 50

( , ) ( , )af x y aF u v⇔

1( , ) ,

u vf ax by F

ab a b ⇔

Page 51: Fourier Transform

� 4. Rotation� Representation in terms of polar coordinates

cos , sin

cos , sin

x r y r

u w v w

θ θφ φ

= =

= =

� Rotating f(x,y) by an angle θ0 rotates F(u,v) by the sameangle.

� Rotating F(u,v) rotates f(x,y) by the same angle.

3/19/2012 CS04 804B Image Processing - Module1 51

0 0( , ) ( , )f r F wθ θ φ θ+ ⇔ +

Page 52: Fourier Transform

� 5. Periodicity

� Inverse Transform is also periodic.

( , ) ( , ) ( , ) ( , )F u v F u M v F u v N F u M v N= + = + = + +

( , ) ( , ) ( , ) ( , )f x y f x M y f x y N f x M y N= + = + = + +

� 6. Conjugate Symmetry

3/19/2012 CS04 804B Image Processing - Module1 52

*( , ) ( , )F u v F u v= − −

Page 53: Fourier Transform

� 7. Separability

1 12 2

0 0

12

1 1( , ) . ( , )

1( , )

M Nj ux M j vy N

x y

Mj ux M

F u v e f x y eM N

F x v eM

π π

π

− −− −

= =

−−

=

=

∑ ∑

� F(x,v) à Fourier Transform along one row of f(x,y).� à 1Dimensional Fourier Transform is computed

for each value of x, with v varying from 0 to N-1.

3/19/2012 CS04 804B Image Processing - Module1 53

0xM =∑

Page 54: Fourier Transform

� By varying x from 0 to M-1, Fourier Transform iscomputed along all rows of f(x,y), with u remainingconstant.

� To complete the 2D transform, vary u from 0 to M-1.Compute 1D transform along each column of F(x,v).Compute 1D transform along each column of F(x,v).

3/19/2012 CS04 804B Image Processing - Module1 54

( , ) ( , ) ( , )f x y F x v F u v⇒ ⇒

1D Row Transform 1D ColumnTransform

Page 55: Fourier Transform

Fast Fourier Transform� 1D-transform of M points requires order of M2

multiplications / additions.

� FFT requires order of Mlog M operations.� FFT requires order of Mlog2M operations.

� where and M=2k; k is a positive integer.

3/19/2012 CS04 804B Image Processing - Module1 55

1

0

1( ) ( )

MuxM

x

F u f x WM

=

= ∑2jM

MW eπ−

=

Page 56: Fourier Transform

1

0

2 1

2

1( ) ( )

1( )

MuxM

x

kuxk

F u f x WM

f x W

=

=

=

3/19/2012 CS04 804B Image Processing - Module1 56

20

1 1(2 ) (2 1)

2 20 0

( )2

1 1 1(2 ) (2 1)

2

kx

k ku x u xk k

x x

f x Wk

f x W f x Wk k

=

− −+

= =

=

= + +

∑ ∑

Page 57: Fourier Transform

2

2 (2 )

,

,

jM

M

j u x

We have

W e

Therefore

π

π

=

3/19/2012 CS04 804B Image Processing - Module1 57

2 (2 )(2 ) 2

2

2

j u xu x kk

j uxk

uxk

W e

e

W

π

π

=

=

=

Page 58: Fourier Transform

1 1(2 ) (2 )

2 2 20 0

1 1 1( ) (2 ) (2 1)

2

k ku x u x uk k k

x x

F u f x W f x W Wk k

− −

= =

= + +

∑ ∑

1 1

20 0

1 1 1(2 ) (2 1)

2

k kux ux uk k k

x x

f x W f x W Wk k

− −

= =

= + +

∑ ∑

3/19/2012 CS04 804B Image Processing - Module1 58

0 02 x xk k= = ∑ ∑

Feven(u) Fodd(u)

2

1( ) ( )

2u

even odd kF u F u W = +

Page 59: Fourier Transform

1( )

0

2 1

2 20

1( ) ( )

1( )

2

Mu k x

Mx

kux kxk k

x

F u k f x WM

f x W Wk

−+

=

=

+ =

=

3/19/2012 CS04 804B Image Processing - Module1 59

1(2 ) (2 )

2 20

1(2 1) (2 1)

2 20

1 1(2 )

2

1 1(2 1)

2

ku x k xk k

x

ku x k xk k

x

f x W Wk

f x W Wk

=

−+ +

=

=

+ +

Page 60: Fourier Transform

12 2

2 20

12 2

2 2 2 20

1 1(2 )

2

1 1(2 1)

2

kux kxk k

x

kux u kx kk k k k

x

f x W Wk

f x W W W Wk

=

=

=

+ +

3/19/2012 CS04 804B Image Processing - Module1 60

0

2 22 22

2

22

2

2

, 1

1

x

j kxkx j xkk

j kk jkk

k

But W e e

and W e e

ππ

ππ

=

−−

−−

= = =

= = = −

Page 61: Fourier Transform

1

0

1

20

1

1 1( ) (2 ) .1

2

1 1(2 1) .1.( 1)

2

1 1(2 )

kuxk

x

kux uk k

x

kux

F u k f x Wk

f x W Wk

f x W

=

=

+ =

+ + −

=

3/19/2012 CS04 804B Image Processing - Module1 61

0

1

20

2

1 1(2 )

2

1 1(2 1) ( )

2

1( ) ( )

2

uxk

x

kux uk k

x

ueven odd k

f x Wk

f x W Wk

F u F u W

=

=

=

+ + −

= −

Page 62: Fourier Transform

2

1( ) ( ) ( )

2u

even odd kF u F u F u W = +

� Fast Fourier Transform Computation Steps

3/19/2012 CS04 804B Image Processing - Module1 62

2

1( ) ( ) ( )

2u

even odd kF u k F u F u W + = −

� Requires only two M/2-point transforms.

Page 63: Fourier Transform

Thank YouThank You

3/19/2012 CS04 804B Image Processing - Module1 63


Recommended