Belkin-O’Reilly Algorithm#
A contextual median filter that avoids smoothing fine structures. Based on Belkin & O’Reilly (2009).
Definition#
The BOA is a 3x3 median filter that is applied only if:
the central pixel is not a 5-peak
and the central pixel is a 3-peak
The central pixel is a 5-peak if its value is a maximum or minimum along four 5-points 1D slices of the surrounding 5x5 window (east-west, north-south, diagonals). The central pixel is a 3-peak if its value is a maximum or minimum in the surrounding 3x3 window.
Note
Despite what could be understood from the figure 8 of Belkin & O’Reilly (2009), the algorithm does not filter out lonely, aberrant pixels. If your data has such kind of noise, consider the Contextual Median Filter.
Functions#
Supported types and requirements#
Supported input types: Numpy, Dask, Xarray
Requirements:
numpy
numba
Other implementations#
References#
Belkin, I. M. and O’Reilly, J. E.: “An algorithm for oceanic front detection in chlorophyll and SST satellite imagery“, J. Marine Syst., 78, 319–326, DOI:10.1016/j.jmarsys.2008.11.018, 2009