This software implements median, mean, and Gaussian filtering.
Median Filtering
Median filtering is needed to remove impulse noise from an image. A pixel intensity is replaced with the
median of pixel intensities within a window centered at that pixel. If a part of the window falls outside the
image, intensities within the portion of the window inside the image is used. Circular windows are used to
make smoothing independent of the image orientation. An example of median filtering by this software is
given below.
Fig. 1. (a) A synthetic image containing impulse noise. (b) Smoothing the image by median filtering
using a filter of radius 1 pixel.
Mean Filtering
Mean filtering is image averaging and the value at a pixel in the output is the average of values within a
circular window centered at the pixel in the input. The window size determines the neighborhood size
where averaging is performed. As the window size is increased, more noise is removed, but that blurs
the image more. An example of mean filtering by this method is given below.
Fig. 2. (a) A synthetic image containing zero-mean noise. (b) Image obtained by mean filtering
using a filter of radius 4 pixels.
Gaussian Filtering
A Gaussian is an ideal filter in the sense that it reduces the magnitude of high spatial frequencies in
an image proportional to their frequencies. That is, it reduces the magnitude of higher frequencies
more. This will be at the cost of more computation time when compared with mean filtering. A
Gaussian extends to infinity in all directions, but because it approaches zero exponentially, it can be
truncated three or four standard deviation away from its center without affecting the result noticeably.
Speed up is achieved by splitting a 2-D Gaussian into two 1-D Gaussians, G(x,y) = G(x) G(y), and
carrying out filtering in 1-D, first row by row and then column by column. An example of Gaussian
filtering is given below.
Fig. 3. (a), (b) Smoothing the image in Fig. 2a by Gaussian filters with standard deviations 2 and 4
pixels, respectively.
To obtain a license for this software, follow this link =>
Image Registration and Fusion Systems
|
(a) (b)
(c) (d)
Fig. 3. (a) A CT brain slice. This image is courtesy of MexPix. Smoothing of the CT image with (b) a median filter
or radius 2 pixels, (c) a mean filter of radius 2 pixels, and (d) a Gaussian filter of standard deviation 2 pixels.
An example of median, mean, and Gaussian smoothing on a real image is given below.