6.003 signal processing - 6.003 spring 2021

Post on 06-Feb-2022

6 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

6.003 Signal Processing

Week 10, Lecture A: 2D Signal Processing (I): 2D Fourier Representation

6.003 Fall 2020

Signals: Functions Used to Convey Informationβ€’ Signals may have 1 or 2 or 3 or even more independent variables.

A 1D signal has a one-dimensional domain. We usually think of it as time t or discrete time n.

A 2D signal has a two-dimensional domain. We usually think of the domains as x and y or 𝑛π‘₯ and 𝑛𝑦 (or r and c).

Signals: Continuous vs. Discrete

6.003 Fall 2020

Signals from physical systems are often of continuous domain:β€’ continuous time – measured in seconds, etcβ€’ continuous spatial coordinates – measured in meters, cm, etc

Computations usually manipulate functions of discrete domain: β€’ discrete time – measured in samplesβ€’ discrete spatial coordinates – measured in pixels

Sampling

6.003 Fall 2020

(nT)

0 T

Continuous β€œtime” (CT) versus discrete β€œtime” (DT)

Important for computational manipulation of physical data. β€’ digital representations of audio signals (as in MP3)β€’ digital representations of images (as in JPEG)

From Time to Space

6.003 Fall 2020

Turn now to development of β€œfrequency domain” representations in 2D.

So far, our signals have been a function of time: f(t), f[n]

Now, start to consider functions of space: f(x, y), f[r, c]

Our goal is still the same: β€’ Extract meaningful information from a signal, β€’ Manipulate information in a signal.We still resort to Fourier representations for these purposes.

Fourier RepresentationsFrom β€œContinuous Time” to β€œContinuous Space.”

1D Continuous-Time Fourier Transform

Synthesis equation

Analysis equation𝐹 πœ” = ΰΆ±βˆ’βˆž

∞

𝑓(𝑑) βˆ™ π‘’βˆ’π‘—πœ”π‘‘ 𝑑𝑑

𝑓 𝑑 =1

2πœ‹ΰΆ±βˆ’βˆž

∞

𝐹(πœ”) βˆ™ π‘’π‘—πœ”π‘‘ π‘‘πœ”

Two dimensional CTFT:

𝐹 πœ”π‘₯, πœ”π‘¦ = ΰΆ±βˆ’βˆž

∞

ΰΆ±βˆ’βˆž

∞

𝑓(π‘₯, 𝑦) βˆ™ π‘’βˆ’π‘—(πœ”π‘₯π‘₯+πœ”π‘¦π‘¦) 𝑑π‘₯𝑑𝑦

𝑓 π‘₯, 𝑦 =1

4πœ‹2ΰΆ±βˆ’βˆž

∞

ΰΆ±βˆ’βˆž

∞

𝐹 πœ”π‘₯, πœ”π‘¦ βˆ™ 𝑒𝑗(πœ”π‘₯π‘₯+πœ”π‘¦π‘¦) π‘‘πœ”π‘₯π‘‘πœ”π‘¦

π‘₯ and 𝑦 are continuous spatial variables (units: cm, m, etc.)

πœ”π‘₯ and πœ”π‘¦ are spatial frequencies

(units: radians / length)

β€’ integrals β†’ double integrals; β€’ sum of π‘₯ and 𝑦 exponents in kernal function.

Fourier RepresentationsFrom β€œDiscrete Time” to β€œDiscrete Space.”

1D Discrete-Time Fourier Transform

Synthesis equation

Analysis equation

Two dimensional DTFT:

𝐹 Ξ©π‘Ÿ , Ω𝑐 =

π‘Ÿ=βˆ’βˆž

∞

𝑐=βˆ’βˆž

∞

𝑓[π‘Ÿ, 𝑐] βˆ™ π‘’βˆ’π‘—(Ξ©π‘Ÿπ‘Ÿ+Ω𝑐𝑐)

𝑓[π‘Ÿ, 𝑐] =1

4πœ‹2ΰΆ±2πœ‹

ΰΆ±2πœ‹

