ee 7730 2d fourier transform. bahadir k. gunturk ee 7730 - image analysis i 2 summary of lecture 2...

Post on 30-Dec-2015

224 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

EE 7730

2D Fourier Transform

Bahadir K. Gunturk EE 7730 - Image Analysis I 2

Summary of Lecture 2

We talked about the digital image properties, including spatial resolution and grayscale resolution.

We reviewed linear systems and related concepts, including shift invariance, causality, convolution, etc.

Bahadir K. Gunturk EE 7730 - Image Analysis I 3

Fourier Transform

What is ahead? 1D Fourier Transform of continuous signals 2D Fourier Transform of continuous signals 2D Fourier Transform of discrete signals 2D Discrete Fourier Transform (DFT)

Bahadir K. Gunturk EE 7730 - Image Analysis I 4

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.

Bahadir K. Gunturk EE 7730 - Image Analysis I 5

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: z = x + j*y

A complex exponential signal: r*exp(j*a) =r*cos(a) + j*r*sin(a)

Bahadir K. Gunturk EE 7730 - Image Analysis I 6

Fourier Transform: 1D Cont. Signals■ 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”

Bahadir K. Gunturk EE 7730 - Image Analysis I 7

Fourier Transform: 2D Cont. Signals■ Fourier Transform of a 2D continuous signal

■ Inverse Fourier Transform

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

2 ( )( , ) ( , ) j ux vyF u v f x y e dxdy

f F

■ F and f are two different representations of the same signal.

Bahadir K. Gunturk EE 7730 - Image Analysis I 8

Examples

Magnitude: “how much” of each componentPhase: “where” the frequency component in the image

Bahadir K. Gunturk EE 7730 - Image Analysis I 9

Examples

Bahadir K. Gunturk EE 7730 - Image Analysis I 10

Fourier Transform: Properties■ Linearity

■ Shifting

■ Modulation

■ Convolution

■ Multiplication

■ Separable functions

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

Bahadir K. Gunturk EE 7730 - Image Analysis I 11

Fourier Transform: Properties■ 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.

Bahadir K. Gunturk EE 7730 - Image Analysis I 12

Fourier Transform: Properties■ Energy conservation

2 2( , ) ( , )f x y dxdy F u v dudv

Bahadir K. Gunturk EE 7730 - Image Analysis I 13

Fourier Transform: Properties■ Remember the impulse function (Dirac delta function) definition

0 0( ) ( ) ( )x x f x dx f x

■ Fourier Transform of the impulse function

2 ( )( , ) ( , ) 1j ux vyF x y x y e dxdy

Bahadir K. Gunturk EE 7730 - Image Analysis I 14

Fourier Transform: Properties■ Fourier Transform of 1

2 ( )1 ( , )j ux vyF 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

Bahadir K. Gunturk EE 7730 - Image Analysis I 15

Fourier Transform: 2D Discrete Signals■ Fourier Transform of a 2D discrete signal is defined as

where

2 ( )( , ) [ , ] j um vn

m n

F u v f m n e

1 1

,2 2

u v

1/ 2 1/ 22 ( )

1/ 2 1/ 2

[ , ] ( , ) j um vnf m n F u v e dudv

■ Inverse Fourier Transform

Bahadir K. Gunturk EE 7730 - Image Analysis I 16

Fourier Transform: Properties■ Periodicity: Fourier Transform of a discrete signal is periodic with period 1.

2 ( ) ( )( , ) [ , ] j u k m v l n

m n

F u k v l f m n e

2 2 2[ , ] j um vn j km j ln

m n

f m n e e e

2 ( )[ , ] j um vn

m n

f m n e

1 1

( , )F u v

Arbitrary integers

Bahadir K. Gunturk EE 7730 - Image Analysis I 17

Fourier Transform: Properties■ Linearity, shifting, modulation, convolution, multiplication, separability, energy conservation properties also exist for the 2D Fourier Transform of discrete signals.

Bahadir K. Gunturk EE 7730 - Image Analysis I 18

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 n

f m n F u v dudv

Bahadir K. Gunturk EE 7730 - Image Analysis I 19

Fourier Transform: Properties■ Define Kronecker delta function

■ Fourier Transform of the Kronecker delta function

1, for 0 and 0[ , ]

0, otherwise

m nm n

2 2 0 0( , ) [ , ] 1j um vn j u v

m n

F u v m n e e

Bahadir K. Gunturk EE 7730 - Image Analysis I 20

Fourier Transform: Properties■ 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

Bahadir K. Gunturk EE 7730 - Image Analysis I 21

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

Bahadir K. Gunturk EE 7730 - Image Analysis I 22

Impulse Train

, [ , ] [ , ]M Nk l

comb m n m kM n lN

1, ,

k l k l

k lm kM n lN u v

MN 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:

Bahadir K. Gunturk EE 7730 - Image Analysis I 23

Impulse Train

2[ ]comb n

n u

1 12

1

2

1( )

2comb u

1

2

Bahadir K. Gunturk EE 7730 - Image Analysis I 24

Impulse Train

1, ,

k l k l

k lx kM y lN u v

MN 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:

Bahadir K. Gunturk EE 7730 - Image Analysis I 25

Impulse Train

2 ( )comb x

x u

1 12

1

2

1( )

2comb u

1

22

Bahadir K. Gunturk EE 7730 - Image Analysis I 26

Sampling

x

x

M

( )f x

( )Mcomb x

u

( )F u

u

1( )* ( )M

F u comb u

u1

M

1 ( )M

comb u

x

( ) ( )Mf x comb x

Bahadir K. Gunturk EE 7730 - Image Analysis I 27

Sampling

x

( )f x

u

( )F u

u

1( )* ( )M

F u comb u

x

( ) ( )Mf x comb x

WW

M

W

1

M1

2WM

No aliasing if

Bahadir K. Gunturk EE 7730 - Image Analysis I 28

Sampling

u

1( )* ( )M

F u comb u

x

( ) ( )Mf x comb x

M

W

1

M

If there is no aliasing, the original signal can be recovered from its samples by low-pass filtering.

1

2M

Bahadir K. Gunturk EE 7730 - Image Analysis I 29

Sampling

x

( )f x

u

( )F u

u

1( )* ( )M

F u comb u

( ) ( )Mf x comb x

WW

W

1

MAliased

Bahadir K. Gunturk EE 7730 - Image Analysis I 30

Sampling

x

( )f x

u

( )F u

u ( )* ( ) ( )Mf x h x comb x

WW

1M

Anti-aliasing filter

uWW

( )* ( )f x h x

1

2M

Bahadir K. Gunturk EE 7730 - Image Analysis I 31

Sampling

u ( )* ( ) ( )Mf x h x comb x

1

M

u( ) ( )Mf x comb x

W

1

M

■ Without anti-aliasing filter:

■ With anti-aliasing filter:

Bahadir K. Gunturk EE 7730 - Image Analysis I 32

Anti-Aliasing

a=imread(‘barbara.tif’);

Bahadir K. Gunturk EE 7730 - Image Analysis I 33

Anti-Aliasing

a=imread(‘barbara.tif’);b=imresize(a,0.25);c=imresize(b,4);

Bahadir K. Gunturk EE 7730 - Image Analysis I 34

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

Bahadir K. Gunturk EE 7730 - Image Analysis I 35

Sampling

x

y

u

v

uW

vW

x

y

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

M

N

, ( , )M Ncomb x y

u

v

1

M

1

N

1 1,

( , )M N

comb u v

Bahadir K. Gunturk EE 7730 - Image Analysis I 36

Sampling

u

v

uW

vW

,( , ) ( , )M Nf x y comb x y

1

M

1

N

12 uW

MNo aliasing if and

12 vW

N

Bahadir K. Gunturk EE 7730 - Image Analysis I 37

Interpolation

u

v

1

M

1

N

1 1, for and v

( , ) 2 20, otherwise

MN uH u v M N

1

2N

1

2M

Ideal reconstruction filter:

Bahadir K. Gunturk EE 7730 - Image Analysis I 38

Ideal Reconstruction Filter

1 1

2 22 ( ) 2 ( )

1 1

2 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 1

2 2

1 11 12 22 2

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

2jx jxx e e

j

top related