1 / 120

Image Enhancement in the Frequency Domain

Image Enhancement in the Frequency Domain. Spring 2005, Jen-Chang Liu. Outline. Introduction to the Fourier Transform and Frequency Domain Magnitude of frequencies Phase of frequencies Fourier transform and DFT Filtering in the frequency domain Smoothing Frequency Domain Filters

spatton
Télécharger la présentation

Image Enhancement in the Frequency Domain

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. Image Enhancement in the Frequency Domain Spring 2005, Jen-Chang Liu

  2. Outline • Introduction to the Fourier Transform and Frequency Domain • Magnitude of frequencies • Phase of frequencies • Fourier transform and DFT • Filtering in the frequency domain • Smoothing Frequency Domain Filters • Sharpening Frequency Domain Filters • Homomorphic Filtering • Implementation of Fourier transform

  3. Background • 1807, French math. Fourier • Any function that periodically repeats itself can be expressed as the sum of of sines and/or cosines of different frequencies, each multiplied by a different coefficient (Fourier series)

  4. Periodic function f(t) = f(t+T), T: period (sec.) 1/T: frequency (cycles/sec.)

  5. Frequency Weight f1 w1 f2 w2 f3 w3 f4 w4 Periodic function f

  6. min Minimize squared error How to measure weights? • Assume f1 , f2 ,f3 ,f4 are known • How to measure w1 , w2 ,w3 ,w4 ?

  7. Minimize MSE calculation min

  8. Orthogonal condition 正交 • f1 and f2 are orthogonal if • f1 , f2 ,f3 ,f4 are orthogonal to each other

  9. Recall in linear algebra: projection Minimization calculation • To satisfy min We have =>

  10. Weight = Projection magnitude • Represent input f(x) with another basis functions Functional space Vector space f v projection f1 (1,0)

  11. Summary 1 • A function f can be written as sum of f1 , f2 ,f3 , … If f1 , f2 , f3 , … are orthogonal to each other Weight (magnitude)

  12. Summary 1: sine, cosine bases • Let f1 , f2 ,f3 , … carry frequency information • Let them be sines and cosines n, k:integers => They all satisfy orthogonal conditions

  13. Summary 1: orthogonal

  14. DC 頻率=3 頻率=1 頻率=2 Fourier series (Assume periodic outside) • For

  15. Outline • Introduction to the Fourier Transform and Frequency Domain • Magnitude of frequencies • Phase of frequencies • Fourier transform and DFT • Filtering in the frequency domain • Smoothing Frequency Domain Filters • Sharpening Frequency Domain Filters • Homomorphic Filtering • Implementation of Fourier transform

  16. 相位 Correlation with different phase • Weight calculation f 相關係數 f1

  17. Correlation with different phase (cont.) • Weight calculation 相關係數? f f1

  18. Corr(q) q 2p 0 q0 Deal with phase: method 1 • For example, expand f(t) over the cos(wt) basis function • Consider different phases Problem: weight(w, q)

  19. With frequency w: Deal with phase: method 2 • Complex exponential as basis j 1 real Advantage: Derive magnitude and phase q simultaneously

  20. Deal with phase 2: example • Input phase magnitude

  21. DC Fourier series with phase (Assume periodic outside) • For Complex weight 頻率k=1 k=2 k=3

  22. Outline • Introduction to the Fourier Transform and Frequency Domain • Magnitude of frequencies • Phase of frequencies • Fourier transform and DFT • Filtering in the frequency domain • Smoothing Frequency Domain Filters • Sharpening Frequency Domain Filters • Homomorphic Filtering • Implementation of Fourier transform

  23. Fourier transform • Functions that are not periodic can be expressed as the integral of sines and/or cosines multiplied by a weighting functions • Frequency up to infinity • Perfect reconstruction Functions -- Fourier transform Operation in frequency domain without loss of information

  24. 1-D Fourier Transform • Fourier transform F(u) of a continuous function f(x) is: Inverse transform: Forward Fourier transform:

  25. 2-D Fourier Transform • Fourier transform F(u,v) of a continuous function f(x,y) is: Inverse transform: x u F y v

  26. Future development • 1950, fast Fourier transform (FFT) • Revolution in the signal processing • Discrete Fourier transform (DFT) • For digital computation

  27. 1-D Discrete Fourier Transform • f(x),x=0,1,…,M-1 . discrete function • F(u),u=0,1,…,M-1. DFT of f(x) Inverse transform: Forward discrete Fourier transform:

  28. Frequency Domain 頻率域 • Where is the frequency domain? j Euler’s formula: 1 F(u) frequency u

  29. Fourier transform

  30. F(u) Complex quantity? imaginary • Polar coordinate m real magnitude phase Power spectrum

  31. Extend to 2-D DFT from 1-D • 2-D: x-axis then y-axis

  32. Complex Quantities to Real Quantities • Useful representation magnitude phase Power spectrum

  33. DFT: example log(F)

  34. Properties in the frequency domain • Fourier transform works globally • No direct relationship between a specific components in an image and frequencies • Intuition about frequency • Frequency content • Rate of change of gray levels in an image

  35. +45,-45 degree artifacts

  36. Outline • Introduction to the Fourier Transform and Frequency Domain • Magnitude of frequencies • Phase of frequencies • Fourier transform and DFT • Filtering in the frequency domain • Smoothing Frequency Domain Filters • Sharpening Frequency Domain Filters • Homomorphic Filtering • Implementation of Fourier transform

  37. Filtering in the frequency domain • Filter (mask) in the spatial domain • Apply a filter transfer function in the frequency domain • Output(u,v)=Input(u,v) H(u,v) • Suppress certain frequencies while leaving others unchanged 乘法

  38. Filtering in the frequency domain complex real real part even dim. gray-level scaling …

  39. Basic filters • Notch filter • Make a hole(notch) in the frequency domain • Ex. DC

  40. Notch filter: result

  41. Basic filters (cont.) • Low-pass filter • Attenuates high frequencies while passing low frequencies • smoothing • High-pass filter • Attenuates low frequencies while passing high frequencies • sharpening

  42. Low-pass High-pass

  43. Outline • Review concept of frequencies • How to measure the period(or frequency)? • Adjust frequency by scaling • Properties of DFT • Convolution theorem – relation between spatial domain filtering(masking) and frequency domain operation

  44. How to measure? Periodic function f(t) = f(t+T), T: period 1/T: frequency

  45. Auto-correlation function • Recall correlation function f 相關係數 f1

  46. q0 T Auto-correlation function (cont.) 自相關係數 Corr(q) q0 T q

  47. Example: audio file • phone = wavread('phone.wav'); wavplay(phone);

  48. Example: autocorrelation • corr=autocorr(phone);

More Related