Contextual Median Filter#

A contextual median filter that avoids smoothing fine structures. This is a simplified version of the Belkin-O’Reilly Algorithm.

Definition#

This is a median filter that is only applied if the central pixel of the window is a maximum or minimum over the moving window. The moving window size is 3x3 by default.

Functions#

Supported types and requirements#

Supported input types: Numpy, Dask, Xarray

Requirements:

  • numpy

  • numba