image filtering in the frequency domain · image filtering in the frequency domain. ... spatial...

71
Filip Malmberg – 1TD396 – fall 2019 – [email protected] Image filtering in the frequency domain

Upload: others

Post on 31-May-2020

77 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Image filtering in the frequency domain

Page 2: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Summary of previous lecture● Virtually all filtering is a local neighbourhood operation● Convolution = linear and shift-invariant filters

– e.g. mean filter, Gaussian weighted filter– kernel can sometimes be decomposed

● Many non-linear filters exist also– e.g. median filter, bilateral filter

Page 3: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Linear neighbourhood operation● For each pixel, multiply the values in its neighbour-

hood with the corresponding weights, then sum.

0 5 4 6 5 2 3

7 5 2 4 2 1 5

4 6 8 7 4 5 6

2 3 1 5 7 8 5

0 2 2 4 6 7 6

0 0 1 3 6 5 3

0 0 2 5 3 5 8

1.9 2.6 2.9 2.6 2.2 2.0 1.2

3.0 4.6 5.2 4.7 4.0 3.7 2.4

3.0 4.2 4.6 . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

1/9 1/9 1/9

1/9 1/9 1/9

1/9 1/9 1/9

Page 4: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Convolution properties● Linear:

– Scaling invariant:

– Distributive:

● Time Invariant:

● Commutative:

● Associative: f ⊗ h1⊗h2 = f⊗h1 ⊗ h2

shift f ⊗ h = shift f⊗h

f⊗h = h⊗f

fg ⊗ h = f⊗h g⊗h

C f ⊗ h = C f⊗h

(= shift invariant)

Page 5: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Convolution properties● Convolving a function with a unit impulse yields a copy

of the function at the location of the impulse.● Convolving a function with a series of unit impulses

“adds” a copy of the function at each impulse.

Page 6: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Today’s lecture

● The Fourier transform– The Discrete Fourier transform (DFT)– The Fourier transform in 2D– The Fast Fourier Transform (FFT) algorithm

● Designing filters in the Fourier (frequency) domain– filtering out structured noise

● Sampling, aliasing, interpolation

Page 7: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Jean Baptiste Joseph Fourier● Born 21 March 1768, Auxerre

(Bourgogne region).● Died 16 May 1830, Paris.● Same age as Napoleon Bonaparte.● Permanent Secretary of the French

Academy of Sciences (1822-1830).● Foreign member of the Royal

Swedish Academy of Sciences (1830).

Page 8: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

The Fourier transform

=

+

+

+...

Page 9: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

The Fourier transform● Remarkably, all periodic functions satisfying

some mild mathematical conditions can be expressed as a weighted sum of sines and cosines of different frequencies.

● Even functions that are not periodic can be expressed as an integral of sines and cosines multiplied by a weighting function.

Page 10: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Complex numbers

x=a+ i b

x =∥x∥cos(∢x ) + i∥x∥sin(∢x ) =∥x∥ei∢x

ei φ=cosφ+ i sinφ(Euler’s formula)

x *=a− i b(complex conjugate)

i=√−1 ⇒ i⋅i=−1

x x *=a2+ b2=∥x∥2

a=∥x∥cos(∢x )

∢x=arctan(ba) b=∥x∥sin(∢x )

Page 11: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Fourier basis function

ω=2π f=2πT

T

eiω x= cos(ω x )+ i sin(ω x )

Page 12: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Fourier transform

F (ω) = ∫−∞

f (x ) e−iω x d x

=

+

+

+...

f (x )

F (ω1)eiω1 x

=

+

+

+...

F (ω2)eiω2 x

F (ω3)eiω3 x

Page 13: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Fourier transform

F (ω) = ∫−∞

f (x ) e−iω x d x

f (x )

F (ω1)eiω1 x

=

+

+

+...

F (ω2)eiω2 x

F (ω3)eiω3 x

complex valuecomplex function

complex function???

Page 14: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Fourier basis function

Thus: we need negative frequencies!

Aei ω x+A* e−i ω x is a real-valued function

At frequency ω we have weight A

F (−ω) = F *(ω)

For real-valued signals:

At frequency -ω we have weight A*

