Chap 4 Image Enhancement in the Frequency Domain - PowerPoint PPT Presentation

1 / 63
About This Presentation
Title:

Chap 4 Image Enhancement in the Frequency Domain

Description:

Any periodic function can be expressed as the sum of sines and cosines of ... Remove or attenuate a band of frequencies. D0 is the radius. ... – PowerPoint PPT presentation

Number of Views:1458
Avg rating:3.0/5.0
Slides: 64
Provided by: Gon47
Category:

less

Transcript and Presenter's Notes

Title: Chap 4 Image Enhancement in the Frequency Domain


1
Chap 4 Image Enhancement in the Frequency Domain
2
Background
  • Any periodic function can be expressed as the sum
    of sines and cosines of different frequencies,
    each multiplied by a different coefficient.
  • We called this sum a Fourier series.
  • Even function that are not periodic can be
    expressed as the integral of sines and cosines
    multiplied by a weighting function.
  • This formation is the Fourier transform.

3
(No Transcript)
4
Periodic Function
  • A function f is periodic with period P greater
    than zero if
  • Af(x P) Af(x), where A denotes amplitude.
  • f(x) sinx, P 2p, frequency1/ 2p, A1.
  • f(x) Asinnx, P 2p/n, frequencyn/ 2 p.
  • n?, frequency?.

5
Fourier Series
  • Suppose f(x) is a function defined on the
    interval -p,p. The Fourier series expansion of
    f(x) is
  • where an and bn are constants called the Fourier
    coefficients, and

6
Coefficients of Any Period T 2L
  • Replace v by px/L to obtain the Fourier series of
    the function (x) of period 2L

7
Complex Fourier Series
  • Complex exponentials
  • According to Eulers formula
  • and so,
  • Using these two equations we can find the
    complex exponential form of the trigonometric
    functions as

8
Complex Fourier Series
9
Continuous Spectra
  • Consider the following function
  • Only a single pulse remains and the resulting
    function is no longer periodic. A function which
    is not periodic can be considered as a function
    with very large period.

10
Continuous Spectra
These two integrals form the conclusion of
Fouriers integral theorem.
11
Alternative Forms
  • Note that there are a number of alternative forms
    for Fourier transform, such as
  • The third form is popular in the field of signal
    processing and communications systems.

12
4.2 Fourier Transform in theFrequency Domain
  • Fourier transform F(u) of f(x) is defined as
  • The inverse Fourier Transform is
  • DFT for Discrete function f(x), x0,1,..M-1
  • for u0,1,..M-1
  • Inverse DFT

13
  • Eulers formula
  • Each term of the Fourier transform is composed of
    the sum of all values of the function f(x).
  • M2 summations and multiplications
  • The values of f(x) are multiplied by sines and
    cosines of various frequencies.
  • The domain (values of u) over which the values of
    F(u) range is appropriately called the frequency
    domain, because u determines the frequency of the
    components of the transform.
  • Each of the M terms of F(u) is called a frequency
    component of the transform.

14
Complex Spectra
  • In general, the components of Fourier transform
    are complex quantities in the following form
  • F(u) R(u) jI(u)
  • and can be written as
  • F(u) F(u)ej?(u)
  • The spectra is usually represented by the
    amplitude of a specific frequency
  • Amplitude or spectrum of Fourier transform
  • F(u) (R2(u)I2(u))1/2

15
Complex Spectra
  • These complex coefficients couples
  • Amplitude spectrum value
  • Magnitude of each of the harmonic components.
  • Phase spectrum value
  • The phase of each harmonic relative to the
    fundamental harmonic frequency ?0.

16
The frequency spectrum is centered at 0. To
visual easily, we sometimes multiply f(x) by
(-1)x before applying the transform.
17
Why (-1)x?
18
4.2.2 The Two-dimensional Discrete Fourier
Transform (DFT)
  • 2D-DFT of f(x, y) of size M?N
  • Inverse 2-D DFT

19
  • Modulation in the space domain
  • F(-1)xyf(x, y) F(u-M/2,v-N/2)
  • Shift the origin of F(u,v) to frequency
    coordinates (M/2, N/2),
  • the center of (u, v), u0,M-1, v0,N-1.
  • frequency rectangle
  • Average of f(x,y)
  • For real f(x,y)
  • F(u, v) F(-u, -v)
  • F(u, v) F(-u, -v)
  • The spectrum of the Fourier transform is
    symmetric.

20
Implementation
21
4.2.3 Filtering in the Frequency Domain
  • What is the frequency of an image?
  • Since frequency is directly related rate of
    change, it is not difficult intuitively to
    associate frequencies with pattern of intensity
    variations in an image.
  • The low frequencies correspond to the slowly
    varying components of an image.
  • The higher frequencies begin to correspond to
    faster and faster gray level changes in the
    image.
  • such as edges.
  • F(0, 0) the average gray level of an image.

22
(No Transcript)
23
Filtering steps
  • Multiply the input image by (-1)xy to center the
    transform.
  • Compute DFT F(u, v)
  • Multiply F(u,v) by a filter function H(u,v)
  • G(u,v) F(u,v)H(u,v)
  • Computer the inverse DFT of G(u,v)
  • Obtain the real part of g(x,y)
  • Multiply g(x,y) with (-1)xy

