Resmi N.G. Reference: Digital Signal Processing Rafael C. Gonzalez Richard E. Woods
Frequency Domain Methods Basics of filtering in frequency domain Basic Filters and Properties
Notch filter Lowpass Filter Highpass Filter
Smoothing Frequency Domain Filters
Ideal Lowpass Filters Butterworth Lowpass Filters Gaussian Lowpass Filters
Sharpening Frequency Domain Filters
Ideal Highpass Filters Butterworth Highpass Filters Gaussian Highpass Filters Enhancement using The Laplacian Unsharp Masking High Boost Filtering High-Frequency Emphasis Filtering
Homomorphic Filtering 3/20/2012
CS04 804B Image Processing - Module2
2
Basics of Filtering in Frequency Domain 1. Multiply the input image by (-1)x+y to center the transform. 2. Compute the DFT, F(u,v) of the resulting image. 3. Multiply F(u,v) by a filter function H(u,v) to obtain G (u,v). 4.Compute the inverse DFT of G(u,v) to obtain g*(x,y). 5. Obtain the real part of g*(x,y). 6. Multiply the result by (-1)x+y to obtain g (x,y). 3/20/2012
CS04 804B Image Processing - Module2
3
Basic Steps for Filtering in Frequency Domain
3/20/2012
CS04 804B Image Processing - Module2
4
Frequency Domain Methods Basics of filtering in frequency domain Basic Filters and Properties
Notch filter Lowpass Filter Highpass Filter
Smoothing Frequency Domain Filters
Ideal Lowpass Filters Butterworth Lowpass Filters Gaussian Lowpass Filters
Sharpening Frequency Domain Filters
Ideal Highpass Filters Butterworth Highpass Filters Gaussian Highpass Filters Enhancement using The Laplacian Unsharp Masking High Boost Filtering High-Frequency Emphasis Filtering
Homomorphic Filtering 3/20/2012
CS04 804B Image Processing - Module2
5
Basic Filters and Properties Notch Filter It is a constant function with a hole at the origin. Sets F(0,0) to zero. Lowpass Filter It attenuates high frequencies and passes low frequencies. Highpass Filter It attenuates low frequencies and passes high frequencies. 3/20/2012
CS04 804B Image Processing - Module2
6
Frequency Domain Methods Basics of filtering in frequency domain Basic Filters and Properties
Notch filter Lowpass Filter Highpass Filter
Smoothing Frequency Domain Filters
Ideal Lowpass Filters Butterworth Lowpass Filters Gaussian Lowpass Filters
Sharpening Frequency Domain Filters
Ideal Highpass Filters Butterworth Highpass Filters Gaussian Highpass Filters Enhancement using The Laplacian Unsharp Masking High Boost Filtering High-Frequency Emphasis Filtering
Homomorphic Filtering 3/20/2012
CS04 804B Image Processing - Module2
7
Smoothing Frequency Domain Filters Low Pass Filter (Smoothing Filter) The result in the spatial domain is equivalent to that of a smoothing filter as the blocked high frequencies correspond to sharp intensity changes, i.e. to the finescale details and noise in the spatial domain image.
3/20/2012
CS04 804B Image Processing - Module2
8
3/20/2012
CS04 804B Image Processing - Module2
9
High Pass Filter(Sharpening Filter) A highpass filter attenuates the low-frequency components without disturbing the high frequency information in the Fourier Transform. It yields edge enhancement or edge detection in the spatial domain, because edges contain many high frequencies. Areas of constant gray level consist mainly of low frequencies and are therefore suppressed. 3/20/2012
CS04 804B Image Processing - Module2
10
3/20/2012
CS04 804B Image Processing - Module2
11
Band Pass Filter
A bandpass filter attenuates very low and very high frequencies, but retains a middle range band of frequencies. Bandpass filtering can be used to enhance edges (suppressing low frequencies) while reducing the noise(attenuating high frequencies).
Bandpass filter is a combination of both lowpass and highpass filters. These filters attenuate all frequencies below a specific frequency and above a specific frequency, while retaining the frequencies between the two cut-offs.
3/20/2012
CS04 804B Image Processing - Module2
12
Frequency Domain Methods Basics of filtering in frequency domain Basic Filters and Properties
Notch filter Lowpass Filter Highpass Filter
Smoothing Frequency Domain Filters
Ideal Lowpass Filters Butterworth Lowpass Filters Gaussian Lowpass Filters
Sharpening Frequency Domain Filters
Ideal Highpass Filters Butterworth Highpass Filters Gaussian Highpass Filters Enhancement using The Laplacian Unsharp Masking High Boost Filtering High-Frequency Emphasis Filtering
Homomorphic Filtering 3/20/2012
CS04 804B Image Processing - Module2
13
Ideal Low Pass Filters Transfer Function 1 if D (u, v) ≤ D0 H (u, v) = 0 if D (u, v) > D0 D0 is a specified non − negative quantity. D(u,v)is the distance from point (u,v)to the origin of the frequency rectangle. N M + v− D(u, v) = u − 2 2
(
3/20/2012
2
) (
CS04 804B Image Processing - Module2
)
2
1
2
14
Ideal – because all frequencies inside a circle of radius D0
are passed without any attenuation, whereas all frequencies outside the circle are completely attenuated. The point of transition between H(u,v) = 1 and H(u,v) = 0
is called the cut-off frequency.
3/20/2012
CS04 804B Image Processing - Module2
15
3/20/2012
CS04 804B Image Processing - Module2
16
Ideal Low pass Filter
Produces “Ringing” effect. Cannot be realized in electronic components. Not very Practical
3/20/2012
CS04 804B Image Processing - Module2
17
Butterworth Low Pass Filters The transfer function of a BLPF of order n, and with cut-
off frequency at a distance D0 from the origin, is defined as 1 H (u, v) =
=
D (u , v) 1+ D 0
1 N M u v − + − 2 2 1+ 2 D0
(
3/20/2012
2n
2
) (
CS04 804B Image Processing - Module2
)
2
n
18
3/20/2012
CS04 804B Image Processing - Module2
19
Provides a smooth transition between low and high
frequencies. Butterworth filter of order 1 has neither ringing nor
negative values. BLPF of order 2 has mild ringing and small negative
values. Reduced ringing effect than ILPF.
3/20/2012
CS04 804B Image Processing - Module2
20
Gaussian Low Pass Filters − D 2 ( u ,v )
H (u , v) = e
2σ 2
D(u,v)is the distance from the origin of the Fourier Transform. σ is a measure of the spread of the Gaussian curve. When σ = D0 , − D 2 ( u ,v )
H (u , v) = e
2 D02
where D0 is the cut − off frequency. 3/20/2012
CS04 804B Image Processing - Module2
21
When D(u , v) = 0, H (u , v) = 1 − D0 2
When D(u , v) = D0 , H (u , v) = e 3/20/2012
CS04 804B Image Processing - Module2
2 D0 2
=e
−1
2
= 0.607 22
Gaussian Low Pass Filters Very smooth filter function. Inverse DFT of the Gaussian lowpass filter is Gaussian. No “Ringing” effect.
3/20/2012
CS04 804B Image Processing - Module2
23
Applications of Low Pass Filters In the field of machine perception Character Recognition In printing and publishing industry. Cosmetic processing prior to printing For processing satellite and aerial images.
3/20/2012
CS04 804B Image Processing - Module2
24
Frequency Domain Methods Basics of filtering in frequency domain Basic Filters and Properties
Notch filter Lowpass Filter Highpass Filter
Smoothing Frequency Domain Filters
Ideal Lowpass Filters Butterworth Lowpass Filters Gaussian Lowpass Filters
Sharpening Frequency Domain Filters
Ideal Highpass Filters Butterworth Highpass Filters Gaussian Highpass Filters Enhancement using The Laplacian Unsharp Masking High Boost Filtering High-Frequency Emphasis Filtering
Homomorphic Filtering 3/20/2012
CS04 804B Image Processing - Module2
25
Sharpening Frequency Domain Filters Ideal High Pass Filters Transfer Function of high pass filter is given by
H hp (u , v) = 1 − H lp (u , v) H lp (u , v) is thetransfer function of corresponding low pass filter. That is, when low pass filter attenuates frequencies, high
pass filter passes them and vice versa. 3/20/2012
CS04 804B Image Processing - Module2
26
Opposite of ideal lowpass filter.
0 if D(u, v) ≤ D0 H (u , v) = 1 if D (u, v) > D0 Sets to zero all frequencies inside a circle of radius D0
while all frequencies outside the circle are passed without attenuation. Not physically realizable with electronic components. Produces ringing effect. 3/20/2012
CS04 804B Image Processing - Module2
27
3/20/2012
CS04 804B Image Processing - Module2
28
D0 = 15,30,80 3/20/2012
CS04 804B Image Processing - Module2
29
Butterworth High Pass Filter H (u , v) =
3/20/2012
1 D0 1+ D u v ( , )
CS04 804B Image Processing - Module2
2n
30
D0 = 15,30,80
Represents a transition between the sharpness of IHPF and
the total smoothness of Gaussian filter. 3/20/2012
CS04 804B Image Processing - Module2
31
Gaussian High Pass Filter − D 2 ( u ,v )
H (u , v) = 1 − e
3/20/2012
2 D0 2
CS04 804B Image Processing - Module2
32
D0 = 15,30,80
3/20/2012
CS04 804B Image Processing - Module2
33
Frequency Domain Methods Basics of filtering in frequency domain Basic Filters and Properties
Notch filter Lowpass Filter Highpass Filter
Smoothing Frequency Domain Filters
Ideal Lowpass Filters Butterworth Lowpass Filters Gaussian Lowpass Filters
Sharpening Frequency Domain Filters
Ideal Highpass Filters Butterworth Highpass Filters Gaussian Highpass Filters Enhancement using The Laplacian Unsharp Masking High Boost Filtering High-Frequency Emphasis Filtering
Homomorphic Filtering 3/20/2012
CS04 804B Image Processing - Module2
34
Enhancement using The Laplacian d n f ( x) n ( ) ℑ = ju F (u ) n dx d 2 f ( x, y ) d 2 f ( x, y ) 2 2 ℑ + = ( ju ) F (u , v) + ( jv) F (u, v) 2 2 dy dx = −(u 2 + v 2 ) F (u , v) d 2 f ( x, y ) d 2 f ( x, y ) is the Laplacian of f ( x, y ). + 2 2 dx dy 3/20/2012
CS04 804B Image Processing - Module2
35
∴ℑ ∇ 2 f ( x, y ) = −(u 2 + v 2 ) F (u , v) Laplacian can be implemented in the frequency domain using the filter , H (u, v) = −(u 2 + v 2 ). 2 2 N M + v− H (u , v) = − u − ( shifted ) 2 2 The Laplacian filtered image in the spatial domain is obtained by computing the inverse Fourier Transform of H (u , v) F (u , v) :
) (
(
)
2 2 N M ( , ) ∇ f ( x, y ) = ℑ − u − + v− F u v 2 2 2
3/20/2012
−1
(
) (
CS04 804B Image Processing - Module2
)
36
Unsharp Masking and High Boost Filtering High pass filters eliminate the zero frequency component
of their Fourier transforms and hence average background intensity reduces to near black. Solution: Add a portion of the image back to the filtered
result. Enhancement using Laplacian adds the entire image back
to the filtered result. 3/20/2012
CS04 804B Image Processing - Module2
37
Unsharp masking consists of generating a sharp image by
subtracting a blurred version of an image from itself. That is, obtaining a highpass-filtered image by subtracting
from the image a lowpass-filtered version of itself.
f hp ( x, y ) = f ( x, y ) − flp ( x, y ) High-boost filtering generalizes this by multiplying f(x,y)
by a constant A≥1.
f hp ( x, y ) = Af ( x, y ) − flp ( x, y )
3/20/2012
CS04 804B Image Processing - Module2
38
High-boost filtering thus increases the contribution made
by the image to the overall enhanced result. When A=1, high-boost filtering reduces to regular
highpass filtering.
3/20/2012
CS04 804B Image Processing - Module2
39
High Frequency Emphasis Filtering To increase the contribution made by high-frequency
components of an image. Multiply a highpass filter function by a constant and add
an offset so that the zero frequency term is not eliminated by the filter. Filter transfer function is given by
H hfe (u , v) = a + bH hp (u , v) Where a ≥0 and b>a. 3/20/2012
CS04 804B Image Processing - Module2
40
Module 2 Assignment Explain the following point operations: Contrast Stretching Range Compression Image Clipping Explain Homomorphic Filtering. Explain Convolution and Correlation Theorems.
3/20/2012
CS04 804B Image Processing - Module2
41
Thank You
3/20/2012
CS04 804B Image Processing - Module2
42