𝐹 Ξ©π‘Ÿ , Ω𝑐 βˆ™ 𝑒𝑗(Ξ©π‘Ÿπ‘Ÿ+Ω𝑐𝑐) π‘‘Ξ©π‘Ÿπ‘‘Ξ©π‘

π‘Ÿ and 𝑐 are discrete spatial variables (units: pixels)

Ξ©π‘Ÿ and Ω𝑐 are spatial frequencies (units: radians / pixel)

β€’ sum β†’ double sums; integral β†’ double integrals; β€’ sum of π‘Ÿ and 𝑐 exponents in kernal function.

𝑓[𝑛] =1

2πœ‹ΰΆ±2πœ‹

𝑓(Ξ©) βˆ™ 𝑒𝑗Ω𝑛 𝑑Ω

𝐹 Ω =

𝑛=βˆ’βˆž

∞

𝑓[𝑛] βˆ™ π‘’βˆ’π‘—Ξ©π‘›

Fourier Representations1D DFT to 2D DFT

1D Discrete Fourier Transform

Synthesis equation

Analysis equation

Two dimensional DFT:

𝐹[π‘˜π‘Ÿ , π‘˜π‘] =1

𝑅𝐢

π‘Ÿ=0

π‘…βˆ’1

𝑐=0

πΆβˆ’1

𝑓[π‘Ÿ, 𝑐] βˆ™ π‘’βˆ’π‘—(2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ+

2πœ‹π‘˜π‘πΆ 𝑐)

𝑓[π‘Ÿ, 𝑐] =

π‘Ÿ=0

π‘…βˆ’1

𝑐=0

πΆβˆ’1

𝐹[π‘˜π‘Ÿ , π‘˜π‘] βˆ™ π‘’βˆ’π‘—(

2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ+

2πœ‹π‘˜π‘πΆ 𝑐)

π‘Ÿ and 𝑐 are discrete spatial variables (units: pixels)

π‘˜π‘Ÿ and π‘˜π‘ are integers representing frequencies

𝑓[𝑛] =

π‘˜=0

π‘βˆ’1

𝑓[𝑛] βˆ™ 𝑒𝑗2πœ‹π‘˜π‘ 𝑛

𝐹[π‘˜] =1

𝑁

𝑛=0

π‘βˆ’1

𝑓[𝑛] βˆ™ π‘’βˆ’π‘—2πœ‹π‘˜π‘ 𝑛

OrthogonalityDFT basis functions are orthogonal to each other in 1D and 2D.

1D DFT basis functions: πœ™π‘˜ 𝑛 = π‘’βˆ’π‘—2πœ‹π‘˜

𝑁𝑛

β€œInner product” of 1D basis functions:

𝑛=0

π‘βˆ’1

πœ™π‘˜βˆ— 𝑛 πœ™π‘™ 𝑛 =

𝑛=0

π‘βˆ’1

𝑒𝑗2πœ‹π‘˜π‘ 𝑛 βˆ™ π‘’βˆ’π‘—

2πœ‹π‘™π‘ 𝑛 =

𝑛=0

π‘βˆ’1

𝑒𝑗2πœ‹(π‘˜βˆ’π‘™)

𝑁 𝑛 = α‰Šπ‘ 𝑖𝑓 π‘˜ = 𝑙0 π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

2D DFT basis functions: πœ™π‘˜π‘Ÿ,π‘˜π‘ π‘Ÿ, 𝑐 = π‘’βˆ’π‘—2πœ‹π‘˜π‘Ÿπ‘…

π‘Ÿ π‘’βˆ’π‘—2πœ‹π‘˜π‘πΆ

𝑐

β€œInner product” of 2D basis functions:

π‘Ÿ=0

π‘…βˆ’1

𝑐=0

πΆβˆ’1

πœ™π‘˜π‘Ÿ,π‘˜π‘βˆ— [π‘Ÿ, 𝑐]πœ™π‘™π‘Ÿ,𝑙𝑐 π‘Ÿ, 𝑐 =

π‘Ÿ=0

π‘…βˆ’1

𝑐=0

