OOF2: The Manual

Name

OOF.Image.Modify.MedianFilter — Reduce noise by replacing each pixel color with the median over a local region.

Synopsis

OOF.Image.Modify.MedianFilter(image, radius)

Details

  • Parent Menu: OOF.Image.Modify
  • Callback: function doImageMod in module ooflib.image.imagemodifier
  • Parameters:

    image
    Type: The path to an existing Image object.
    radius
    Radius of the median filter in units of the pixel size. Type: Integer.

Description

Reduce noise in an image with a median filter. This replaces the value of each pixel with the median value in a circle of the given radius centered on the pixel. The radius is in units of the pixel size. For a color image, each RGB channel is filtered independently.

This routine calls the skimage.filters.median from the scikit-image library.

Figure 6.38. Applying a Median Filter to an Image

Applying a Median Filter to an Image

The leftmost image is a 200×200 pixel micrograph of Si3N4 (courtesy of C.-H. Hsueh). The second image is the same micrograph with noise added. The third and fourth images are the results of applying MedianFilter to the noisy image, with the given values of radius.


See Also