Page 312 - Fundamentals of Light Microscopy and Electronic Imaging
P. 312
IMAGE PROCESSING WITH FILTERS 295
Median Filter
This filter reduces noise and evens out pixel values with respect to the values of neigh-
boring pixels (Fig. 15-8). It is very effective at removing noise, faulty pixels, and fine
scratches. A median filter can be more effective than low-pass filters in reducing noise.
Like all linear filters, a median filter uses a kernel or cluster of pixels (the dimensions
are determined by the operator) that moves in linear fashion, pixel by pixel and row by
row, across all of the pixels in the image. For this filter, there is no convolution matrix
as such. At each successive pixel location, the original pixel values covered by the ker-
nel are rank ordered according to magnitude, and the median value is then determined
and assigned to the central pixel location in a new filtered image. In the following exam-
ple using a kernel size of 3 3, the central noisy pixel with a value of 20 in the original
image becomes 7 in the new filtered image:
Median pixel value
Pixel values covered assigned to central
by 3 3 kernel in original Rank order of pixels pixel in new image
6 6 4
5 20 7 4,5,6,6,7,7,8,9,20 7
7 8 9
Histogram Equalization
Most image-processing programs have an equalize contrast function that reassigns pixel
values so that each gray level is represented by the same number of pixels. The process,
(a) (b)
Figure 15-8
Median filter for removing noise. Highly magnified CCD image of a field of microtubules in
DIC microscopy. (a) The original image was acquired at the full 12 bit dynamic range of the
camera, but looks grainy after histogram stretching due to photon noise. (b) The same image
after applying a median filter with a 3 3 pixel kernel shows that much of the graininess has
been removed. The S/N ratio of the original could have been improved by averaging a
number of like frames at the time of acquisition.