πΆβˆ’1

(𝑒𝑗2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿβˆ™ 𝑒𝑗

2πœ‹π‘˜π‘πΆ 𝑐) βˆ™ (π‘’βˆ’π‘—

2πœ‹π‘™π‘Ÿπ‘… π‘Ÿβˆ™ π‘’βˆ’π‘—

2πœ‹π‘™π‘πΆ 𝑐)

=

π‘Ÿ=0

π‘…βˆ’1

𝑒𝑗2πœ‹(π‘˜π‘Ÿβˆ’π‘™π‘Ÿ)

𝑅 π‘Ÿ

𝑐=0

πΆβˆ’1

𝑒𝑗2πœ‹(π‘˜π‘βˆ’π‘™π‘)

𝐢 𝑐= α‰Š

𝑅𝐢 π‘–π‘“π‘˜π‘Ÿ = π‘™π‘Ÿ π‘Žπ‘›π‘‘ π‘˜π‘ = 𝑙𝑐0 π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

(0 ≀ π‘˜, 𝑙 < 𝑁)

(0 ≀ π‘˜π‘Ÿ, π‘™π‘Ÿ < 𝑅, 0 ≀ π‘˜π‘, 𝑙𝑐 < 𝐢)

See slide #9 of Lec 3B.

Python Representation of 2D ImagesCalculating DFTs is most efficient in NumPy (Numerical Python).

β€’ NumPy arrays are homogeneous: their elements are of the same type.

β€’ NumPy operators (+, -, abs, .real, .imag) combine elements to create new arrays. e.g., (f+g)[n] is f[n]+g[n].

β€’ 2D NumPy arrays can be indexed by tuples: e.g., f[r,c] = f[r][c].

β€’ 2D NumPy arrays support negative indices as in lists: e.g., a[-1] = a[len(a)-1]

β€’ 2D indices address row then column:

NumPy indexing is consistent with linear algebra (row first then column with rows increasing downward and columns increasing to the right). But it differs from physical mathematics (x then y with x increasing to the right and y increasing upward). You may do calculations either way, but be mindful of this difference.

Python Representation of 2D ImagesWe provide methods in the lib6003.image module for saving/loading PNG images:

β€’ png_read(filename) loads an image from a file into a NumPy arrayβ€’ png_write(array, filename) saves image data to a file β€’ show_image(array) displays an image

arrays are indexed in row, column order, and the values are brightness, usually in the range [0, 1]

We also provide functions for computing 2D DFTs in the lib6003.fft module: fft2 and ifft2In the frequency domain, index 0, 0 into a Numpy array corresponds to π‘˜π‘Ÿ = 0, π‘˜π‘ = 0 (the DC component).

Example: Make a white square on a black background.

π‘Ÿ

𝑐

Check yourself!The 2D DFT basis functions have the form πœ™π‘˜π‘Ÿ,π‘˜π‘ π‘Ÿ, 𝑐 = π‘’βˆ’π‘—

2πœ‹π‘˜π‘Ÿπ‘…

π‘Ÿ π‘’βˆ’π‘—2πœ‹π‘˜π‘πΆ

𝑐

π‘Ÿ

𝑐 0,0 is at top left corner, black correspond to lowest value, white correspond to highest value.

Check yourself!The 2D DFT basis functions have the form:

πœ™π‘˜π‘Ÿ,π‘˜π‘ π‘Ÿ, 𝑐 = π‘’βˆ’π‘—2πœ‹π‘˜π‘Ÿπ‘…

π‘Ÿ π‘’βˆ’π‘—2πœ‹π‘˜π‘πΆ

𝑐

= π‘π‘œπ‘ 2πœ‹π‘˜π‘Ÿπ‘…

π‘Ÿ +2πœ‹π‘˜π‘πΆ

𝑐 βˆ’ 𝑗𝑠𝑖𝑛2πœ‹π‘˜π‘Ÿπ‘…

π‘Ÿ +2πœ‹π‘˜π‘πΆ

𝑐

If 2πœ‹π‘˜π‘Ÿ

