computer vision
DESCRIPTION
Computer Vision. Spring 2012 15-385,-685 Instructor: S. Narasimhan Wean Hall 5409 T-R 10:30am – 11:50am. Frequency domain analysis and Fourier Transform Lecture #4. How to Represent Signals?. Option 1: Taylor series represents any function using polynomials. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/1.jpg)
Computer Vision
Spring 2012 15-385,-685
Instructor: S. Narasimhan
Wean Hall 5409
T-R 10:30am – 11:50am
![Page 2: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/2.jpg)
Frequency domain analysis and Fourier Transform
Lecture #4
![Page 3: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/3.jpg)
How to Represent Signals?
• Option 1: Taylor series represents any function using polynomials.
• Polynomials are not the best - unstable and not very physically meaningful.
• Easier to talk about “signals” in terms of its “frequencies”
(how fast/often signals change, etc).
![Page 4: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/4.jpg)
Jean Baptiste Joseph Fourier (1768-1830)
• Had crazy idea (1807):• Any periodic
function can be rewritten as a weighted sum of Sines and Cosines of different frequencies.
• Don’t believe it? – Neither did Lagrange,
Laplace, Poisson and other big wigs
– Not translated into English until 1878!
• But it’s true!– called Fourier Series– Possibly the greatest tool
used in Engineering
![Page 5: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/5.jpg)
A Sum of Sinusoids
• Our building block:
• Add enough of them to get any signal f(x) you want!
• How many degrees of freedom?
• What does each control?
• Which one encodes the coarse vs. fine structure of the signal?
xAsin(
![Page 6: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/6.jpg)
Fourier Transform
• We want to understand the frequency of our signal. So, let’s reparametrize the signal by instead of x:
xAsin(
f(x) F()Fourier Transform
F() f(x)Inverse Fourier Transform
• For every from 0 to inf, F() holds the amplitude A and phase of the corresponding sine
– How can F hold both? Complex number trick!
)()()( iIRF
22 )()( IRA )(
)(tan 1
R
I
![Page 7: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/7.jpg)
Time and Frequency
• example : g(t) = sin(2pi f t) + (1/3)sin(2pi (3f) t)
![Page 8: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/8.jpg)
Time and Frequency
= +
• example : g(t) = sin(2pi f t) + (1/3)sin(2pi (3f) t)
![Page 9: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/9.jpg)
Frequency Spectra
• example : g(t) = sin(2pi f t) + (1/3)sin(2pi (3f) t)
= +
![Page 10: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/10.jpg)
Frequency Spectra
• Usually, frequency is more interesting than the phase
![Page 11: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/11.jpg)
= +
=
Frequency Spectra
![Page 12: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/12.jpg)
= +
=
Frequency Spectra
![Page 13: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/13.jpg)
= +
=
Frequency Spectra
![Page 14: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/14.jpg)
= +
=
Frequency Spectra
![Page 15: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/15.jpg)
= +
=
Frequency Spectra
![Page 16: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/16.jpg)
= 1
1sin(2 )
k
A ktk
Frequency Spectra
![Page 17: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/17.jpg)
Frequency Spectra
![Page 18: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/18.jpg)
FT: Just a change of basis
.
.
.
* =
M * f(x) = F()
![Page 19: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/19.jpg)
IFT: Just a change of basis
.
.
.
* =
M-1 * F() = f(x)
![Page 20: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/20.jpg)
Fourier Transform – more formally
Arbitrary function Single Analytic Expression
Spatial Domain (x) Frequency Domain (u)
Represent the signal as an infinite weighted sum of an infinite number of sinusoids
dxexfuF uxi 2
(Frequency Spectrum F(u))
1sincos ikikeikNote:
Inverse Fourier Transform (IFT)
dxeuFxf uxi 2
![Page 21: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/21.jpg)
• Also, defined as:
dxexfuF iux
1sincos ikikeikNote:
• Inverse Fourier Transform (IFT)
dxeuFxf iux
21
Fourier Transform
![Page 22: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/22.jpg)
Fourier Transform Pairs (I)
angular frequency ( )iuxeNote that these are derived using
![Page 23: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/23.jpg)
angular frequency ( )iuxeNote that these are derived using
Fourier Transform Pairs (I)
![Page 24: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/24.jpg)
Fourier Transform and Convolution
hfg
dxexguG uxi 2
dxdexhf uxi 2
dxexhdef xuiui 22
'' '22 dxexhdef uxiui
Let
Then
uHuF
Convolution in spatial domain
Multiplication in frequency domain
![Page 25: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/25.jpg)
Fourier Transform and Convolution
hfg FHG fhg HFG
Spatial Domain (x) Frequency Domain (u)
So, we can find g(x) by Fourier transform
g f h
G F H
FT FTIFT
![Page 26: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/26.jpg)
Properties of Fourier Transform
Spatial Domain (x) Frequency Domain (u)
Linearity xgcxfc 21 uGcuFc 21
Scaling axf
a
uF
a
1
Shifting 0xxf uFe uxi 02
Symmetry xF uf
Conjugation xf uF
Convolution xgxf uGuF
Differentiation n
n
dx
xfd uFui n2
frequency ( )uxie 2Note that these are derived using
![Page 27: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/27.jpg)
Properties of Fourier Transform
![Page 28: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/28.jpg)
Example use: Smoothing/Blurring
• We want a smoothed function of f(x)
xhxfxg
H(u) attenuates high frequencies in F(u) (Low-pass Filter)!
• Then
222
2
1exp uuH
uHuFuG
2
1
u
uH
2
2
2
1exp
2
1
x
xh
• Let us use a Gaussian kernel
xh
x
![Page 29: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/29.jpg)
Does not look anything like what we have seen
Magnitude of the FT
Image Processing in the Fourier Domain
![Page 30: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/30.jpg)
Image Processing in the Fourier Domain
Does not look anything like what we have seen
Magnitude of the FT
![Page 31: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/31.jpg)
Convolution is Multiplication in Fourier Domain
*
f(x,y)
h(x,y)
g(x,y)
|F(sx,sy)|
|H(sx,sy)|
|G(sx,sy)|
![Page 32: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/32.jpg)
Low-pass Filtering
Let the low frequencies pass and eliminating the high frequencies.
Generates image with overall shading, but not much detail
![Page 33: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/33.jpg)
High-pass Filtering
Lets through the high frequencies (the detail), but eliminates the low frequencies (the overall shape). It acts like an edge enhancer.
![Page 34: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/34.jpg)
Boosting High Frequencies
![Page 35: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/35.jpg)
Most information at low frequencies!
![Page 36: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/36.jpg)
Fun with Fourier Spectra
![Page 37: Computer Vision](https://reader036.vdocuments.mx/reader036/viewer/2022062410/5681598b550346895dc6d02a/html5/thumbnails/37.jpg)
Next Class
• Image resampling and image pyramids
• Horn, Chapter 6