Page 15: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Inverse Fourier transform

f (x ) = 12π∫

−∞

F (ω) eiω x dω

F (ω) = ∫−∞

f (x ) e−iω x d x

normalizationno minus sign

Compare with the forward transform:

Page 16: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Notice thesymmetry!

impulse

cosine

sine

box

sinc

Gaussian

whitenoise

1

2 impulses

2 impulses

sinc

box

Gaussian

whitenoise

Fourier transform pairsS

patia

lF

req uen

cy

Page 17: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

phase change

Spatial scaling

Amplitude scaling

Addition

Translation

Linea rProperties of the Fourier transform

ℱ {f⊗h} = ℱ {f }⋅ℱ {h}Convolution

ℱ {f⋅h}= ℱ {f }⊗ℱ {h}

Page 18: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Sampling

spatial domain frequency domain

continuousfunction

samplingfunction

sampledfunction

ΔT 1/ΔT

Page 19: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

spatial domain frequency domain

Discrete Fourier transform

continuousfunction

sampledfunction

continuousimage

discreteimage

Page 20: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Discrete Fourier transform

F [k ] = ∑n=0

N−1

f [n] e−i 2

Nkn

k is the spatial frequency, k [ 0 , N-1 ]

ω = 2π k / N

ω [ 0 , 2π )

F (ω) = ∫−∞

f (x ) e−iω x d xContinuous FT:

Discrete FT:

Page 21: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Discrete Fourier transform

0 Nk

F [k ] = ∑n=0

N−1

f [n] e−i

2πN

kn

F[k] is defined on a limited domain (N samples), thesesamples are assumed to repeat periodically:

F[k] = F[k+N]

In the same way, f[n] is defined by N samples, assumedto repeat periodically:

f[n] = f[n+N]

Page 22: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Discrete Fourier transform

Why does the DFT onlyhas positive frequencies?

Page 23: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

What is the zero frequency?

Write out the value of F[0] for an input function f[n].What does it mean?

F [k ] = ∑n=0

N−1

f [n ] e−i

Nkn

Page 24: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Inverse DFT

F [k ] = ∑n=0

N−1

f [n ] e−i

Nkn

f [n] = 1N ∑

k=0

N−1

F [k ] ei 2

Nkn

normalizationno minus sign

Page 25: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Fourier transform in 2D, 3D, etc.● Simplest thing there is! — the FT is separable:

– Perform transform along x-axis,– Perform transform along y-axis of result,– Perform transform along z-axis of result, (etc.)

n

m

u

m

u

v

n m

F [u ,v ] = ∑m=0

M−1

∑n=0

N−1

f [n ,m] e−i 2un

N

vmM

= ∑m=0

M−1

∑n=0

N−1

f [n ,m] e−i

2N

un e−i

2M

vm

Page 26: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

2D Fourier transform pairs

sine

box

FT

Page 27: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

2D Fourier transform pairs

pillbox

Gauss

FT

Page 28: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

2D Fourier transform pairs

lines

dots

FT

Page 29: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

2D transform example 1

Page 30: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

2D transform example 1

Page 31: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

2D transform example 2

Page 32: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

2D transform example 2

Page 33: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

2D transform example 3

Page 34: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

2D transform example 3

Page 35: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

2D transform example 4

Page 36: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

2D transform example 4

Page 37: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

2D transform example 5

Page 38: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

2D transform example 5

Page 39: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

What is more important?

magnitude phaseJean Baptiste Joseph Fourier

Page 40: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

What is more important?

magnitude phase

Page 41: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Computing the DFT● For an image with N pixels, the DFT contains N

elements.● Each element of the DFT can be computed as a sum

of all N elements in the image.● A naive implementation of the DFT the requires O(N2)

time.● This is impractical!

Page 42: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

The Fast Fourier Transform (FFT)● Clever algorithm to compute the DFT.● Runs in O(N log N) time, rather than O(N2) time.● Because of symmetry of the forward and inverse

Fourier transforms, FFT can also compute the IDFT.

N = 2M

0 N-1M-1

N = 2n

F [k ] =F even [k ]+ F odd [k ]e−i

Nk

F [k+ M ] =F even [k ]−Fodd [k ]e−i