π‘…π‘Ÿ +

2πœ‹π‘˜π‘

𝐢𝑐 is constant, the real and imaginary parts will be constant.

Example: Let π‘˜π‘Ÿ =3 and π‘˜π‘ = βˆ’ 4 when 𝑅 = 𝐢 = 128.

Then the exponent is 2πœ‹3

128π‘Ÿ βˆ’

2πœ‹4

128𝑐 . This exponent is zero if 3 π‘Ÿ = 4 𝑐.

If the exponent is zero, then cosine is at its peak value of 1.

Thus the real part of the 2D basis function is 1 along the line π‘Ÿ =4

3𝑐.

Therefore the real part of the 2D basis function will be 1 along the lines π‘Ÿ = βˆ’π‘˜π‘

π‘˜π‘Ÿπ‘.

Check yourself!The 2D DFT basis functions have the form πœ™π‘˜π‘Ÿ,π‘˜π‘ π‘Ÿ, 𝑐 = π‘’βˆ’π‘—

2πœ‹π‘˜π‘Ÿπ‘…

π‘Ÿ π‘’βˆ’π‘—2πœ‹π‘˜π‘πΆ

𝑐

π‘Ÿ

𝑐

𝑅𝑒(πœ™π‘˜π‘Ÿ,π‘˜π‘ π‘Ÿ, 𝑐 ) = π‘π‘œπ‘ 2πœ‹π‘˜π‘Ÿπ‘…

π‘Ÿ +2πœ‹π‘˜π‘πΆ

𝑐

0,0 is at top left corner, black correspond to lowest value, white correspond to highest value.

Fourier Transform Pairs

In 1D, we found that it was useful to know how the transforms of simple shapes looked (for example delta β†’ constant), in part because it was often possible to use that understanding to simplify thinking about bigger problems.

The same will be true in 2D!

The rest of today: 2D Fourier analysis of simple shapes.

2D Discrete Fourier TransformExample: Find the DFT of a 2D unit sample:

𝑓 π‘Ÿ, 𝑐 = 𝛿 π‘Ÿ 𝛿 𝑐 = α‰Š1, π‘Ÿ = 0 π‘Žπ‘›π‘‘ 𝑐 = 00, π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

𝐹[π‘˜π‘Ÿ , π‘˜π‘] =1

𝑅𝐢

π‘Ÿ=0

π‘…βˆ’1

𝑐=0

πΆβˆ’1

𝛿 π‘Ÿ 𝛿 𝑐 βˆ™ π‘’βˆ’π‘—(2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ+

2πœ‹π‘˜π‘πΆ 𝑐)

=1

π‘…πΆπ‘’βˆ’π‘—(

2πœ‹π‘˜π‘Ÿπ‘… 0+

2πœ‹π‘˜π‘πΆ 0)

=1

𝑅𝐢

𝛿 π‘Ÿ 𝛿 𝑐𝐷𝐹𝑇 1

𝑅𝐢

𝑓 𝑛 = 𝛿 𝑛 = α‰Š1, 𝑛 = 00, π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

Ξ΄[n]

0

𝐹 π‘˜ =1

𝑁

𝑛=0

π‘βˆ’1

𝛿[𝑛] βˆ™ π‘’βˆ’π‘—2πœ‹π‘˜π‘

𝑛 =1

𝑁

1D unit sample

2D Discrete Fourier TransformGenerally, implement a 2D DFT as a sequence of 1D DFTs:

Alternatively, we can start with columns and then do rows just as well.

𝐹[π‘˜π‘Ÿ , π‘˜π‘] =1

𝑅𝐢

π‘Ÿ=0

π‘…βˆ’1

𝑐=0

πΆβˆ’1

𝑓 π‘Ÿ, 𝑐 βˆ™ π‘’βˆ’π‘—(2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ+

2πœ‹π‘˜π‘πΆ 𝑐)

=1

𝑅

π‘Ÿ=0

π‘…βˆ’11

𝐢

𝑐=0

πΆβˆ’1

