# Explain the Adaptive Filters.

1 month ago

Adaptive filters are filters whose behavior changes based on statistical characteristics of the image inside the filter region defined by the m X n rectangular window S_{xy.}

### 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 filler because they are quantities closely related to the appearance of an image. The mean gives a measure of average gray level in the region over which the mean is computed, and the variance gives a measure of average contrast in that region.

This filter is to operate on a local region, S_{xy}. 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) a2, the variance of the noise corrupting /(x, y) to form g(x, y); (c) ray, the local mean of the pixels in S_{xy}; and (d) σ^{2}_{L} , the local variance of the pixels in S_{xy}.

The behavior of the filter to be as follows:

- If σ
^{2}_{η}is zero, the filler 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 σ
^{2}_{η}the filter should return a value close to g (x, y). A high local variance typically is associated with edges, and these should be - If the two variances are equal, we want the filter to return the arithmetic mean value of the pixels in S
_{xy}. This condition occurs when the local area has the same properties as the overall image, and local noise is to be reduced simply by

Adaptive local noise filter is given by,

The only quantity that needs to be known or estimated is the variance of the overall noise, a2. The other parameters are computed from the pixels in S_{xy} at each location (x, y) on which the filter window is centered.

### Adaptive median filter:

** **

The median filter performs well as long as the spatial density of the impulse noise is not large (as a rule of thumb, P_{a} and P_{b} less than 0.2). The adaptive median filtering can handle impulse noise with probabilities even 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. The adaptive median filter also works in a rectangular window area S_{xy}. Unlike those filters, however, the adaptive median filter changes (increases) the size of S_{xy} during filter operation, depending on certain conditions. The output of the filter is a single value used to replace the value of the pixel at (x, y), the particular point on which the window S_{xy} is centered at a given time.

Consider the following notation:

z_{min} = minimum gray level value in S_{xy}

*z*_{max} = maximum gray level value in S_{xy}

z_{mcd} = median of gray levels in S_{xy}

z_{xy} = gray level at coordinates (x, y)

S_{max} = maximum allowed size of S_{xy}.

The adaptive median filtering algorithm works in two levels, denoted level A and level B, as follows:

**Level A: **A1 = z_{med} - z_{min}

A2 = zmed - zmax If A1 > 0 AND A2 < 0, Go to level B Else increase the window size

If window size ≤ S_{max} repeat level A Else output z_{xy}

**Level B**: B1 = z_{xy} - z_{min}

## B2 = z_{xy} - z_{max}

If B1> 0 AND B2 < 0, output zxy Else output z_{med}

###### Raju Singhaniya

Oct 15, 2021