24
(No Transcript)
25
Notch filter H(u,v) 0 if (u,v) (M/2, N/2),
H(u,v) 1 otherwise
26
Lowpass filter Highpass filter
27
4.2.4 Filtering in spatial and frequency domains
  • The discrete convolution f(x,y)h(x,y)
  • f(x,y)h(x,y) ? F(u,v)H(u,v)
  • f(x,y)h(x,y) ? F(u,v)H(u,v)

28
(No Transcript)
29
4.3 Smoothing Frequency-Domain Filters
  • Frequency-Domain Filtering
  • G(u,v) H(u,v)F(u,v)
  • Filter H(u,v)
  • Ideal filter
  • Butterworth filter
  • Gaussian Filter

30
4.3.1 Ideal Low pass filter
  • H(u,v) 1 if D(u,v) ? D0
  • 0 if D(u,v) gt D0
  • The center is at (u,v)(M/2, N/2)
  • D(u,v)(u-M/2)2 (v-N/2)21/2
  • Cutoff frequency is D0
  • Power estimate
  • The percentage a of power enclosed in the circle
    is

31
(No Transcript)
32
(No Transcript)
33
  • The blurring in this image is a clear indication
    that most of the sharp detail information in the
    picture is contained in the 8 power removed by
    the filter.
  • The result of a 99.5 is quite close to the
    original, indicating little edge information is
    contained in the upper 0.5 of the spectrum power.

34
(No Transcript)
35
4.3.2 Butterworth Lowpass Filter
  • Butterworth lowpass filter (BLPF) of order n
  • At the frequency as an half of the cutoff
    frequency D0, H(u, v)0.5.

36
4.3.2 Butterworth Lowpass Filter
37
4.3.2 Butterworth Lowpass Filter
38
4.3.2 Butterworth Lowpass Filter
39
4.3.3 Gaussian Lowpass Filter
  • Gaussian filter
  • Let ?D0
  • When D(u, v)D0 , H(u, v)0.667

40
4.3.3 Gaussian Lowpass Filter
41
4.3.3 Gaussian Lowpass Filter
42
4.3.4 Other Lowpass filtering examples
43
4.3.4 Other Lowpass filtering examples
44
4.4 Sharpening Frequency-Domain Filter
  • Highpass filtering
  • Hhp(u,v)1-Hlp(u,v)
  • Given a lowpass filter Hlp(u,v), find the spatial
    representation of the highpass filter
  • Compute the inverse DFT of Hlp(u,v)
  • Multiply the real part of the result with (-1)xy

45
4.4 Sharpening Frequency-Domain Filter
46
4.4 Sharpening Frequency-Domain Filter
47
4.4.1 Ideal Highpass Filter
  • H(u,v)0 if D(u,v)?D0
  • 1 if D(u,v)gtD0
  • The center is at (u,v)(M/2, N/2)
  • D(u,v)(u-M/2)2(v-N/2)21/2
  • Cutoff frequency is D0

48
4.4.1 Ideal Highpass Filter
49
4.4.2 Butterworth Highpass Filter
  • Butterworth filter has no sharp cutoff
  • At cutoff frequency D0 H(u, v)0.5

50
4.4.2 Butterworth Highpass Filter
51
4.4.3 Gaussian Highpass Filter
  • Gaussian highpass filter (GHPF)
  • Let ?D0

52
4.4.3 Gaussian Highpass Filter
53
5.4 Periodic Noise Reduction by Frequency Domain
Filtering
  • Periodic noise is due to the electrical or
    electromechanical interference during image
    acquisition.
  • Can be estimated through the inspection of the
    Fourier spectrum of the image.

54
Periodic Noise Reduction by Frequency Domain
Filtering
55
5.4 Periodic Noise Reduction by Frequency Domain
Filtering
  • Bandreject filters
  • Remove or attenuate a band of frequencies.
  • D0 is the radius.
  • D(u, v) is the distance from the origin, and
  • W is the width of the frequency band.

56
Butterworth and Gaussian Bandreject Filters
  • Butterworth bandreject filter (order n)
  • Gaussian band reject filter

57
Bandreject Filters
58
Bandpass filter
  • Obtained form bandreject filter
  • Hbp(u,v)1-Hbr(u,v)
  • The goal of the bandpass filter is to isolate the
    noise pattern from the original image, which can
    help simplify the analysis of noise, reasonably
    independent of image content.

59
Result of The BandPass Filter
60
5.4.3 Notch filters
  • Notch filter rejects (passes) frequencies in
    predefined neighborhoods about a center
    frequency.
  • where

61
5.4.3 Notch filters
  • Butterworth notch filter
  • Gaussian notch filter
  • Note that these notch filters will become
    highpass when u0v00

62
Notch filters
63
Example 5.8
Use 1-D Notch pass filter to find the horizontal
ripple noise
Write a Comment
User Comments (0)
About PowerShow.com