1 / 48

Frequency Domain Filtering

Frequency Domain Filtering. Frequency Domain Methods. Frequency Domain. Spatial Domain. Major filter categories. Typically, filters are classified by examining their properties in the frequency domain: (1) Low-pass (2) High-pass (3) Band-pass (4) Band-stop. Example.

josenjones
Télécharger la présentation

Frequency Domain Filtering

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. Frequency Domain Filtering

  2. Frequency Domain Methods Frequency Domain Spatial Domain

  3. Major filter categories • Typically, filters are classified by examining their properties in the frequency domain: (1) Low-pass (2) High-pass (3) Band-pass (4) Band-stop

  4. Example Original signal Low-pass filtered High-pass filtered Band-pass filtered Band-stop filtered

  5. frequency domain time domain Low-pass filters(i.e., smoothing filters) • Preserve low frequencies - useful for noise suppression Example:

  6. time domain frequency domain High-pass filters(i.e., sharpening filters) • Preserves high frequencies - useful for edge detection Example:

  7. frequency domain time domain Band-pass filters • Preserves frequencies within a certain band Example:

  8. Band-stop filters • How do they look like? Band-stop Band-pass

  9. Frequency Domain Methods (real) Case 1: H(u,v) is specified in the frequency domain. Case 2: h(x,y) is specified in the spatial domain.

  10. Frequency domain filtering: steps F(u,v) = R(u,v) + jI(u,v)

  11. Frequency domain filtering: steps (cont’d) (Case 1) G(u,v)= F(u,v)H(u,v) = H(u,v) R(u,v) + jH(u,v)I(u,v)

  12. Example fp(x,y) f(x,y) fp(x,y)(-1)x+y F(u,v) G(u,v)=F(u,v)H(u,v) H(u,v) - centered g(x,y) gp(x,y)

  13. (Case 2) h(x,y) specified in spatial domain • If h(x,y) is given in the spatial domain, we can generate H(u,v) as follows: • Form hp(x,y) by padding with zeroes. 2. Multiply by (-1)x+y to center its spectrum. 3. Compute its DFT to obtain H(u,v) Recall these properties:

  14. Example: h(x,y) is specified in the spatial domain 600 x 600 Example: 6 x 6 g(x,y)= -g(6-x,6-y) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 1 0 0 0 -2 0 2 0 0 0 -1 0 1 0 0 0 0 0 0 0 frequency time Sobel 602 x 602 frequency Warning: need to preserve odd symmetry when padding with zeroes  H(u,v) should be imaginary and odd (read details on pages 241 and 268)

  15. Results of Filtering in the Spatial and Frequency Domains frequency domain filtering spatial domain filtering

  16. Low Pass (LP) Filters • Ideal low-pass filter (ILPF) • Butterworth low-pass filter (BLPF) • Gaussian low-pass filter (GLPF)

  17. Low-pass (LP) filtering • Preserves low frequencies, attenuates high frequencies. Ideal In practice D0: cut-off frequency

  18. Lowpass (LP) filtering (cont’d) • In 2D, the cutoff frequencies are specified by a circle. Ideal

  19. Specifying a 2D low-pass filter • Specify cutoff frequencies by specifying the radius of a circle centered at point (N/2, N/2) in the frequency domain. • The radius is chosen by specifying the percentage of total power enclosed by the circle.

  20. Specifying a 2D low-pass filter (cont’d) • Typically, most frequencies are concentrated around the center of the spectrum. r=8 (90% power) r=18 (93% power) original r: radius r=43 (95%) r=78 (99%) r=152 (99.5%)

  21. How does D0 control smoothing? • Reminder: multiplication in the frequency domain implies convolution in the time domain time domain freq. domain sinc * =

  22. How does D0 control smoothing? (cont’d) • D0 controls the amount of blurring r=78 (99%) r=8 (90%)

  23. Ringing Effect • Sharp cutoff frequencies produce an overshoot of image features whose frequency is close to the cutoff frequencies (ringing effect). h=f*g

  24. Butterworth LP filter (BLPF) • In practice, we use filters that attenuate high frequencies smoothly (e.g., Butterworth LP filter)  less ringing effect n=1 n=4 n=16

  25. Spatial Representation of BLPFs n=1 n=2 n=5 n=20

  26. Comparison: Ideal LP and BLPF BLPF ILPF D0=10, 30, 60, 160, 460 D0=10, 30, 60, 160, 460 n=2

  27. Gaussian LP filter (GLPF)

  28. Gaussian: Frequency – Spatial Domains spatial domain frequency domain

  29. Example: smoothing by GLPF (1)

  30. Examples of smoothing by GLPF (2) D0=100 D0=80

  31. High Pass (LP) Filters • Ideal high-pass filter (IHPF) • Butterworth high-pass filter (BHPF) • Gaussian high-pass filter (GHPF)

  32. High-pass filtering • Preserves high frequencies, attenuates low frequencies. H(u)

  33. High-Pass filtering (cont’d) • A high-pass filter can be obtained from a low-pass filter as follows: = 1 - D0

  34. Butterworth high pass filter (BHPF) • In practice, we use filters that attenuate low frequencies smoothly (e.g., Butterworth HP filter)  less ringing effect

  35. Spatial Representation of High-pass Filters IHPF BHPF GHPF

  36. Comparison: IHPF and BHPF IHPF D0=30,60,160 D0=30,60,160 n=2 BHPF

  37. Gaussian HP filter GHPF BHPF

  38. Comparison: BHPF and GHPF D0=30,60,160 BHPF n=2 D0=30,60,160 GHPF

  39. Example: High-pass Filtering and Thresholding for Fingerprint Image Enhancement BHPF (order 4 with a cutoff frequency 50)

  40. Homomorphic filtering • Many times, we want to remove shading effects from an image (i.e., due to uneven illumination) • Enhance high frequencies • Attenuate low frequencies but preserve fine detail.

  41. Homomorphic Filtering (cont’d) • Consider the following model of image formation: • In general, the illumination component i(x,y) varies slowly and affects low frequencies mostly. • In general, the reflection component r(x,y) varies faster and affects high frequencies mostly. i(x,y): illumination r(x,y): reflection IDEA: separate low frequencies due to i(x,y) from high frequencies due to r(x,y)

  42. How are frequencies mixed together? • Low and high frequencies from i(x,y) and r(x,y) • are mixed together. • When applying filtering, it is difficult to handle low/high frequencies separately.

  43. Can we separate them? • Idea: Take the ln( ) of

  44. Steps of Homomorphic Filtering (1) Take (2) Apply FT: or (3) Apply H(u,v)

  45. Steps of Homomorphic Filtering (cont’d) (4) Take Inverse FT: or (5) Take exp( ) or

  46. Example using high-frequency emphasis Attenuate the contribution made by illumination and amplify the contribution made by reflectance Attenuate the contribution made by illumination and amplify the contribution made by reflectance

  47. Homomorphic Filtering: Example

  48. Homomorphic Filtering: Example

More Related