ITK Pre-Processing Algorithm Wrappers in Python/MedianFilter

From FarsightWiki
Jump to: navigation, search

Median Image Filter

This is implemented using the itkMedianImageFilter class in ITK. This takes an image and computes a median value of local neighbourhood region described by the radius parameter, for each pixel. This filter reduces noise while preserving edges. It is particularly useful in reducing speckle noise, and salt-and-pepper noise.

Parameters:

  • 1. Radius - for an n-D image, this is an n-tuple, with each entry describing the radius of the neighbourhood in that dimension. For example, for a 2-D image, a Radius of (1,1) indicates a neighbour region of size 3x3 around the pixel. The median filter can be useful in reducing the noise, but not affecting the image. Using a larger value for the radii can reduce noise, but also loses detail about the objects. Figures 1 and 2 show the effect of median filtering on seg_orig, with a radius of 1 and 3, respectively.

Back to main page.

Fig. 1: Median filtered image using 3x3 neighbourhood
Fig. 2: Median filtered image using 7x7 neighbourhood
Personal tools