general functions a non-periodic function can be represented as a sum of sin’s and cos’s of...
Post on 20-Dec-2015
216 views
TRANSCRIPT
![Page 1: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/1.jpg)
General Functions
• A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies:
• F() is the spectrum of the function f(x)
deFxf xi)(
2
1)(
xixe xi sincos
![Page 2: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/2.jpg)
Fourier Transform
• F() is computed from f(x) by the Fourier Transform:
dxexfF xi )()(
![Page 3: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/3.jpg)
Example: Box Function
21 02
1 1)(
x
xxf
f
ff
fF
sinc2
sin
)(
![Page 4: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/4.jpg)
Box Function and Its Transform
![Page 5: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/5.jpg)
Cosine and Its Transform
-1.5
-1
-0.5
0
0.5
1
1.5
1-1
If f(x) is even, so is F()
![Page 6: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/6.jpg)
Sine and Its Transform
-1.5
-1
-0.5
0
0.5
1
1.5
1
-1
-
If f(x) is odd, so is F()
![Page 7: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/7.jpg)
Delta Function and Its Transform
Fourier transform and inverse Fourier transform arequalitatively the same, so knowing one direction gives you the other
![Page 8: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/8.jpg)
Shah Function and Its Transform
Moving the spikes closer together in the spatial domain moves them farther apart in the frequency domain!
![Page 9: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/9.jpg)
Gaussian and Its Transform
-0.02
0.03
0.08
0.13
0.18
-0.02
0.03
0.08
0.13
0.18
2
2
2
1 x
e
![Page 10: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/10.jpg)
• The spectrum of a functions tells us the relative amounts of high and low frequencies– Sharp edges give high frequencies
– Smooth variations give low frequencies
• A function is bandlimited if its spectrum has no frequencies above a maximum limit– sin, cos are bandlimited
– Box, Gaussian, etc are not
Qualitative Properties
![Page 11: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/11.jpg)
Functions to Images
• Images are 2D, discrete functions• 2D Fourier transform uses product of sin’s and
cos’s (things carry over naturally)• Fourier transform of a discrete, quantized function
will only contain discrete frequencies in quantized amounts
• Numerical algorithm: Fast Fourier Transform (FFT) computes discrete Fourier transforms
![Page 12: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/12.jpg)
2D Discrete Fourier Transform
![Page 13: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/13.jpg)
Filters
• A filter is something that attenuates or enhances particular frequencies
• Easiest to visualize in the frequency domain, where filtering is defined as multiplication:
• Here, F is the spectrum of the function, G is the spectrum of the filter, and H is the filtered function. Multiplication is point-wise
)()()( GFH
![Page 14: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/14.jpg)
Qualitative Filters
F G
=
=
=
H
Low-pass
High-pass
Band-pass
![Page 15: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/15.jpg)
Low-Pass Filtered Image
![Page 16: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/16.jpg)
High-Pass Filtered Image
![Page 17: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/17.jpg)
Filtering in the Spatial Domain
• Filtering the spatial domain is achieved by convolution
• Qualitatively: Slide the filter to each position, x, then sum up the function multiplied by the filter at that position
duuxgufgfxh )()()(
![Page 18: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/18.jpg)
Convolution Example
![Page 19: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/19.jpg)
Convolution Theorem
• Convolution in the spatial domain is the same as multiplication in the frequency domain– Take a function, f, and compute its Fourier transform, F– Take a filter, g, and compute its Fourier transform, G– Compute H=FG– Take the inverse Fourier transform of H, to get h– Then h=fg
• Multiplication in the spatial domain is the same as convolution in the frequency domain
![Page 20: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/20.jpg)
Sampling in Spatial Domain
• Sampling in the spatial domain is like multiplying by a spike function
![Page 21: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/21.jpg)
Sampling in Frequency Domain
• Sampling in the frequency domain is like convolving with a spike function
![Page 22: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/22.jpg)
Reconstruction in Frequency Domain
• To reconstruct, we must restore the original spectrum
• That can be done by multiplying by a square pulse
![Page 23: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/23.jpg)
Reconstruction in Spatial Domain
• Multiplying by a square pulse in the frequency domain is the same as convolving with a sinc function in the spatial domain
![Page 24: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/24.jpg)
Aliasing Due to Under-sampling
• If the sampling rate is too low, high frequencies get reconstructed as lower frequencies
• High frequencies from one copy get added to low frequencies from another
![Page 25: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/25.jpg)
Aliasing Implications
• There is a minimum frequency with which functions must be sampled – the Nyquist frequency– Twice the maximum frequency present in the signal
• Signals that are not bandlimited cannot be accurately sampled and reconstructed
• Not all sampling schemes allow reconstruction– eg: Sampling with a box
![Page 26: General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F( ) is the spectrum of the function](https://reader036.vdocuments.mx/reader036/viewer/2022062714/56649d445503460f94a21786/html5/thumbnails/26.jpg)
More Aliasing
• Poor reconstruction also results in aliasing• Consider a signal reconstructed with a box filter in
the spatial domain (which means using a sinc in the frequency domain):