Lab Contents

Removing Shot noise from Face Image.

The median filter is very good at removing shot noise (but not perfect). We will compare it with the mean filter, and look for artifacts of smoothing.

These first steps to demonstrate the median filter are from the NIH Image manual.

 Here is a piece of the image.  

 You can spray with any gray level and the filter will still work.  


 Most of the noise spots should be removed - the noise pixels are too close together in any small area, some noise pixels may remain.

The filtered image looks almost the same as the original, if both are not zoomed. The zoomed image shows a slight degree of smoothing eg. the gray hairs in the beard loose detail.


Image processing on filtered images will often enhance artifacts. Note the difference below between the sharpened median filtered image and the sharpened origina.

 Sharpened Median filtered image.

 Shapened original.



The median filter is distinctly better at removing shot noise than is the mean filter. This 3x3 mean filter (using the Smooth menu with the option key held down) replaces a pixel in the center of a 3x3 pixel square with the average value of all of the pixels within the square. The median filter replaces the center pixel with the median value.

 If the option key is not held down, less smoothing is done - the image is less blurry, but the noise pixels are very prominant.  This is the image to the left, sharpened with the Process -> Sharpen menu, option key not held down..

Note that the Smooth and Sharpen operations are not inverses of each other - one undoes the other almost - but not completely.