Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSCE 643 Computer Vision: Thinking in Frequency

Similar presentations


Presentation on theme: "CSCE 643 Computer Vision: Thinking in Frequency"— Presentation transcript:

1 CSCE 643 Computer Vision: Thinking in Frequency
Jinxiang Chai

2 Image Scaling This image is too big to fit on the screen. How
can we reduce it? How to generate a half- sized version?

3 Image Sub-sampling 1/8 1/4 Throw away every other row and column to create a 1/2 size image - called image sub-sampling

4 Image Sub-sampling 1/2 1/4 (2x zoom) 1/8 (4x zoom)
Why does this look so crufty?

5 Difference between Lines

6 Even Worse for Synthetic Images

7 Really Bad in Video Click here

8 Aliasing occurs when your sampling rate is not high enough to capture the amount of detail in your image Can give you the wrong signal/image—an alias Where can it happen in computer graphics and vision? During image synthesis: sampling continuous signal into discrete signal e.g., ray tracing, line drawing, function plotting, etc. During image processing: resampling discrete signal at a different rate e.g. Image warping, zooming in, zooming out, etc. To do sampling right, need to understand the structure of your signal/image– signal processing

9 Signal Processing Analysis, interpretation, and manipulation of signals - images and videos - sampling and reconstruction of the signals. - minimal sampling rate for avoiding aliasing artifacts - how to use filtering to remove the aliasing artifacts?

10 Periodic Functions A periodic function is a function defined in an interval that repeats itself outside the interval

11 Jean Baptiste Fourier (1768-1830)
had crazy idea (1807): Any periodic function can be rewritten as a weighted sum of sines and cosines of different frequencies. But it’s true! called Fourier Series

12 A Sum of Sine Waves Our building block:
Add enough of them to get any signal f(x) you want!

13 A Sum of Sine Waves Our building block:
Add enough of them to get any signal f(x) you want!

14 A Sum of Sine Waves Our building block:
Add enough of them to get any signal f(x) you want!

15 A Sum of Sine Waves Our building block:
Add enough of them to get any signal f(x) you want!

16 A Sum of Sine Waves 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?

17 How about Non-peoriodic Function?
A non-periodic function can also be represented as a sum of sin’s and cos’s But we must use all frequencies, not just multiples of the period The sum is replaced by an integral.

18 Fourier Transform A function f(x) can be represented as a sum of phase-shifted sine waves

19 Fourier Transform A function f(x) can be represented as a sum of phase-shifted sine waves How to compute F(u)?

20 Fourier Transform A function f(x) can be represented as a sum of phase-shifted sine waves How to compute F(u)?

21 Fourier Transform A function f(x) can be represented as a sum of phase-shifted sine waves How to compute F(u)? Amplitude: Phase angle:

22 Inverse Fourier Transform
A function f(x) can be represented as a sum of phase-shifted sine waves How to compute F(u)? Inverse Fourier Transform Fourier Transform Amplitude: Phase angle:

23 Inverse Fourier Transform
A function f(x) can be represented as a sum of phase-shifted sine waves How to compute F(u)? Inverse Fourier Transform Fourier Transform Dual property for Fourier transform and its inverse transform Amplitude: Phase angle:

24 Fourier Transform Magnitude against frequency:
f(x) |F(u)| How much of the sine wave with the frequency u appear in the original signal f(x)?

25 Fourier Transform Magnitude against frequency:
f(x) |F(u)| ? 5 How much of the sine wave with the frequency u appear in the original signal f(x)?

26 Fourier Transform Magnitude against frequency:
f(x) |F(u)| 5 How much of the sine wave with the frequency u appear in the original signal f(x)?

27 Fourier Transform f(x) |F(u)| f(x) |F(u)|

28 Fourier Transform f(x) |F(u)| f(x) |F(u)|

29 Fourier Transform f(x) |F(u)| f(x) |F(u)|

30 Fourier Transform f(x) |F(u)| f(x) |F(u)|

31 Box Function and Its Transform
f(x) x

32 Box Function and Its Transform
f(x) x

33 Box Function and Its Transform
f(x) x |F(u)| u If f(x) is bounded, F(u) is unbounded

34 Another Example If the fourier transform of a function f(x) is F(u), what is the fourier transform of f(-x)?

35 Another Example If the fourier transform of a function f(x) is F(u), what is the fourier transform of f(-x)?

36 Dirac Delta and its Transform
f(x) x

37 Dirac Delta and its Transform
f(x) x |F(u)| 1 u Fourier transform and inverse Fourier transform are qualitatively the same, so knowing one direction gives you the other

38 Cosine and Its Transform
-1 1 If f(x) is even, so is F(u)

39 Sine and Its Transform -1 1 - If f(x) is odd, so is F(u)

40 Gaussian and Its Transform
If f(x) is gaussian, F(u) is also guassian.

41 Gaussian and Its Transform
If f(x) is gaussian, F(u) is also guassian. what’s the relationship of their variances?

42 Gaussian and Its Transform
If f(x) is gaussian, F(u) is also guassian. what’s the relationship of their variances?

43 Properties Linearity:

44 Properties Linearity: Time-shift:

45 Properties Linearity: Time-shift:

46 Properties Linearity: Time-shift:

47 Properties Linearity: Time shift: Derivative: Integration:
Convolution:

48 1D Signal Filtering

49 2D Image Filtering 49

50 2D Image Filtering 50

51 Signal Filtering A filter is something that attenuates or enhances particular frequencies 51

52 Spectrum of the filtered function
Signal Filtering A filter is something that attenuates or enhances particular frequencies Easiest to visualize in the frequency domain, where filtering is defined as multiplication: Spectrum of the filtered function Spectrum of the filter Spectrum of the function 52

53 Filtering F G H Low-pass = High-pass = Band-pass =

54 Filtering Identify filtered images from low-pass filter, high-pass filter, and band-pass filter?

55 Filtering in Frequency Domain
H Low-pass = High-pass = Band-pass = So what happens in the spatial domain? Convolution 55

56 Convolution Compute the integral of the product between f and a reversed and translated version of g represents the amount of overlap between f and a reversed and translated version of g.

57 Convolution Compute the integral of the product between f and a reversed and translated version of g represents the amount of overlap between f and a reversed and translated version of g.

58 Reversed and translated function g
Convolution Compute the integral of the product between f and a reversed and translated version of g represents the amount of overlap between f and a reversed and translated version of g. Reversed and translated function g

59 Reversed and translated function g
Convolution Compute the integral of the product between f and a reversed and translated version of g represents the amount of overlap/similarity between f and a reversed and translated version of g. Reversed and translated function g

60 Convolution Compute the integral of the product between f and a reversed and translated version of g t=2.5

61 Convolution Compute the integral of the product between f and a reversed and translated version of g t=4.6

62 Convolution Compute the integral of the product between f and a reversed and translated version of g t=4.6 For discrete signals such as images, this is just a weighted sum of all function values in the window - weights and window sizes are filter dependent 62

63 Convolution Theory

64 Convolution Theory

65 Convolution Theory

66 Convolution Theory

67 Convolution Theory

68 Qualitative Property 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 band-limited if its spectrum has no frequencies above a maximum limit sine, cosine are bandlimited Box, Gaussian, etc are not

69 Summary Convert a function from the spatial domain to the frequency domain and vice versa. Interpret a function in either domain, e.g., filtering and correlation. Build your intuition about functions and their spectra.


Download ppt "CSCE 643 Computer Vision: Thinking in Frequency"

Similar presentations


Ads by Google