1 / 31

240-373 Image Processing

240-373 Image Processing. Montri Karnjanadecha montri@coe.psu.ac.th http://fivedots.coe.psu.ac.th/~montri. Chapter 14. The Frequency Domain. The Frequency Domain. Any wave shape can be approximated by a sum of periodic (such as sine and cosine) functions. a --amplitude of waveform

totie
Download Presentation

240-373 Image Processing

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. 240-373 Image Processing Montri Karnjanadecha montri@coe.psu.ac.th http://fivedots.coe.psu.ac.th/~montri 240-373: Chapter 14: The Frequency Domain

  2. Chapter 14 The Frequency Domain 240-373: Chapter 14: The Frequency Domain

  3. The Frequency Domain • Any wave shape can be approximated by a sum of periodic (such as sine and cosine) functions. • a--amplitude of waveform • f-- frequency (number of times the wave repeats itself in a given length) • p--phase (position that the wave starts) • Usually phase is ignored in image processing 240-373: Chapter 14: The Frequency Domain

  4. 240-373: Chapter 14: The Frequency Domain

  5. 240-373: Chapter 14: The Frequency Domain

  6. The Hartley Transform • Discrete Hartley Transform (DHT) • The M x N image is converted into a second image (also M x N) • M and N should be power of 2 (e.g. .., 128, 256, 512, etc.) • The basic transform depends on calculating the following for each pixel in the new M x N array 240-373: Chapter 14: The Frequency Domain

  7. The Hartley Transform where f(x,y) is the intensity of the pixel at position (x,y) H(u,v) is the value of element in frequency domain • The results are periodic • The cosine+sine (CAS) term is call “the kernel of the transformation” (or ”basis function”) 240-373: Chapter 14: The Frequency Domain

  8. The Hartley Transform • Fast Hartley Transform (FHT) • M and N must be power of 2 • Much faster than DHT • Equation: 240-373: Chapter 14: The Frequency Domain

  9. The Fourier Transform • The Fourier transform • Each element has real and imaginary values • Formula: • f(x,y) is point (x,y) in the original image and F(u,v) is the point (u,v) in the frequency image 240-373: Chapter 14: The Frequency Domain

  10. The Fourier Transform • Discrete Fourier Transform (DFT) • Imaginary part • Real part • The actual complex result is Fi(u,v) + Fr(u,v) 240-373: Chapter 14: The Frequency Domain

  11. Fourier Power Spectrum and Inverse Fourier Transform • Fourier power spectrum • Inverse Fourier Transform 240-373: Chapter 14: The Frequency Domain

  12. Fourier Power Spectrum and Inverse Fourier Transform • Fast Fourier Transform (FFT) • Much faster than DFT • M and N must be power of 2 • Computation is reduced from M2N2 to MN log2 M.log2 N (~1/1000 times) 240-373: Chapter 14: The Frequency Domain

  13. A C B D D B C A Fourier Power Spectrum and Inverse Fourier Transform • Optical transformation • A common approach to view image in frequency domain Original image Transformed image 240-373: Chapter 14: The Frequency Domain

  14. Power and Autocorrelation Functions • Power function: • Autocorrelation function • Inverse Fourier transform of or • Hartley transform of 240-373: Chapter 14: The Frequency Domain

  15. Hartley vs Fourier Transform 240-373: Chapter 14: The Frequency Domain

  16. Interpretation of the power function 240-373: Chapter 14: The Frequency Domain

  17. Applications of Frequency Domain Processing • Convolution in the frequency domain 240-373: Chapter 14: The Frequency Domain

  18. Applications of Frequency Domain Processing • useful when the image is larger than 1024x1024 and the template size is greater than 16x16 • Template and image must be the same size 240-373: Chapter 14: The Frequency Domain

  19. Use FHT or FFT instead of DHT or DFT • Number of points should be kept small • The transform is periodic • zeros must be padded to the image and the template • minimum image size must be (N+n-1) x (M+m-1) • Convolution in frequency domain is “real convolution” Normal convolution Real convolution 240-373: Chapter 14: The Frequency Domain

  20. 240-373: Chapter 14: The Frequency Domain

  21. Convolution in frequency domain is “real convolution” Normal convolution Real convolution 240-373: Chapter 14: The Frequency Domain

  22. Convolution using the Fourier transform Technique 1: Convolution using the Fourier transform USE: To perform a convolution OPERATION: • zero-padding both the image (MxN) and the template (m x n) to the size (N+n-1) x (M+m-1) • Applying FFT to the modified image and template • Multiplying element by element of the transformed image against the transformed template 240-373: Chapter 14: The Frequency Domain

  23. Convolution using the Fourier transform OPERATION: (cont’d) • Multiplication is done as follows: F(image) F(template) F(result) (r1,i1) (r2, i2) (r1r2 - i1i2, r1i2+r2i1) i.e. 4 real multiplications and 2 additions • Performing Inverse Fourier transform 240-373: Chapter 14: The Frequency Domain

  24. Hartley convolution Technique 2: Hartley convolution USE: To perform a convolution OPERATION: • zero-padding both the image (MxN) and the template (m x n) to the size (N+n-1) x (M+m-1) image template 240-373: Chapter 14: The Frequency Domain

  25. Hartley convolution • Applying Hartley transform to the modified image and template image template 240-373: Chapter 14: The Frequency Domain

  26. Hartley convolution • Multiplying them by evaluating: 240-373: Chapter 14: The Frequency Domain

  27. Hartley convolution: Cont’d Giving: • Performing Inverse Hartley transform, gives: 240-373: Chapter 14: The Frequency Domain

  28. Hartley convolution: Cont’d 240-373: Chapter 14: The Frequency Domain

  29. Deconvolution • Convolution R = I * T • Deconvolution I = R *-1T • Deconvolution of R by T= convolution of R • by some ‘inverse’ of the template T (T’) 240-373: Chapter 14: The Frequency Domain

  30. Deconvolution • Consider periodic convolution as a matrix operation. For example 240-373: Chapter 14: The Frequency Domain

  31. Deconvolution is equivalent to A B C AB = C ABB-1 = CB-1 A = CB-1 240-373: Chapter 14: The Frequency Domain

More Related