mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-09 02:10:21 +08:00
median filter outlier
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user