2πN

k

Page 43: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Convolution in the Fourier domain● The Convolution property of the Fourier transform:

● Thus we can calculate the convolution through:● F = FFT(f)● H = FFT(h)● G = FH● g = IFFT(G)

● Convolution is an operation of O(NM)● N image pixels, M kernel pixels

● Through the FFT it is an operation of O(N log N)● Efficient if M is large!

ℱ {f⊗h} = ℱ {f }⋅ℱ {h}

Page 44: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Low-pass filtering● Linear smoothing filters are all low-pass filters.

– Mean filter (uniform weights)– Gauss filter (Gaussian weights)

● Low-pass means low frequencies are not altered, high frequencies are attenuated

|F|

ω

Page 45: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

High-pass filtering● The opposite of low-pass filtering: low frequencies are

attenuated, high frequencies are not altered● The “unsharp mask” filter is a high-pass filter● The Laplace filter is a high-pass filter

ω

|F|

Page 46: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Band-pass filtering● You can choose any part of the frequency axis to

preserve (band-pass filter).● Or you can attenuate a specific set of frequencies

(band-stop filter).

ω

|F|

Page 47: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Example: low-pass filtering

input image f Fourier transform F

Page 48: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Example: frequency domain filtering

Fourier filter H filtered image gG = F H

Page 49: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Why the ringing?

Frequency domainSpatial domain

FT

Page 50: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

What is the solution?

Frequency domainSpatial domain

FT

Page 51: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Example: frequency domain filtering

Fourier filter H filtered image gG = F H

Page 52: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Structured noise

Page 53: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Structured noise

Page 54: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Filtering structured noise

Notch filter

Page 55: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Filtering structured noise

Notch filter, Gaussian

Page 56: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Filtering structured noise

Notch filter, Gaussian

Page 57: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Fourier analysis of sampling

F (ω) = ∫−∞

f (x ) e−iω x d x

f(x) F(ω)

smooth functionband limit(cutoff frequency)F(ω) = 0, ω > ω

c

ωc

Page 58: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Fourier analysis of sampling

spatial domain frequency domain

continuousfunction

samplingfunction

sampledfunction

Page 59: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Fourier analysis of interpolation

spatial domain frequency domain

sampledfunction

reconstructionfunction

continuousfunction

Page 60: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Aliasing

spatial domain frequency domain

continuousfunction

samplingfunction

sampledfunction

Page 61: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Aliasing

Sampling distance

Page 62: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Aliasing

Page 63: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Avoid aliasing

continuousfunction

samplingfunction

sampledfunction

frequency domain

ωc

ωs

F(ω) = 0, ω > ωc

ωs > 2ω

c

Minimum sampling frequencyNyquist frequency

Page 64: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Example: aliasing

Page 65: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Example: aliasing

Page 66: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Example: aliasing

When wedownsample,we only keepthis part!

Page 67: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Example: aliasing

The spectrum isreplicated, higherfrequencies beingduplicated aslower frequencies.

Page 68: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Example: Moire

Page 69: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Example: Moire

Page 70: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Summary of today’s lecture● The Fourier transform

– decomposes a function (image) into trigonometric basis functions (sines & cosines)

– is used to analyse frequency components– is computed independently for each dimension

● The DFT can be computed efficiently through the FFT algorithm

● Convolution can be studied through the FT– and filters can be designed in the Fourier domain–

● Aliasing can be understood through the FTℱ {f⊗h} = ℱ {f }⋅ℱ {h}

Page 71: Image filtering in the frequency domain · Image filtering in the frequency domain. ... spatial domain frequency domain continuous function sampling function sampled function ΔT

Filip Malmberg – 1TD396 – fall 2019 – [email protected]

Reading assignment● The Fourier transform and the DFT

– Sections 4.2, 4.4, 4.5, 4.6, 4.11.1

● Filtering in the Fourier domain– Sections 4.7, 4.8, 4.9, 4.10, 5.4

● Sampling and aliasing– Sections 4.3, 4.5.4

● The FFT– Section 4.11.3

● Exercises:– 4.14, 4.21, 4.22, 4.42, 4.43– 4.27, 4.29

(feel free to solve these in MATLAB)