1 / 38

Fourier Transform

Fourier Transform. A periodic function may be decomposed as the sum of sines and cosines of varying amplitudes and frequencies. One-dimensional Discrete Fourier Transform. Suppose f=[f 0 ,f 1 ,f 2 , … ,f n-1 ] is a sequence of length N

Download Presentation

Fourier Transform

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fourier Transform

  2. A periodic function may be decomposed as the sum of sines and cosines of varying amplitudes and frequencies.

  3. One-dimensional Discrete Fourier Transform • Suppose f=[f0,f1,f2,…,fn-1] is a sequence of length N • We define its DFT to be the sequence F=[F0,F1,F2,…,Fn-1] • Where

  4. This definition can be expressed as a matrix multiplication: • F=Ff • Where F is an N x N matrix defined by

  5. The inverse DFT is very similar to the forward transform: • We can express this as a matrix product: • f=F-1F

  6. The properties of one-dimensional DFT • Linearity • Shifting • Conjugate symmetry • Convolution

  7. Linearity • Suppose f and g are two vectors of equal length, and p and q are scalar, with h=p f +q g. • If F,G, and H are the DFT of f, g, and h, we have H = p F + q G • This follows from the definitions of • F=Ff, G=Fg, H=Fh

  8. Multiply (-1)n DFT DFT X X’ X’ is equal to x with the swapping of the left and right halves (p150) Shifting • Suppose x={x1,x2,x3,…,xk} • xn X’

  9. Conjugate symmetry • X is real of length N, then its DFT satisfies the condition that • Xk= XN-k for all k=1,2,3,…,N-1 • Thus x1= x7 , x2= x6 , x3= x5, x4= x4, which means x4 must be real

  10. Convolution(1) • Suppose x and y are two vectors of the same length N. We define their convolution to be the vector • z=x*y (commutative x*y=y*x) • Where • If N=4, then • Z0=(x0y0+x1y-1+x2y-2+x3y-3)/4

  11. Convolution(2) • …y0 y1 y2 y3 y0 y1 y2 y3… =…y0 y-3 y-2 y-1 y0 y1 y2 y3… • Convolution theorem • Z,X and Y are the DFT of z=x*y, x and y, respectively, then Z=X.Y • It provides us with another way of performing convolution: multiply the DFT’s of our two vectors and invert the result

  12. Two-dimensional DFT • The forward and inverse transforms for an MxN matrix

  13. Properties of the 2D Fourier Transform • Similarity • The DFT as a spatial filter • Separability • Linearity • The convolution theorem • The dc coefficient • Shifting • Conjugate symmetry • Displaying transforms

  14. Similarity • The forward and inverse transforms are very similar with the exception of the scale factor 1/MN in the inverse transform and the negative sign in the exponent of the forward transform

  15. The DFT as a spatial filter • are independent of the values f or F • It means that every value F(u,v) is obtained by multiplying every value of f(x,y) by a fixed value and adding up all the results. This is what a linear spatial filter does.

  16. Only depends on x and u, and is independent of y and v This means we can break down our formula above to simpler one that works on single rows or columns Separability

  17. The convolution theorem(1) • convolve an image M with a spatial filter SM*S • Slow if S is large • The convolution theorem states that this can be done by the following steps: • Pad S with zeroes S’ (S’ is the same size as M) • Perform F(M) and F(S’) • form the element-by-element product of these two transforms: F(M).F(S’) • take the inverse transform of the result: F-1(F(M).F(S’))

  18. The dc coefficient • The value F(0,0) is called the DC coefficient • Put u=0,v=0 in the forward DFT, then • F(0,0) is the sum of all f(x,y)

  19. DC coefficient Shifting • For purpose of display, it is convenient to have the DC coefficient in the center. This can be done by multiplying f(x,y) by (-1)x+y before performing the DFT

  20. Conjugate symmetry • If we make the substitutions u=-u and v=-v , then • F(u,v)=F*(-u+pM,-v+qN) for any integers p and q.

  21. Displaying transforms • F(u,v) are complex numbers • Two approach: 1. Use imshow to view |F(u,v)| /DC coefficient 2. Use mat2gray to view |F(u,v)| directly. Problem: DC is larger than all other values and thus will result in a single white dot surrounded by black Solution: take Log(1+ |F(u,v)|)

  22. Fourier transform of images

  23. Filtering in the frequency domain • Ideal filtering • Butterworth filtering • Gaussian filtering • Homomorphic filtering

  24. Ideal filtering (Low-pass filtering) • Observation: In the frequency domain, the low frequency components are toward the center • criterion: multiply the transform by a matrix in such a way that center values are maintained and values away from the center are either removed or minimized.

  25. With D=15 Ideal filtering (Low-pass filtering) • Ideal low-pass matrix • m(x,y)=

  26. ringing effect With D=15 Ideal filtering (High-pass filtering) • High-pass filtering • m(x,y)=

  27. Butterworth Filtering • Low-pass filter f(x)=1/(1+(x/D)2n) • High-pass filter f(x)=1/(1+(D/x)2n) n=2 n=4 n=4 n=2

  28. Low-pass filtering High-pass filtering

  29. Gaussian Filtering (low-pass filter) • f(x)=e-x^2/2σ^2

  30. f(x,y)=e-(x^2+y^2)/2σ^2

  31. Gaussian filters are important for a number of reasons: 1. they are mathematically very well behaved; in particular, the Fourier transform of a Gaussian filter is another Gaussian 2. they are rotationally symmetric, so are very good starting points for some edge-detection algorithms 3. they are separable (apply it on rows first and then on columns) 4. the convolution of two Gaussians is another Gaussian

  32. σ=30 σ=10

  33. Gaussian Filtering (high-pass filter) Gaussian high-pass filter=1-gaussian low-pass filter σ=10 σ=30

  34. Homomorphic filtering • f(x,y)=i(x,y)·r(x,y) i(x,y): illumination r(x,y): reflectance 0<i(x,y)<infinite 0<r(x,y)<1 • log f(x,y)=log i(x,y) + log r(x,y)

  35. image i(x,y) r(x,y) sum exp output Low-pass filtering high-pass filtering log

  36. Problem: Given a value log f(x,y), we can not determine the values of log i(x,y) and log r(x,y). • Solution: Use high-boost filter of Fourier transform

  37. image FFT FFT-1 exp output log High-boost filtering

  38. By trial and error to produce bands of suitable width and on such places as to obscure detail in our image y=0.5 + 0.4 sin x 0.1<= y <=1.0

More Related