spatial frequencies

26
Spatial Spatial Frequencie Frequencie s s

Upload: meara

Post on 25-Feb-2016

70 views

Category:

Documents


3 download

DESCRIPTION

Spatial Frequencies . Why are Spatial Frequencies important?. Efficient data representation Provides a means for modeling and removing noise Physical processes are often best described in “frequency domain” Provides a powerful means of image analysis. What is spatial frequency?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Spatial Frequencies

Spatial Spatial Frequencies Frequencies

Page 2: Spatial Frequencies

Why are Spatial Frequencies Why are Spatial Frequencies important?important?

• Efficient data representation

• Provides a means for modeling and removing noise

• Physical processes are often best described in “frequency domain”

• Provides a powerful means of image analysis

Page 3: Spatial Frequencies

What is spatial frequency?What is spatial frequency?

• Instead of describing a function (i.e., a shape) by a series of positions

• It is described by a series of cosines

Page 4: Spatial Frequencies

What is spatial frequency?What is spatial frequency?

A

g(x) = A cos(x)

2

x

g(x)

Page 5: Spatial Frequencies

What is spatial frequency?What is spatial frequency?

Period (L)Wavelength ()Frequency f=(1/ )

Amplitude (A)Magnitude (A)

A cos(x 2/L)g(x) = A cos(x 2/) A cos(x 2f)

x

g(x)

Page 6: Spatial Frequencies

What is spatial frequency?What is spatial frequency?

A

g(x) = A cos(x 2f)

x

g(x)

(1/f)(1/f)

period

Page 7: Spatial Frequencies

But what if cosine is shifted in phase?But what if cosine is shifted in phase?

g(x) = A cos(x 2f + )

x

g(x)

Page 8: Spatial Frequencies

What is spatial frequency?What is spatial frequency?

g(x) = A cos(x 2f + )

A=2 mf = 0.5 m-1

= 0.25 = 45g(x) = 2 cos(x 2(0.5) + 0.25) 2 cos(x + 0.25)

x g(x)0.00 2 cos(0.25) = 0.707106...0.25 2 cos(0.50) = 0.00.50 2 cos(0.75) = -0.707106...0.75 2 cos(1.00) = -1.01.00 2 cos(1.25) = -0.707106…1.25 2 cos(1.50) = 01.50 2 cos(1.75) = 0.707106...1.75 2 cos(2.00) = 1.02.00 2 cos(2.25) = 0.707106...

Let us take arbitrary g(x)

We substitute values of A, f and

We calculate discrete values of g(x) for various values of x

Page 9: Spatial Frequencies

What is spatial frequency?What is spatial frequency?

g(x) = A cos(x 2f + )

x

g(x) We calculate discrete values of g(x) for various values of x

Page 10: Spatial Frequencies

What is spatial frequency?What is spatial frequency?

12/

0

12/

0

/2cos)(Ni

iii

Ni

ii NixAxgxg

g(x) = A cos(x 2f + )

gi(x) = Ai cos(x 2i/N + i), i = 0,1,2,3,…,N/2-1

Page 11: Spatial Frequencies

We try to approximate a periodic We try to approximate a periodic function with standard trivial function with standard trivial (orthogonal, base) functions(orthogonal, base) functions

+

+=

Low frequency

Medium frequency

High frequency

Page 12: Spatial Frequencies

We add values from component We add values from component functions functions point by pointpoint by point

+

+=

Page 13: Spatial Frequencies

g(x)

i=1

i=2

i=3

i=4

i=5

i=63

0 127x

Example of periodic function created by summing standard trivial functions

Page 14: Spatial Frequencies

g(x)

i=1

i=2

i=3

i=4

i=5

i=10

0 127x

Example of periodic function created by summing standard trivial functions

Page 15: Spatial Frequencies

g(x)

g(x)

64 terms

10 terms

Example of periodic function created by summing standard trivial functions

Page 16: Spatial Frequencies

g(x)

i=1

i=2

i=3

i=4

i=5

i=630 127

x

Fourier Decomposition of a step function (64 terms)

Example of periodic function created by summing standard trivial functions

Page 17: Spatial Frequencies

g(x)

i=1

i=2

i=3

i=4

i=5

i=100 63

x

Fourier Decomposition of a step function (11 terms)

Example of periodic function created by summing standard trivial functions

Page 18: Spatial Frequencies

Main concept – summation of base Main concept – summation of base functionsfunctions

12/

0

/2cos)(Ni

iii NixAxg

Any function of x (any shape) that can be represented by g(x) can also be represented by the summation of cosine functions

Observe two numbers for every i

Page 19: Spatial Frequencies

Information is not lost when we Information is not lost when we change the domainchange the domain

gi(x) = 1.3, 2.1, 1.4, 5.7, …., i=0,1,2…N-1

N pieces of information

12/

0

/2cos)(Ni

iiii NixAxg

N pieces of informationN/2 amplitudes (Ai, i=0,1,…,N/2-1) andN/2 phases (i, i=0,1,…,N/2-1) and

SpatialSpatial Domain

Frequency Domain

Page 20: Spatial Frequencies

What is spatial frequency?What is spatial frequency?

gi(x)

Are equivalentThey contain the same amount of information

12/

0

/2cosNi

iii NixA and

The sequence of amplitudes squared is the SPECTRUM

Information is not lost when we Information is not lost when we change the domainchange the domain

Page 21: Spatial Frequencies

EXAMPLE

Page 22: Spatial Frequencies

A cos(x2i/N)frequency (f) = i/Nwavelength (p) = N/I

N=512i f p0 0 infinite1 1/512 51216 1/32 32256 1/2 2

Substitute values

Assuming N we get this table which relates frequency and wavelength of component functions

Page 23: Spatial Frequencies

More examples to give you some intuition….

Page 24: Spatial Frequencies

Fourier Transform NotationFourier Transform Notation• g(x) denotes an spatial domain function of real numbers

– (1.2, 0.0), (2.1, 0.0), (3.1,0.0), …

• G() denotes the Fourier transform

• G() is a symmetric complex function(-3.1,0.0), (4.1, -2.1), (-3.1, 2.1), …(1.2,0.0) …, (-3.1,-2.1), (4.1, 2.1), (-3.1,0.0)

• G[g(x)] = G(f) is the Fourier transform of g(x)

• G-1() denotes the inverse Fourier transform

• G-1(G(f)) = g(x)

Page 25: Spatial Frequencies

Power Spectrum and Phase SpectrumPower Spectrum and Phase Spectrum

• |G(f)|2 = G(f)G(f)* is the power spectrum of G(f)– (-3.1,0.0), (4.1, -2.1), (-3.1, 2.1), … (1.2,0.0),…, (-3.1,-2.1), (4.1, 2.1)– 9.61, 21.22, 14.02, …, 1.44,…, 14.02, 21.22

• tan-1[Im(G(f))/Re(G(f))] is the phase spectrum of G(f)– 0.0, -27.12, 145.89, …, 0.0, -145.89, 27.12

complex

Complex conjugate

Page 26: Spatial Frequencies

1-D DFT and IDFT1-D DFT and IDFT• Discrete Domains

– Discrete Time: k = 0, 1, 2, 3, …………, N-1– Discrete Frequency: n = 0, 1, 2, 3, …………, N-1

• Discrete Fourier Transform

• Inverse DFT

Equal time intervals

Equal frequency intervals

1N

0k

nkN2j

;e ]k[x]n[X

1N

0n

nkN2j

;e ]n[XN1]k[x

n = 0, 1, 2,….., N-1

k = 0, 1, 2,….., N-1