cs 4495 computer vision frequency and fourier transforms
play

CS 4495 Computer Vision Frequency and Fourier Transforms Aaron - PowerPoint PPT Presentation

Frequency and Fourier Transform CS 4495 Computer Vision A. Bobick CS 4495 Computer Vision Frequency and Fourier Transforms Aaron Bobick School of Interactive Computing Frequency and Fourier Transform CS 4495 Computer Vision A. Bobick


  1. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick CS 4495 Computer Vision Frequency and Fourier Transforms Aaron Bobick School of Interactive Computing

  2. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Administrivia • Project 1 is (still) on line – get started now! • Readings for this week: FP Chapter 4 (which includes reviewing 4.1 and 4.2)

  3. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Salvador Dali “Gala Contemplating the Mediterranean Sea, which at 30 meters becomes the portrait of Abraham Lincoln ”, 1976

  4. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick

  5. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Decomposing an image • A basis set is (edit from to Wikipedia): • A basis B of a vector space V is a linearly independent subset of V that spans V . • In more detail:suppose that B = { v 1 , …, v n } is a finite subset of a vector space V over a field F (such as the real or complex numbers R or C ). Then B is a basis if it satisfies the following conditions: • the linear independence property: • for all a 1 , …, a n ∈ F , if a 1 v 1 + … + a n v n = 0, then necessarily a 1 = … = a n = 0; • and the spanning property, • for every x in V it is possible to choose a 1 , …, a n ∈ F such that x = a 1 v 1 + … + a n v n . • Not necessarily orthogonal…. • If we have a basis set for images, could perhaps be useful for analysis – especially for linear systems because we could consider each basis component independently. (Why?)

  6. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Images as points in a vector space • Consider an image as a point in a NxN size space – can rasterize into a single vector T [ x x x ... x x .. . x ] − − − 00 10 20 ( n 1)0 10 ( n 1)( n 1) • The “normal” basis is just the vectors: .. 0] T [0 0 0 0...010 0 0. • Independent • Can create any image • But not very helpful to consider how each pixel contributes to computations.

  7. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick A nice set of basis Teases away fast vs. slow changes in the image. This change of basis has a special name…

  8. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick 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

  9. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick A sum of sines • Our building block: • ω x + φ ) A sin( • 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?

  10. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Time and Frequency • example : g ( t ) = sin( 2p f t ) + ( 1/3 )sin( 2p ( 3f ) t )

  11. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Time and Frequency • example : g ( t ) = sin( 2pf t ) + ( 1/3 )sin( 2p ( 3f ) t ) = +

  12. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Frequency Spectra - Series • example : g ( t ) = sin( 2pf t ) + ( 1/3 )sin( 2p ( 3f ) t ) = + One form of spectrum – more in a bit

  13. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Frequency Spectra - Series ≈ + =

  14. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Frequency Spectra - Series ≈ + =

  15. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Frequency Spectra - Series ≈ + =

  16. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Frequency Spectra - Series ≈ + =

  17. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Frequency Spectra - Series ≈ + =

  18. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Frequency Spectra - Series ∞ 1 sin(2 ∑ = π A kt ) k = k 1 Usually, frequency is more interesting than the phase for CV because we’re not reconstructing the image

  19. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Fourier Transform We want to understand the frequency ω of our signal. So, let’s reparametrize the signal by ω instead of x : ω x + φ ) A sin( F( ω ) Fourier f(x) Transform For every ω from 0 to inf (actually –inf to inf), F( ω ) holds the amplitude A and phase φ of the corresponding sine • How can F hold both? Complex number trick! = + = − ik e cos k i sin k i 1 (or ) j Recall : Even Odd Matlab sinusoid demo…

  20. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Fourier Transform We want to understand the frequency ω of our signal. So, let’s reparametrize the signal by ω instead of x : ω x + φ ) A sin( F( ω ) Fourier f(x) Transform For every ω from 0 to inf, (actually –inf to inf), F( ω ) holds the amplitude A and phase φ of the corresponding sine • How can F hold both? Complex number trick! = ± ω + ω 2 2 A R ( ) I ( ) ω = ω + ω ω F ( ) R ( ) iI ( ) ( ) I − φ = tan 1 ω R ( ) Even Odd And we can go back: F( ω ) Inverse Fourier f(x) Transform

  21. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Computing FT: Just a basis • The infinite integral of the product of two sinusoids of different frequency is zero. (Why?) + φ + ϕ = ≠ ∞ ∫ sin( ax )sin( bx ) dx 0, if a b −∞ • And the integral is infinite if equal (unless exactly out of phase): + φ + ϕ = ±∞ ∞ ∫ sin( ax )sin( ax ) dx −∞ If φ and ϕ not exactly pi/2 out of phase (sin and cos).

  22. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Computing FT: Just a basis • So, suppose f(x) is a cosine wave of freq ω : = πω f x ( ) cos(2 x ) • Then: = ∫ π ∞ C u ( ) f x ( )cos(2 u x ) dx −∞ Is infinite if u is equal to ω (or - ω ) and zero otherwise: Impulse ω

  23. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Computing FT: Just a basis • We can do that for all frequencies u. • But we’d have to do that for all phases, don’t we??? • No! Any phase can be created by a weighted sum of cosine and sine. Only need each piece: = ∫ π ∞ C u ( ) f x ( )cos(2 u x ) dx −∞ = ∫ π ∞ S u ( ) f x ( )sin(2 u x ) dx −∞ • Or…

  24. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Fourier Transform – more formally Represent the signal as an infinite weighted sum of an infinite number of sinusoids ( ) ( ) = ∫ ∞ − π i 2 ux F u f x e dx −∞ = + = − e ik cos sin 1 k i k i Again: Spatial Domain ( x ) Frequency Domain ( u or s ) (Frequency Spectrum F(u) ) Inverse Fourier Transform (IFT) – add up all the sinusoids at x: ( ) ( ) = ∫ ∞ π i 2 ux f x F u e du −∞

  25. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Frequency Spectra – Even/Odd Frequency actually goes from –inf to inf. Sinusoid example: Even (cos) Odd (sin) Magnitude ω ω ω Imaginary Real Power

  26. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Frequency Spectra

  27. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Extension to 2D ?

  28. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick 2D Examples – sinusoid magnitudes 50 50 100 100 150 150 200 200 250 250 50 100 150 200 250 50 100 150 200 250

  29. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick 2D Examples – sinusoid magnitudes 50 50 100 100 150 150 200 200 250 250 50 100 150 200 250 50 100 150 200 250

  30. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick 2D Examples – sinusoid magnitudes 50 50 100 100 150 150 200 200 250 250 50 100 150 200 250 50 100 150 200 250

  31. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Linearity of Sum 50 50 50 100 100 100 150 150 150 200 200 200 250 250 + = 250 50 100 150 200 250 50 100 150 200 250 50 100 150 200 250 20 20 20 40 40 40 60 60 60 80 80 80 100 100 100 120 120 120 20 40 60 80 100 120 20 40 60 80 100 120 20 40 60 80 100 120

  32. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Extension to 2D – Complex plane Both a Real and Im version

  33. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Examples B.K. Gunturk

  34. Frequency and Fourier Transform CS 4495 Computer Vision – A. Bobick Man-made Scene Where is this strong horizontal suggested by vertical center line?

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend