 Download Download Presentation Chapter 7: The Fourier Transform 7.1 Introduction

# Chapter 7: The Fourier Transform 7.1 Introduction

Télécharger la présentation ## Chapter 7: The Fourier Transform 7.1 Introduction

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### Presentation Transcript

1. Chapter 7:The Fourier Transform7.1 Introduction • The Fourier transform allows us to perform tasks that would be impossible to perform any other way • It is more efficient to use the Fourier transform than a spatial filter for a large filter • The Fourier transform also allows us to isolate and process particular image frequencies

2. 7.2 Background

3. FIGURE 7.2 • A periodic function may be written as the sum of sines and cosines of varying amplitudes and frequencies

4. 7.2 Background • These are the equations for the Fourier series expansion of f (x), and they can be expressed in complex form • Fourier series

5. 7.2 Background • If the function is nonperiodic, we can obtain similar results by letting T → ∞, in which case • Fourier transform pair

6. 7.3 The One-Dimensional Discrete Fourier Transform

7. 7.3 The One-Dimensional Discrete Fourier Transform • Definition of the One-Dimensional DFT • This definition can be expressed as a matrix multiplication • where F is an N × N matrix defined by

8. 7.3 The One-Dimensional Discrete Fourier Transform • Given N, we shall define • e.g. suppose f = [1, 2, 3, 4] so that N = 4. Then

9. 7.3 The One-Dimensional Discrete Fourier Transform

10. 7.3 The One-Dimensional Discrete Fourier Transform • THE INVERSE DFT • If you compare Equation (7.3) with Equation 7.2 you will see that there are really only two differences: • There is no scaling factor 1/N • The sign inside the exponential function has been changed to positive. • The index of the sum is u, instead of x

11. 7.3 The One-Dimensional Discrete Fourier Transform

12. 7.3 The One-Dimensional Discrete Fourier Transform

13. 7.4 Properties of the One-Dimensional DFT • LINEARITY • This is a direct consequence of the definition of the DFT as a matrix product • Suppose f and g are two vectors of equal length, and p and q are scalars, with h = pf + qg • If F, G, and H are the DFT’s of f, g, and h, respectively, we have • SHIFTING • Suppose we multiply each element xn of a vector x by (−1)n. In other words, we change the sign of every second element • Let the resulting vector be denoted x’. The DFT X’ of x’ is equal to the DFT X of x with the swapping of the left and right halves

14. 7.4 Properties of the One-Dimensional DFT Notice that the first four elements of X are the last four elements of X1 and vice versa

15. 7.4 Properties of the One-Dimensional DFT • SCALING • where k is a scalar and F= f • If you make the function wider in the x-direction, it's spectrum will become smaller in the x-direction, and vice versa • Amplitude will also be changed F • CONJUGATE SYMMETRY • CONVOLUTION

16. 7.4 Properties of the One-Dimensional DFT • THE FAST FOURIER TRANSFORM 2n

17. 7.5 The Two-Dimensional DFT • The 2-D Fourier transform rewrites the original matrix in terms of sums of corrugations

18. 7.5.1 Some Properties of the Two-Dimensional Fourier Transform • SIMILARITY • THE DFT AS A SPATIAL FILTER • SEPARABILITY

19. 7.5.1 Some Properties of the Two-Dimensional Fourier Transform • LINEARITY • THE CONVOLUTION THEOREM • Suppose we wish to convolve an image M with a spatial filter S • Pad S with zeroes so that it is the same size as M; denote this padded result by S’ • Form the DFTs of both M and S’ to obtain (M)and (S’) • Form the element-by-element product of these two transforms: • Take the inverse transform of the result: • Put simply, the convolution theorem states • or

20. 7.5.1 Some Properties of the Two-Dimensional Fourier Transform • THE DC COEFFICIENT • SHIFTING DC coefficient DC coefficient

21. 7.5.1 Some Properties of the Two-Dimensional Fourier Transform • CONJUGATE SYMMETRY • DISPLAYING YRANSFORMS • fft, which takes the DFT of a • vector, • ifft, which takes the inverse DFT of a vector, • fft2, which takes the DFT of a matrix, • ifft2, which takes the inverse DFT of a matrix, and • fftshift, which shifts a transform

22. 7.6 Fourier Transforms in MATLAB e.g. Note that the DC coefficient is indeed the sum of all the matrix values

23. 7.7 Fourier Transforms of Images

24. FIGURE 7.10

25. FIGURE 7.11

26. FIGURE 7.12

27. FIGURE 7.13 • EXAMPLE 7.7.2

28. FIGURE 7.14 • EXAMPLE 7.7.3

29. FIGURE 7.15 • EXAMPLE 7.7.4

30. 7.7 Fourier Transforms of Images

31. 7.8 Filtering in the Frequency Domain • Ideal Filtering • LOW-PASS FILTERING

32. FIGURE 7.16

33. FIGURE 7.17 D = 15

34. >> cfl = cf.*b >> cfli = ifft2(cfl); >> figure, fftshow(cfli, ’abs’) 7.8 Filtering in the Frequency Domain

35. FIGURE 7.18 D = 5 D = 30

36. 7.8 Filtering in the Frequency Domain • HIGH-PASS FILTERING

37. FIGURE 7.19

38. FIGURE 7.20

39. 7.8.2 Butterworth Filtering • Ideal filtering simply cuts off the Fourier transform at some distance from the center • It has the disadvantage of introducing unwanted artifacts (ringing) into the result • One way of avoiding these artifacts is to use as a filter matrix, a circle with a cutoff that is less sharp

40. FIGURE 7.21

41. FIGURE 7.22 & 7.23

42. FIGURE 7.24

43. FIGURE 7.25

44. >> bl = lbutter(c,15,1); >> cfbl = cf.*bl; >> figure, fftshow(cfbl, ’log’); >> cfbli = ifft2(cfbl); >> figure, fftshow(cfbli, ’abs’) FIGURE 7.26

45. FIGURE 7.27

46. 7.8.3 Gaussian Filtering A wider function, with a large standard deviation, will have a low maximum

47. FIGURE 7.28