From ecba2df2ac60b636f10158a93da0aa480e02d333 Mon Sep 17 00:00:00 2001 From: Emmanuelle Gouillart Date: Sat, 20 Apr 2013 19:45:21 +0200 Subject: [PATCH] median filter outlier --- skimage/filter/ctmf.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/skimage/filter/ctmf.py b/skimage/filter/ctmf.py index 94f273e1..45c387b5 100644 --- a/skimage/filter/ctmf.py +++ b/skimage/filter/ctmf.py @@ -42,6 +42,13 @@ def median_filter(image, radius=2, mask=None, percent=50): not overlap the mask, the filtered result is underfined, but in practice, it will be the lowest value in the valid area. + Examples + -------- + >>> a = np.ones((5, 5)) + >>> a[2, 2] = 10 # introduce outlier + >>> b = filter.median_filter(a) + >>> b[2, 2] # the median filter is good at removing outliers + 1.0 ''' if image.ndim != 2: