Overview of Image Processing
63
characteristics of the actual image and its histogram, one can apply generic
operators for contrast enhancement. For example, the mapping
y = 2~5 [1 - cos (~~)]
(2.8)
results in the stretching of the mid-level gray values and compression of the extremes. The result is illustrated in Fig. 2.7. Notice that the contrast modification
curve given by the above expression is nonlinear.
2.5.2
Geometric Operations
Geometric operations involve modification of pixel gray values based not only
on the individual pixel value but also on the pixel values in its neighborhood.
In the extreme case, each new pixel value is a function of all pixel values in the
original image.
2.5.2.7
Linear Filters
The simplest and most common operation is linear finite impulse response
(FIR) filtering. Given an image I(m, n), a linear FIR filtered version J(m, n) is
obtained through the operation
J(m, n) = L L h(k,l)I(m - k, n -l) ,
(2.9)
k,fEA
where A is a finite set of paired indices. It is the finite support of the weighting
sequence h(k, l) that gives the name finite impulse response filtering, that is,
h(k, l) = 0 for (k, l) i A. Most often A is symmetric and square. In other
words, it is of the form
A = {(m, n) : -P ::::: m ::::: P, -P ::::: n ::::: P} .
(2.10)
However, other geometries are also possible for A. Thus, as seen from (2.9),
at any pixel location (m, n), the linear filtered output is a weighted sum of the
input pixels at (m, n)and a local neighborhood as determined by A. The filter
form given in (2.9) is not only linear but is also space-invariant, that is, the filter
coefficients h(k, l)are independent of the pixel location (m, n). It is possible to
have coefficients that are dependent on pixel location in which case the filter
becomes space varying (Gonzalez and Woods 1992).
A particularly simple example of linear filtering is smoothing. Suppose we
average the values of an image over a 3 x 3 window, that is we have
{
1/9
h(k,l) =
0
-1:::::k,l:::::1
otherwise
(2.11)
63
characteristics of the actual image and its histogram, one can apply generic
operators for contrast enhancement. For example, the mapping
y = 2~5 [1 - cos (~~)]
(2.8)
results in the stretching of the mid-level gray values and compression of the extremes. The result is illustrated in Fig. 2.7. Notice that the contrast modification
curve given by the above expression is nonlinear.
2.5.2
Geometric Operations
Geometric operations involve modification of pixel gray values based not only
on the individual pixel value but also on the pixel values in its neighborhood.
In the extreme case, each new pixel value is a function of all pixel values in the
original image.
2.5.2.7
Linear Filters
The simplest and most common operation is linear finite impulse response
(FIR) filtering. Given an image I(m, n), a linear FIR filtered version J(m, n) is
obtained through the operation
J(m, n) = L L h(k,l)I(m - k, n -l) ,
(2.9)
k,fEA
where A is a finite set of paired indices. It is the finite support of the weighting
sequence h(k, l) that gives the name finite impulse response filtering, that is,
h(k, l) = 0 for (k, l) i A. Most often A is symmetric and square. In other
words, it is of the form
A = {(m, n) : -P ::::: m ::::: P, -P ::::: n ::::: P} .
(2.10)
However, other geometries are also possible for A. Thus, as seen from (2.9),
at any pixel location (m, n), the linear filtered output is a weighted sum of the
input pixels at (m, n)and a local neighborhood as determined by A. The filter
form given in (2.9) is not only linear but is also space-invariant, that is, the filter
coefficients h(k, l)are independent of the pixel location (m, n). It is possible to
have coefficients that are dependent on pixel location in which case the filter
becomes space varying (Gonzalez and Woods 1992).
A particularly simple example of linear filtering is smoothing. Suppose we
average the values of an image over a 3 x 3 window, that is we have
{
1/9
h(k,l) =
0
-1:::::k,l:::::1
otherwise
(2.11)
