Unit-3 Part2
Unit-3 Part2
INTRODUCTION
The spatial domain refers to the image plane itself, and approaches in this category are based on direct
manipulation of pixels in an image. Frequency domain processing techniques are based on modifying
the Fourier transform of an image. The term spatial domain refers to the aggregate of pixels composing
an image and spatial domain methods are procedures that operate directly on these pixels. Image
processing function in the spatial domain may he expressed as
Ideal LPF
Butterworth LPF
Gaussian LPF
1 D(u, v) D0
H (u, v)
0 D(u, v) D0
where D is a specified nonnegative quantity, and D(u, v) is the distance from point (u, v) to the origin of
the frequency plane; that is,
Fig.4.10 (a) shows a 3-D perspective plot of H (u, v) u a function of u and v. The name ideal filter
indicates that all frequencies inside a circle of radius D o are passed with no attenuation, whereas all
frequencies outside this circle are completely attenuated. The low pass filters are radically symmetric
about the origin.
For an ideal low pass filter cross section, the point of transition between H (u, v) = 1 and H (u, v) = 0 is
often called the cutoff frequency.
In the case of Fig.4.10 (b), for example, the cutoff frequency is D o. As the cross section is rotated about
the origin, the point Do traces a circle giving a locus of cutoff frequencies, all of which are a distance D o
from the origin. The cutoff frequency concept is quite useful in specifying filter characteristics. It also
serves as a common base for comparing the behavior of different types of filters. The sharp cutoff
frequencies of an ideal low pass filter cannot be realized with electronic components, although they can
certainly be simulated in a computer.
The inverse transform of H(u,v) is h(x,y).
When h(x,y) is displayed as an image , we see that it has two distinctive characteristics: a dominant
component at the origin and concentric component about the centre. When we convolve this h(x,y) with
the image, we get the ringing effects since convolution is merely copying h(x,y) at every location. To be
precise, the centre component is responsible for blurring while the concentric circles are responsible for
the ringing effects.
Hence, as long as there are sharp cut-offs, their spatial representations will be sinc functions and hence
ringing effects will always be there. If Do increases, the sinc function becomes narrow and hence
ringing effects look more pronounced in the image.
In order to eliminate the ringing effects, we have to eliminate the sharp cutoffs in the frequency domain.
Hence, ideal filters are rarely used for low pass filtering.
Butterworth filter
The transfer function of the Butterworth low pass (BLPF) of order n and with cutoff frequency locus at a
distance Do, from the origin is defined by the relation
1
H (u, v)
1 D(u, v) / D0
2N
A perspective plot and cross section of the BLPF function are shown in fig. 4.14.
Unlike the ILPF, the BLPF transfer function does not have a sharp discontinuities and hence
there are no ringing effects present when a BLPF is used. But, as the order of the filter goes on
increasing, a small amount of ringing effect does creep in because the Butterworth low pass filter tends
be an ideal filter.
H (u, v) e D ( u ,v ) / 2 D0 2
2
where, D(u, v) is the distance from the origin of the Fourier transform.
Fig.4.4 (a) Perspective plot of a GLPF transfer function, (b) Filter displayed as an image, (c) Filter radial cross
sections for various values of Do.
where Do is the cutoff frequency. When D (u, v) = Do, the filter is down to 0.607 of its maximum value.
The response of the GLPF is similar to that of the BLPF but there are no ringing effects at all. The
Gaussian filter is the only filter that has no ripple and hence no ringing effect. The GLPF can be used to
remove jagged edges and “repair” broken characters.
Sharpening Frequency-domain filters
An image can be blurred by attenuating the high-frequency components of its Fourier transform.
Because edges and other abrupt changes in gray levels are associated with high-frequency components,
image sharpening can be achieved in the frequency domain by a high pass filtering process, which
attenuates the low-frequency components without disturbing high-frequency information in the Fourier
transform.
0 D(u, v) D0
H (u, v)
1 D(u, v) D0
where Do is the cutoff distance measured from the origin of the frequency plane. Fig. 4.5 shows a
perspective plot and cross section of the IHPF function. This filter is the opposite of the ideal low pass
filter, because it completely attenuates all frequencies inside a circle of radius D o while passing, without
attenuation, all frequencies outside the circle. As in the case of the ideal low pass filler, the IHPF is not
physically realizable.
Fig 4.5: perspective plot and cross section of the IHPF function
Like the ILPF, IHPFs are not suitable as there are ringing effects which cannot be eliminated.
Hence, IHPFs are rarely used for image high pass filtering.
Butter worth filters
The transfer function ion of the Butterworth high pass filter(BHPF) of order n and with cutoff frequency
locus at distance D0 from the origin is defined by the relation
1
H (u, v)
1 D0 / D(u, v)
2N
Fig.4.6 shows a perspective plot and cross section of the BHPF function. Note that when D (u, v) = D 0,
H(u, v) is down to ½ of its maximum value. As in the case of Butterworth low pass filter, common
practice is to select the cutoff frequency locus at points for which H (u, v) is down to 1/ 2 of its
maximum value.
Fig.4.6 shows a perspective plot and cross section of the BHPF function
The High pass Butterworth filter does not have a sharp cut off i.e., the transition is smooth and
hence there are no ringing effects.
Gaussian High pass Filters
The transfer function of the Gaussian high pass filter (GHPF) with cutoff frequency locus at a distance
Do from the origin is given by
The fig.4.7 shows a perspective plot, image, and cross section of the GHPF function.
Homomorphic filtering
The illumination-reflectance model can be used to develop a frequency domain procedure for improving
the appearance of an image by simultaneous gray-level range compression and contrast enhancement.
An image f(x, y) can be expressed as the product of illumination and reflectance components:
Equation above cannot be used directly to operate separately on the frequency components of
illumination and reflectance because the Fourier transform of the product of two functions is not
separable; in other words,
where Fi (u, v) and Fr (u, v) are the Fourier transforms of ln i(x, y) and ln r(x, y), respectively.
If we process Z (u, v) by means of a filter function H (u, v) then, from
where S (u, v) is the Fourier transform of the result. In the spatial domain,
Now we have
Finally, as z (x, y) was formed by taking the logarithm of the original image f (x, y), the inverse
(exponential) operation yields the desired enhanced image, denoted by g(x, y); that is,
The enhancement approach using the foregoing concepts is summarized in Fig. 4.9. This method is
based on a special case of a class of systems known as homomorphic systems. In this particular
application, the key to the approach is the separation of the illumination and reflectance components
achieved.
The homomorphic filter function H (u, v) can then operate on these components separately. The
illumination component of an image generally is characterized by slow spatial variations, while the
reflectance component tends to vary abruptly, particularly at the junctions of dissimilar objects.
These characteristics lead to associating the low frequencies of the Fourier transform of the logarithm of
an image with illumination and the high frequencies with reflectance.
Although these associations are rough approximations, they can be used to advantage in image
enhancement.
A good deal of control can be gained over the illumination and reflectance components with a
homomorphic filter. This control requires specification of a filter function H (u, v) that affects the low-
and high-frequency components of the Fourier transform in different ways.
Figure 4.10 shows a cross section of such a filter. If the parameters γL and γH are chosen so that γL< 1
and γH > 1, the filter function shown in Fig. 4.10 tends to decrease the contribution made by the low
frequencies (illumination) and amplify the contribution made by high frequencies (reflectance). The net
result is simultaneous dynamic range compression and contrast enhancement.
Fig.4.10 Cross section of a circularly symmetric filter function D (u. v) is the distance from the origin of the centered
transform.