linear systems 2
play

Linear Systems 2: Fourier transform, filtering, convolution theorem - PowerPoint PPT Presentation

COMP 546 Lecture 17 Linear Systems 2: Fourier transform, filtering, convolution theorem Tues. March 20, 2018 1 Recall last lecture convolution special behavior of sines and cosines complex numbers and Eulers formula Today


  1. COMP 546 Lecture 17 Linear Systems 2: Fourier transform, filtering, convolution theorem Tues. March 20, 2018 1

  2. Recall last lecture • convolution • special behavior of sines and cosines • complex numbers and Euler’s formula

  3. Today • Fourier transform • convolution theorem • filtering

  4. Key idea from linear algebra: orthonormal basis vectors Example: 𝑦 𝑣 1 -1 𝑧 1 = 𝑤 2 𝑧 𝑤 1 1 𝑦 𝑣 𝑣 𝑦 1 1 1 = 2 𝑤 𝑧 -1 1

  5. Fourier transform uses orthogonal basis vectors Example: 𝐽 0 𝐽 0 1 1 𝐽 1 = 𝐽 0 𝐽(1) 𝐽(1) 1 -1 𝐽 0 𝐽 1 𝐽 0 𝐽 0 1 1 1 = 2 𝐽(1) 𝐽(1) 1 -1

  6. (1D) Fourier analysis Fourier transform map N-dimensional delta function (impulse function) basis to an N-dimensional sinusoid function basis 𝐆 𝐽 0 𝐽 0 : : : : 𝐽(𝑂 − 1) 𝐽(𝑂 − 1) 𝐆 −1 Inverse Fourier transform

  7. Fourier Transform 𝑂−1 cos 2𝜌 − 𝑗 sin 2𝜌 𝐽 𝑙 = 𝑂 𝑙𝑦 𝑂 𝑙𝑦 𝐽 𝑦 𝑦=0 𝑓 −𝑗 2 𝜌 𝑂 𝑙 𝑦 𝐽 𝑙 = 𝐆 𝐽 𝑦

  8. Fourier transform 𝐽 𝑙 = 𝐆 𝐽 𝑦

  9. Define 𝑂 x 𝑂 Fourier transform matrix ≡ 𝑓 −𝑗 2 𝜌 𝑂 𝑙𝑦 𝐆 𝑙,𝑦 Claim: (see lecture notes for proof) 𝐆 −1 = 1 𝐆 𝑂 where 𝐆 𝑙,𝑦 ≡ 𝑓 𝑗 2𝜌 𝑂 𝑙𝑦

  10. 𝑓 𝑗 𝜚( 𝑙 ) 𝐽 𝑙 = 𝐽 𝑙 amplitude phase spectrum spectrum

  11. Convolution Theorem Let 𝐽(𝑦) and ℎ(𝑦) be defined on 𝑦 ∈ 0, 1, … , 𝑂 − 1 . 𝑮 𝐽 𝑦 ∗ ℎ 𝑦 = 𝑮 𝐽 𝑦 𝑮 ℎ 𝑦 = 𝐽(𝑙) ℎ(𝑙) See lecture notes for proof. 11

  12. Convolution Theorem Let 𝐽(𝑦) and ℎ(𝑦) be defined on 𝑦 ∈ 0, 1, … , 𝑂 − 1 . 𝑮 𝐽 𝑦 ∗ ℎ 𝑦 = 𝑮 𝐽 𝑦 𝑮 ℎ 𝑦 = 𝐽(𝑙) ℎ(𝑙) 𝑓 −𝑗 𝜚 𝐽 (𝑙) 𝑓 −𝑗 𝜚 ℎ (𝑙) = 𝐽 𝑙 ℎ(𝑙) Convolving an image 𝐽 𝑦 with a filter ℎ 𝑦 changes the amplitude and phase of each frequency component. 12

  13. Concept of filtering (by size) filters

  14. Linear Filtering (by frequency “band”) = + + + +

  15. Ideal Low Pass Filter ℎ 𝑦 ℎ 𝑙 0 𝑂 𝑙 𝑂 2 Only consider up to N/2 because of the conjugacy property (coming soon). 16

  16. Ideal High Pass Filter ℎ 𝑦 ℎ 𝑙 0 𝑂 𝑙 𝑂 2 17

  17. Ideal bandpass filter ℎ 𝑙 0 𝑂 𝑙 1 𝑙 2 𝑂 2 Bandwidth ≡ 𝑙 2 − 𝑙 1 Bandwidth (octaves) ≡ 𝑚𝑝𝑕 2 (𝑙 2 ) − 𝑚𝑝𝑕 2 (𝑙 1 ) 18

  18. Non-Ideal Filters 19

  19. Bandwidth of Non-Ideal Bandpass Filter 20

  20. Why are we defining the low/band/high pass filters according to their properties on frequencies k in 0, .. N/2 only ?

  21. Conjugacy Property of Fourier transform Let ℎ 𝑦 be a real valued function. Then, for any integer 𝑙 , ℎ 𝑙 = ℎ 𝑂 − 𝑙 . Proof: see the lecture notes. 𝑂 2 𝑂 0 𝑙 𝑂 − 𝑙

  22. Periodicity Property of Fourier transform For any positive or negative integer 𝑛 , = ℎ 𝑙 ℎ 𝑙 + 𝑛𝑂 . 0 𝑂 𝑙 − 𝑂 𝑙 𝑙 + 𝑂 etc

  23. Periodicity Property of Fourier transform For any positive or negative integer 𝑛 , = ℎ 𝑙 ℎ 𝑙 + 𝑛𝑂 . Proof: Use this: 𝑓 −𝑗 2 𝜌 𝑂 𝑙𝑦 𝑓 −𝑗 2 𝜌 𝑓 −𝑗 2 𝜌 𝑂 𝑛𝑂𝑦 𝑂 (𝑙+𝑛𝑂) 𝑦 = 1

  24. The Fourier transform is well defined for any 𝑙 (not just in 0, …, 𝑂 − 1. ) 𝑂−1 𝑓 −𝑗 2 𝜌 𝑂 𝑙 𝑦 𝐽 𝑦 𝐽 𝑙 = 𝑦=0

  25. The Fourier transform is well defined for any range of 𝑂 consecutive values of 𝑦 . 𝑂 e.g. 2 −1 𝑓 −𝑗 2 𝜌 𝑂 𝑙 𝑦 𝑔 𝑦 𝑔 𝑙 = 𝑦 =−𝑂 2 Essentially we are treating 𝑔(𝑦) as periodic. 𝑓 −𝑗 2 𝜌 𝑂 𝑙𝑦 𝑓 −𝑗 2 𝜌 𝑓 −𝑗 2 𝜌 𝑂 𝑙𝑛𝑂 𝑂 (𝑦+𝑛𝑂) 𝑙 = 1

  26. Example 1 = ?

  27. Example 1

  28. Examples 2: Local Difference: 𝐽 𝑦 ∗ 𝐸(𝑦) ≡ 1 2 𝐽 𝑦 + 1 − 1 2 𝐽 𝑦 − 1 − 1 2 , 𝑦 = 1 1 𝐸 𝑦 ≡ 2 , 𝑦 = −1 0, otherwise

  29. − 1 2 , 𝑦 = 1 1 𝐸 𝑦 ≡ 2 , 𝑦 = −1 0, otherwise 𝑂−1 𝑓 −𝑗 2 𝜌 𝑂 𝑙 𝑦 𝐸 𝑦 𝐸 𝑙 = 𝑦=0 = ? (Done on blackboard. See lecture notes)

  30. Example 3: Local Average: ≡ 1 4 𝐽 𝑦 + 1 + 1 2 𝐽 𝑦 + 1 𝐽 𝑦 ∗ 𝐶 𝑦 4 𝐽 𝑦 − 1 1 4 , 𝑦 = −1, 1 1 𝐶 𝑦 ≡ 2 , 𝑦 = 0 0, otherwise

  31. 1 4 , 𝑦 = −1, 1 1 𝐶 𝑦 ≡ 2 , 𝑦 = 0 0, otherwise 𝑂−1 𝑓 −𝑗 2 𝜌 𝑂 𝑙 𝑦 𝐶 𝑦 𝐶 𝑙 = 𝑦=0 ( Sketched on blackboard. See lecture notes) = ?

  32. Stopped here (will finish next class)

  33. Example 4: 𝑓 𝑗 2 𝜌 𝑂 𝑙 0 𝑦 = 𝐆 𝑂 𝜀 (𝑙 − 𝑙 0 ) (Done on blackboard. See lecture notes.) ℎ 𝑙 0 𝑂 𝑙 0 𝑂 2

  34. Example 5 & 6: cosine and sine cos 2𝜌 𝐆 𝑂 𝑙 0 𝑦 = ? sin 2𝜌 𝐆 𝑂 𝑙 0 𝑦 = ?

  35. Example 5 & 6: cosine and sine cos 2𝜌 = 𝑂 𝐆 𝑂 𝑙 0 𝑦 2 𝜀 𝑙 − 𝑙 0 + 𝜀(𝑙 + 𝑙 0 ) sin 2𝜌 = 𝑂 𝐆 𝑂 𝑙 0 𝑦 2𝑗 𝜀 𝑙 − 𝑙 0 − 𝜀(𝑙 + 𝑙 0 ) Use Euler’s formula and Example 4. Also, recall the conjugacy property.

  36. Example 7: Gaussian 2 1 𝑓 − 1 𝑦 𝐻 𝑦, 𝜏 = 2 𝜏 2𝜌 𝜏 What is its Fourier transform? 38

  37. Example 7: Gaussian 2 1 𝑓 − 1 𝑦 𝐻 𝑦, 𝜏 = 2 𝜏 2𝜌 𝜏 Note the inverse relationship 2 𝑓 −1 2 𝜌 𝜏 𝑙 𝑮 𝐻 𝑦, 𝜏 ≈ 2 𝑂 with equality in the limit as distance between samples goes to 0 and N goes to infinity, i.e. continuous Fourier transform. 39

  38. 40

  39. Example 8: cosine Gabor cos 2𝜌 = 𝑂 𝐆 𝑂 𝑙 0 𝑦 2 𝜀 𝑙 − 𝑙 0 + 𝜀(𝑙 + 𝑙 0 ) 2 𝐆 𝐻 𝑦, 𝜏 ≈ 𝑓 −1 2 𝜌 𝜏 𝑙 2 𝑂 2𝜌 𝐆 𝑑𝑝𝑡𝐻𝑏𝑐𝑝𝑠 𝑦, 𝜏 = 𝐆 { cos 𝐻 𝑦, 𝜏 } 𝑂 𝑙 0 𝑦 = ? 41

  40. Convolution Theorem (version 2) 1 𝑮 𝐽 𝑦 ℎ 𝑦 = 𝑂 𝑮 𝐽 𝑦 ∗ 𝑮 ℎ 𝑦 Proof: see Appendix in lecture notes 42

  41. Example 8: cosine Gabor cos 2𝜌 = 𝑂 𝐆 𝑂 𝑙 0 𝑦 2 𝜀 𝑙 − 𝑙 0 + 𝜀(𝑙 + 𝑙 0 ) 2 − 1 2 𝜌 𝜏 𝑙 2 𝑂 𝐆 𝐻 𝑦, 𝜏 ≈ 𝑓 2 2 2 𝜌 𝜏 (𝑙− 𝑙 0 ) −1 −1 2 𝜌 𝜏 (𝑙+ 𝑙 0 ) 𝐆 𝑑𝑝𝑡𝐻𝑏𝑐𝑝𝑠 𝑦, 𝜏 ≈ 𝑂 2 𝑂 2 𝑂 2 ( 𝑓 + 𝑓 ) See lecture notes for proof, and formula for sine Gabor. 43

  42. Example: cosine Gabor [ADDED: April 12] N = 128, k0 = 20, sigma = 5

Recommend


More recommend