Convolutional low-pass filter masks are, e.g.:
Averaging:
Gaussian:
These methods reduce the noise, but usually they also blur the image at undesirable places.
For larger masks (and if special convolver hardware is not available)
it is preferable to do the convolution by passing to the frequency domain (
Convolution).
Random noise can be removed preserving edges by using the median filter. An example for a different smoothing mask removing out-of-range pixels by convolution is
which computes the average of the eight neighbours; this must be used conditionally: to suppress impulse noise, the centre pixel is replaced by this average if it differs by more than a given threshold. Another method to smooth images preserving sharp edges is given in [Kuwahara76]; the method compares four different areas around the centre pixel as in the figure:
and replaces the centre pixel by the average of the most homogeneous area, the one with the smallest variance, where the variance is usually defined as:
with the sums taken over
and
denoting the average.
Other authors, e.g. [Nagao78], use more areas of different shapes.
An extension of the median operation can be found in [Astola89], where several edge-preserving smoothing methods, based on the median operation and FIR filters, are described. Introductory textbooks are [Jain89], [Gonzalez87], [Pratt78], [Rosenfeld76].