Chapter - 1 - Image Enhancement (Spatial & Freq. Domain)
Chapter - 1 - Image Enhancement (Spatial & Freq. Domain)
Image Enhancement
104
62 Pivel Gvy Levl
Iransfornation 05
T)
Tír)
White
White
Black
Black
transformations.
Figure 6.1: Image grey level
While
White
Image negatives
The negative of an image with grey levels in the range (0, L 1] is obtained by using
the negative transformation given by the expression:
s = L-1-r (6.3)
e Pixel Grey Level Transforimation 107
White White
T)=L-1-r
Black Black
T) Black
Black
A B L-1
B L-1 Black White
A
Black White (b)
(a)
Grey level shifting.
Figure 6.5: Examples of
1.0,
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1F
Logarithmic Transformation
by
The general form of such kind of transformation is given
s = clog(1+r)
0.9
)8
07
)6
05
0.4
0.3
0.2
0.1
200
150
100
50
0
50 100 150 200 250
Figure 6.10: Bit-plane sliced images: contribution of the MSB-plane (left) and that of the
rest of the bit planes (right).
Proccssing
63Mask Based
6.2.4
Image Averaging
Let us
consider a number of images of thec same objcct or scene. Generally the image
capturing process incorporates some amonnt of randon noise in cach of the captuired
images. That is the captured image fr. ) cotains noise n(r. n). Theefore, the
as
captured image can be represented
S(r.)= f(r.) +no.) (6.1)
rlr.y)=rry)=r(r. y) +
i=1 i=1 =1
ur. y) (65)
value is
This kind of filter is also called the mean filter, because each image grey
given image.
being replaced by the average grey value in its neighbourhood. Let, in a of size mxn.
window
Sry represents the set of coordinates in a rectangular subimage
of
centred at the point (T,y). The mean filtering process computes the average value
can be done as
the corrupted image f(, y) within the area defined by Su This
1 (6.0)
g(0,y) = f(s,t)
(s, t)¬Sy
X
(a) 2D image with mask
y) fx+l,
flr+l,y-1) fo+1, y+1)
5 6 63
(s,t)
(s,t)¬Sa y
(a) Original moon image (b) Laplacian response (c) Sharpened moon image
Figure 6.15: Image of moon.
To sharpen the original image, we need to superimpose the Laplacian output with
the original one. This can be done by adding or subtracting the Laplacian response
with the original image elements. The relations used for this purpose may be written
as
f(z, y) V'f(z, y)
g(z, u) = f(z,y) + Vf(z,y)
If the definition of Laplacian uses a negative centre coefficient, we need to subtract,
otherwise an addition is needed. Combining these operations (Laplacian followed by
ad /subtract) we may derive the following sharpening operators:
0 1 0-1 0
1 -51 Or -1 5 -1
0 10 0 -1 0
Or
1 1 1 -1 -1 -1
1 -9 1 Or -1 -1
1 1|1 -1 -1 -1
|18 Image Enhancemet
t
Logarithmic
n t r
h o o t
scale
Output
gray Lincar
" power
Smin
max
min
Input gray scale
Figure 6.22: General image contrast stretching.
A low pass filter is used, in general, to smooth an image. As it is known that the lower
frequency spectrum of a Fourier transform contains the average image intensities and
high frequency components signify sharp variations, we can develop a low pass filter
to eliminate the high frequency components. A suitable threshold is also required to
be determined.
An ideal low pass filter transfer function can be described by the following relation
1 if Vu? + y2<Do
H(u, v) = 0 otherwise
(6.41)
> D(u,v)
0 Do
(a) Frequency response (b) Functional form
response is half of its maximum alue (i.e. 50%) (Figure 6.24). If instead of !
the we can use the following relationg:
want to get a cut-off frequency response of
1
H(u,v) = D
2n (6.43)
1+(V2-1)(Do
Or 1
H({u,v) = 2n (6.4)
1+0.414()
Do
H(u,
v)
Hu, v)
+ D(u, v)
(a) Frequency response (b) Functional form
Do D(u, v)
0
Or
1+
+(Va-)()
1
H(u,v) 2n (6.48)
1+0.414(o
D
134
Hu
v)
Image Enhancement
Du, v)
(a) Frequcncy response (b) Functional form
1 if Vu? + v²>D,
H(u, v) = 1 if V? + v2< D2
(6.49)
0 otherwise
where, D, = /u?+ , fori= 1,2, are the threshold frequencies and are representing
distance of the points (ui, v;) fron the origin of the frequency plane (Figure 6.27).
(650)
G(u) = A exp 2g2
6.6 GaIAsian Ilters
D, D, Du. v)