𝑓 π‘Ÿ, 𝑐 βˆ™ π‘’βˆ’π‘—2πœ‹π‘˜π‘πΆ 𝑐 βˆ™ π‘’βˆ’π‘—

2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ

first, obtain the DFT for each row

then, take the DFT of each resulting columns

2D Discrete Fourier TransformExample: Find the DFT of a 2D unit sample:

2D Discrete Fourier TransformExample: Find the DFT of a 2D unit sample:

2D Discrete Fourier TransformExample: Find the DFT of a 2D unit sample:

2D Discrete Fourier TransformExample: Find the DFT of a 2D unit sample:

2D Discrete Fourier TransformExample: Find the DFT of a 2D unit sample:

2D Discrete Fourier TransformExample: Find the DFT of a 2D unit sample:

2D Discrete Fourier TransformExample: Find the DFT of a 2D unit sample:

2D Discrete Fourier TransformExample: Find the DFT of a 2D unit sample:

2D Discrete Fourier TransformExample: Find the DFT of a 2D unit sample:

2D Discrete Fourier TransformExample: Find the DFT of a 2D constant.

𝑓 π‘Ÿ, 𝑐 = 1

=1

𝑅𝐢

π‘Ÿ=0

π‘…βˆ’1

π‘’βˆ’π‘—2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ

𝑐=0

πΆβˆ’1

π‘’βˆ’π‘—2πœ‹π‘˜π‘πΆ 𝑐

= 𝛿[π‘˜π‘]𝛿[π‘˜π‘Ÿ]

1𝐷𝐹𝑇

𝛿[π‘˜π‘Ÿ]𝛿[π‘˜π‘]

𝑐=0

πΆβˆ’1

π‘’βˆ’π‘—2πœ‹π‘˜π‘πΆ 𝑐 = α‰Š

𝐢, π‘˜π‘= 00, π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

And we know:

𝐹[π‘˜π‘Ÿ , π‘˜π‘] =1

𝑅𝐢

π‘Ÿ=0

π‘…βˆ’1

𝑐=0

πΆβˆ’1

1 βˆ™ π‘’βˆ’π‘—(2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ+

2πœ‹π‘˜π‘πΆ 𝑐)

𝐹[π‘˜π‘Ÿ , π‘˜π‘] =1

π‘…πΆβˆ™ 𝑅 βˆ™ 𝛿[π‘˜π‘Ÿ] βˆ™ 𝐢 βˆ™ 𝛿[π‘˜π‘]

π‘Ÿ=0

π‘…βˆ’1

π‘’βˆ’π‘—2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ = α‰Š

𝑅, π‘˜π‘Ÿ= 00, π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

𝑓 𝑛 = 1

𝐹 π‘˜ =1

𝑁

𝑛=0

π‘βˆ’1

𝑓[𝑛] βˆ™ π‘’βˆ’π‘—2πœ‹π‘˜π‘ 𝑛

=1

𝑁

𝑛=0

π‘βˆ’1

π‘’βˆ’π‘—2πœ‹π‘˜π‘ 𝑛

= α‰Š1, π‘˜ = 00, π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

= 𝛿[π‘˜]

1D constant

2D Discrete Fourier TransformExample: Find the DFT of a constant.

2D Discrete Fourier TransformExample: Find the DFT of a constant.

2D Discrete Fourier TransformExample: Find the DFT of a constant.

2D Discrete Fourier TransformExample: Find the DFT of a constant.

2D Discrete Fourier TransformExample: Find the DFT of a constant.

2D Discrete Fourier TransformExample: Find the DFT of a constant.

2D Discrete Fourier TransformExample: Find the DFT of a constant.

2D Discrete Fourier TransformExample: Find the DFT of a constant.

2D Discrete Fourier TransformExample: Find the DFT of a vertical line.

𝑓 π‘Ÿ, 𝑐 = 𝛿 𝑐 = α‰Š1, 𝑐 = 00, π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

=1

𝑅𝐢

π‘Ÿ=0

π‘…βˆ’1

π‘’βˆ’π‘—(2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ+

2πœ‹π‘˜π‘πΆ 0)

=1

