Image sensors and transmission channels may produce certain type of noise characterized by random and isolated pixels with out-of-range gray levels, which are either much lower or higher than the gray levels of the neighboring pixels. Such noise can be treated as some impulses corresponding to high spatial frequencies.
For example, digital photos taken under low illumination have low signal-to-noise ratio and are characterized by such random noisy pixels.
The challenge of suppressing and removing such noise is to distinguish between this type of isolated and out-of-range noise and other legitimate signal components such as the details, edges, lines, small features, etc. in the image, as both correspond to high frequency components in the image data, so that we can preserve the former while suppressing the latter.
One way to remove such noise is to replace each pixel by the average of the pixels in a small neighborhood so that the noise of out-of-range gray levels are reduced. Equivalently, this averaging operation in spatial domain corresponds to low-pass filtering in the spatial frequency domain, by which the high-frequency components are removed.
The averaging operation is a weighted sum of the pixels in a small
neighborhood, typically of odd size in each dimension, i.e.,
such as 3x3, 5x5, 7x7, although even-sized
neighborhood can also be used. Such operation is typically implemented
as a convolution with a symmetric kernel
of certain
shapes and values:
(1) |
(2) |
(3) |
The weighting of these convolution kernels is based on the assumption of spatial locality, i.e., the closer two pixels are, the more they are correlated. Consequently, closer neighbors of a pixel should be weighted more than those that are farther away.
These convolution kernels can be considered as the approximations of some continuous 2D functions such as a rectangular function
(4) |
(5) |
(6) |
(7) |
In general the Gaussian function is a preferred method for the following reasons:
The algorithms below represent various efforts made to distinguish noise components from legitimate signal components.
Weymouth-Overton's algorithm
This algorithm is based on the idea that in the averaging process, greater weight should be assigned to pixels that are
(8) |
(9) |
(10) |
(11) |
Statistical thresholding
First find the mean and the variance
of all pixels
in the neighborhood
of a given pixel
of the input image:
(12) |
(13) |
Then find the corresponding pixel for the output image:
(14) |
Nagao's algorithm
(15) |
In this example, the pixel in question is replaced by the mean 7.1 from
the northeast neighborhood with minimum variance 105.