0% found this document useful (0 votes)
10 views3 pages

Seminar Report

Uploaded by

Sanket Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

Seminar Report

Uploaded by

Sanket Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

5.3.

3 Adaptive Filters
Once selected,the filters discussed thus far are applied to an image without regard
for how image characteristics vary from one point to another. In this section we
take a look at two adaptive filters whose behavior changes based on statistical
characteristics of the image inside the filter region defined by the m * n
rectangular window Sxy. As the following discussion shows, adaptive filters are
capable of performance superior to that of the filters discussed thus far. The
price paid for improved filtering power is an increase in filter complexity. Keep
in mind that we still are dealing with the case in which the degraded image is
equal to the original image plus noise. No other types of degradations are being
considered yet. Adaptive, local noise reduction filter
The simplest statistical measures of a random variable are its mean and
variance.These are reasonable parameters on which to base an adaptive filter
because they are quantities closely related to the appearance of an image. The mean
gives a measure of average intensity in the region over which the mean is computed,
and the variance gives a measure of contrast in that region.
Our filter is to operate on a local region, Sxy. The response of the filter at any
point (x, y) on which the region is centered is to be based on four quantities: (a)
g(x, y), the value of the noisy image at (x, y); (b) s2h, the variance of the noise
corrupting f(x, y) to form g(x, y); (c) mL, the local mean of the pixels in Sxy;
and (d) s2L, the local variance of the pixels in Sxy. We want the behavior of the
filter to be as follows:
If s2h is zero, the filter should return simply the value of g(x, y).This is the
trivial, zero-noise case in which g(x, y) is equal to f(x, y).
If the local variance is high relative to s2h, the filter should return a value
close to g(x, y).A high local variance typically is associated with edges,and these
should be preserved.
If the two variances are equal, we want the filter to return the arithmetic mean
value of the pixels in Sxy. This condition occurs when the local area has the same
properties as the overall image, and local noise is to be reduced simply by
averaging.
N
An adaptive expression for obtaining f(x, y) based on these assumptions may be
written as
fN(x, y) = g(x, y) - s2Lh Cg(x, y) - mLD (5.3-12) s2
The only quantity that needs to be known or estimated is the variance of the
overall noise, s2h. The other parameters are computed from the pixels in Sxy at
each location (x, y) on which the filter window is centered.A tacit assumption in
Eq. (5.3-12) is that s2h … s2L. The noise in our model is additive and position
independent, so this is a reasonable assumption to make because Sxy is a subset of
g(x, y). However, we seldom have exact knowledge of s2h. Therefore, it is possible
for this condition to be violated in practice. For that reason,a test should be
built into an implementation of Eq.(5.3-12) so that the ratio is set to 1 if the
condition s2h 7 s2L occurs. This makes this filter nonlinear. However, it prevents
nonsensical results (i.e., negative intensity levels, depending on the value of mL)
due to a potential lack of knowledge about the variance of the image noise.Another
approach is to allow the negative values to occur,and then rescale the intensity
values at the end.The result then would be a loss of dynamic range in the image.

will cause the ratio of the variances to be clipped at 1.0, and the algorithm will
subtract the mean from the image more frequently than it would normally. If
negative values are allowed and the image is rescaled at the end, the result will
be a loss of dynamic range, as mentioned previously. ■
Adaptive median filter
The median filter discussed in Section 5.3.2 performs well if the spatial density
of the impulse noise is not large (as a rule of thumb, Pa and Pb less than 0.2). It
is shown in this section that adaptive median filtering can handle impulse noise
with probabilities larger than these. An additional benefit of the adaptive median
filter is that it seeks to preserve detail while smoothing nonimpulse noise,
something that the “traditional” median filter does not do. As in all the filters
discussed in the preceding sections, the adaptive median filter also works in a
rectangular window area Sxy. Unlike those filters, however, the adaptive median
filter changes (increases) the size of Sxy during filter operation, depending on
certain conditions listed in this section. Keep in mind that the output of the
filter is a single value used to replace the value of the pixel at (x, y), the
point on which the window Sxy is centered at a given time.
Consider the following notation:
zmin = minimum intensity value in Sxy
zmax = maximum intensity value in Sxy
zmed = median of intensity values in Sxy
zxy = intensity value at coordinates (x, y)
Smax = maximum allowed size of Sxy
The adaptive median-filtering algorithm works in two stages, denoted stage A and
stage B, as follows:
The key to understanding the mechanics of this algorithm is to keep in mind that it
has three main purposes: to remove salt-and-pepper (impulse) noise, to provide
smoothing of other noise that may not be impulsive,and to reduce distortion,such as
excessive thinning or thickening of object boundaries.The values zmin and zmax are
considered statistically by the algorithm to be “impulse-like”noise components,
even if these are not the lowest and highest possible pixel values in the image.
With these observations in mind, we see that the purpose of stage A is to determine
if the median filter output, zmed, is an impulse (black or white) or not.If the
condition zmin 6 zmed 6 zmax holds, then zmed cannot be an impulse for the reason
mentioned in the previous paragraph. In this case, we go to stage B and test to see
if the point in the center of the window, zxy, is itself an impulse (recall that
zxy is the point being processed). If the condition B1 7 0 AND B2 6 0 is true, then
zmin 6 zxy 6 zmax, and zxy cannot be an impulse for the same reason that zmed was
not. In this case, the algorithm outputs the unchanged pixel value, zxy. By not
changing these “intermediate-level” points, distortion is reduced in the image. If
the condition B1 7 0 AND B2 6 0 is false, then either zxy = zmin or zxy = zmax. In
either case, the value of the pixel is an extreme value and the algorithm outputs
the median value zmed, which we know from stage A is not a noise impulse.The last
step is what the standard median filter does.The problem is that the standard
median filter replaces every point in the image by the median of the corresponding
neighborhood. This causes unnecessary loss of detail.
Continuing with the explanation, suppose that stage A does find an impulse (i.e.,
it fails the test that would cause it to branch to stage B).The algorithm then
increases the size of the window and repeats stage A.This looping continues until
the algorithm either finds a median value that is not an impulse (and branches to
stage B),or the maximum window size is reached.If the maximum window size is
reached, the algorithm returns the value of zmed. Note that there is no guarantee
that this value is not an impulse.The smaller the noise probabilities Pa and or >
Pb are,or the larger Smax is allowed to be,the less likely it is that a premature
exit condition will occur.This is plausible.As the density of the impulses
increases,it stands to reason that we would need a larger window to “clean up”the
noise spikes.
Every time the algorithm outputs a value,the window Sxy is moved to the next
location in the image.The algorithm then is reinitialized and applied to the pixels
in the new location. As indicated in Problem 3.18, the median value can be updated
iteratively using only the new pixels,thus reducing computational load.

a b c
FIGURE 5.14 (a) Image corrupted by salt-and-pepper noise with probabilities Pa = Pb
= 0.25. (b) Result of filtering with a 7 * 7 median filter. (c) Result of adaptive
median filtering with Smax = 7.
5.4 ■ Periodic Noise Reduction by Frequency Domain Filtering
Considering the high level of noise in Fig. 5.14(a), the adaptive algorithm
performed quite well.The choice of maximum allowed window size depends on the
application, but a reasonable starting value can be estimated by experimenting with
various sizes of the standard median filter first. This will establish a visual
baseline regarding expectations on the performance of the adaptive algorithm. ■

You might also like