𝐢𝛿[π‘˜π‘Ÿ]

𝛿 𝑐𝐷𝐹𝑇 1

𝐢𝛿[π‘˜π‘Ÿ]

=1

𝑅𝐢

π‘Ÿ=0

π‘…βˆ’1

π‘’βˆ’π‘—(2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ)

= α‰Šπ‘…, π‘˜π‘Ÿ= 00, π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

π‘Ÿ=0

π‘…βˆ’1

π‘’βˆ’π‘—2πœ‹π‘˜π‘Ÿπ‘…

π‘ŸAnd:

𝐹[π‘˜π‘Ÿ , π‘˜π‘] =1

𝑅𝐢

π‘Ÿ=0

π‘…βˆ’1

𝑐=0

πΆβˆ’1

𝛿 𝑐 βˆ™ π‘’βˆ’π‘—(2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ+

2πœ‹π‘˜π‘πΆ 𝑐)

𝐹[π‘˜π‘Ÿ , π‘˜π‘] =1

π‘…πΆβˆ™ 𝑅 βˆ™ 𝛿[π‘˜π‘Ÿ]

2D Discrete Fourier TransformExample: Find the DFT of a vertical line:

2D Discrete Fourier TransformExample: Find the DFT of a vertical line:

2D Discrete Fourier TransformExample: Find the DFT of a vertical line:

2D Discrete Fourier TransformExample: Find the DFT of a vertical line:

2D Discrete Fourier TransformExample: Find the DFT of a vertical line:

2D Discrete Fourier TransformExample: Find the DFT of a vertical line:

2D Discrete Fourier TransformExample: Find the DFT of a horizontal line:

𝑓 π‘Ÿ, 𝑐 = 𝛿 π‘Ÿ = α‰Š1, π‘Ÿ = 00, π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

=1

𝑅𝐢

𝑐=0

πΆβˆ’1

π‘’βˆ’π‘—(2πœ‹π‘˜π‘Ÿπ‘… 0+

2πœ‹π‘˜π‘πΆ 𝑐)

=1

𝑅𝛿[π‘˜π‘]

𝛿 π‘Ÿπ·πΉπ‘‡ 1

𝑅𝛿[π‘˜π‘]

=1

𝑅𝐢

𝑐=0

πΆβˆ’1

π‘’βˆ’π‘—(2πœ‹π‘˜π‘πΆ 𝑐)

= α‰ŠπΆ, π‘˜π‘= 00, π‘œπ‘‘β„Žπ‘’π‘Ÿπ‘€π‘–π‘ π‘’

𝑐=0

πΆβˆ’1

π‘’βˆ’π‘—2πœ‹π‘˜π‘πΆ

𝑐Since:

𝐹[π‘˜π‘Ÿ , π‘˜π‘] =1

𝑅𝐢

π‘Ÿ=0

π‘…βˆ’1

𝑐=0

πΆβˆ’1

𝛿 π‘Ÿ βˆ™ π‘’βˆ’π‘—(2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ+

2πœ‹π‘˜π‘πΆ 𝑐)

𝐹[π‘˜π‘Ÿ , π‘˜π‘] =1

π‘…πΆβˆ™ 𝐢 βˆ™ 𝛿[π‘˜π‘]

2D Discrete Fourier TransformExample: Find the DFT of a horizontal line:

2D Discrete Fourier TransformExample: Find the DFT of a horizontal line:

2D Discrete Fourier TransformExample: Find the DFT of a horizontal line:

2D Discrete Fourier TransformExample: Find the DFT of a horizontal line:

2D Discrete Fourier TransformExample: Find the DFT of a horizontal line:

2D Discrete Fourier TransformExample: Find the DFT of a horizontal line:

2D Discrete Fourier TransformExample: Find the DFT of a horizontal line:

2D Discrete Fourier TransformExample: Find the DFT of a horizontal line:

2D Discrete Fourier TransformExample: Find the DFT of a horizontal line:

2D Discrete Fourier TransformExample: Find the DFT of a horizontal line:

2D Discrete Fourier TransformExample: Find the DFT of a horizontal line:

Circularly Translating/Shifting an ImageEffect of image translation/shifting on its Fourier transform.

Let: π‘™π‘Ÿ = π‘Ÿ βˆ’ π‘Ÿ0 π‘šπ‘œπ‘‘ 𝑅, 𝑙𝑐 = 𝑐 βˆ’ 𝑐0 π‘šπ‘œπ‘‘ 𝐢. Then:

𝐹1[π‘˜π‘Ÿ , π‘˜π‘] =1

𝑅𝐢

π‘Ÿ=0

π‘…βˆ’1

𝑐=0

πΆβˆ’1

𝑓1 π‘Ÿ, 𝑐 βˆ™ π‘’βˆ’π‘—(2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ+

2πœ‹π‘˜π‘πΆ 𝑐)

= π‘’βˆ’π‘—2πœ‹π‘˜π‘Ÿπ‘…

π‘Ÿ0 βˆ™ π‘’βˆ’π‘—2πœ‹π‘˜π‘πΆ

𝑐0 βˆ™ 𝐹0[π‘˜π‘Ÿ , π‘˜π‘]

𝑓0 π‘Ÿ, 𝑐𝐷𝐹𝑇

𝐹0[π‘˜π‘Ÿ , π‘˜π‘]Assume that

Find the 2D DFT of 𝑓1 π‘Ÿ, 𝑐 = 𝑓0 π‘Ÿ βˆ’ π‘Ÿ0 π‘šπ‘œπ‘‘ 𝑅, 𝑐 βˆ’ 𝑐0 π‘šπ‘œπ‘‘ 𝐢

=1

𝑅𝐢

π‘Ÿ=0

π‘…βˆ’1

𝑐=0

πΆβˆ’1

𝑓0 π‘Ÿ βˆ’ π‘Ÿ0 π‘šπ‘œπ‘‘ 𝑅, 𝑐 βˆ’ 𝑐0 π‘šπ‘œπ‘‘ 𝐢 βˆ™ π‘’βˆ’π‘—(2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ+

2πœ‹π‘˜π‘πΆ 𝑐)

𝐹1[π‘˜π‘Ÿ , π‘˜π‘] =1

𝑅𝐢

π‘™π‘Ÿ=0

π‘…βˆ’1

𝑙𝑐=0

πΆβˆ’1

𝑓0 π‘™π‘Ÿ , 𝑙𝑐 βˆ™ π‘’βˆ’π‘—(2πœ‹π‘˜π‘Ÿπ‘… (π‘™π‘Ÿ+π‘Ÿ0 π‘šπ‘œπ‘‘ 𝑅)+

2πœ‹π‘˜π‘πΆ ( 𝑙𝑐+𝑐0 π‘šπ‘œπ‘‘ 𝐢)

Circularly translating an image adds linear phase to its transform.

= π‘’βˆ’π‘—2πœ‹π‘˜π‘Ÿπ‘… π‘Ÿ0βˆ™ π‘’βˆ’π‘—

2πœ‹π‘˜π‘πΆ 𝑐0

1

𝑅𝐢

π‘™π‘Ÿ=0

π‘…βˆ’1

𝑙𝑐=0

πΆβˆ’1

𝑓0 π‘™π‘Ÿ, 𝑙𝑐 βˆ™ π‘’βˆ’π‘—(2πœ‹π‘˜π‘Ÿπ‘… π‘™π‘Ÿ+

2πœ‹π‘˜π‘πΆ 𝑙𝑐)

2D Discrete Fourier TransformExample: Find the DFT of a 2D unit sample: 𝑓 π‘Ÿ, 𝑐 = 𝛿 π‘Ÿ 𝛿 𝑐

𝐷𝐹𝑇𝐹[π‘˜π‘Ÿ, π‘˜π‘] =

1

𝑅𝐢

2D Discrete Fourier TransformExample: Find the DFT of a shifted 2D unit sample. 𝑓 π‘Ÿ, 𝑐 = 𝛿 π‘Ÿ 𝛿 𝑐 βˆ’ 1

𝐷𝐹𝑇𝐹[π‘˜π‘Ÿ, π‘˜π‘] = π‘’βˆ’π‘—

2πœ‹π‘˜π‘πΆ

βˆ™1 1

𝑅𝐢

π‘˜π‘βˆ’πœ‹

πœ‹

2D Discrete Fourier TransformExample: Find the DFT of a shifted 2D unit sample. 𝑓 π‘Ÿ, 𝑐 = 𝛿 π‘Ÿ 𝛿 𝑐 βˆ’ 2

𝐷𝐹𝑇𝐹[π‘˜π‘Ÿ, π‘˜π‘] = π‘’βˆ’π‘—

2πœ‹π‘˜π‘πΆ

βˆ™2 1

𝑅𝐢

π‘˜π‘βˆ’πœ‹

πœ‹

2D Discrete Fourier TransformExample: Find the DFT of a shifted 2D unit sample. 𝑓 π‘Ÿ, 𝑐 = 𝛿 π‘Ÿ 𝛿 𝑐 βˆ’ 3

𝐷𝐹𝑇𝐹[π‘˜π‘Ÿ, π‘˜π‘] = π‘’βˆ’π‘—

2πœ‹π‘˜π‘πΆ

βˆ™3 1

𝑅𝐢

π‘˜π‘βˆ’πœ‹

πœ‹

2D Discrete Fourier TransformExample: Find the DFT of a 2D unit sample: 𝑓 π‘Ÿ, 𝑐 = 𝛿 π‘Ÿ 𝛿 𝑐

𝐷𝐹𝑇𝐹[π‘˜π‘Ÿ, π‘˜π‘] =

1

𝑅𝐢

2D Discrete Fourier TransformExample: Find the DFT of a shifted2D unit sample: 𝑓 π‘Ÿ, 𝑐 = 𝛿 π‘Ÿ + 1 𝛿 𝑐

𝐷𝐹𝑇𝐹[π‘˜π‘Ÿ, π‘˜π‘] = π‘’βˆ’π‘—

2πœ‹π‘˜π‘Ÿπ‘…

βˆ™(βˆ’1) 1

𝑅𝐢

π‘˜π‘Ÿβˆ’πœ‹

πœ‹

2D Discrete Fourier TransformExample: Find the DFT of a shifted 2D unit sample: 𝑓 π‘Ÿ, 𝑐 = 𝛿 π‘Ÿ + 2 𝛿 𝑐

𝐷𝐹𝑇𝐹[π‘˜π‘Ÿ, π‘˜π‘] = π‘’βˆ’π‘—

2πœ‹π‘˜π‘Ÿπ‘… βˆ™(βˆ’2) 1

𝑅𝐢

π‘˜π‘Ÿβˆ’πœ‹

πœ‹

2D Discrete Fourier TransformExample: Find the DFT of a shifted 2D unit sample: 𝑓 π‘Ÿ, 𝑐 = 𝛿 π‘Ÿ + 3 𝛿 𝑐

𝐷𝐹𝑇𝐹[π‘˜π‘Ÿ, π‘˜π‘] = π‘’βˆ’π‘—

2πœ‹π‘˜π‘Ÿπ‘…

βˆ™(βˆ’3) 1

𝑅𝐢

π‘˜π‘Ÿβˆ’πœ‹

πœ‹

Summary

6.003 Fall 2020

Introduced 2D signal processing: β€’ Mostly simple extensions of 1D ideas β€’ Some small differences

Introduced 2D Fourier representations: β€’ Fourier kernal comprises the sum of an π‘₯ part and a 𝑦 part (or π‘Ÿ, 𝑐)β€’ Basis functions look like sinusoids turned at angles determined by the ratio of π‘˜π‘ to π‘˜π‘Ÿ.

Multiple 2D Fourier Transform pairs: β€’ 2D unit sample => 2D constantβ€’ 2D constant => 2D unit sampleβ€’ vertical line => horizontal lineβ€’ horizontal line => vertical line

(Circularly) translating an image does not change the magnitude but adds linear phase to its transform.

top related