用法:
skimage.filters.median(image, footprint=None, out=None, mode='nearest', cval=0.0, behavior='ndimage')
返回图像的局部中值。
- image:array-like
输入图像。
- footprint:ndarray,可选
如果
behavior=='rank'
,footprint
是 1 和 0 的二维数组。如果behavior=='ndimage'
,footprint
是一个由 1 和 0 组成的 N-D 数组,其维数与image
相同。如果没有,footprint
将是一个 N-D 数组,每个维度有 3 个元素(例如,向量、正方形、立方体等)- out:ndarray,(与图像相同的数据类型),可选
如果没有,则分配一个新数组。
- mode:{‘reflect’, ‘constant’, ‘nearest’, ‘mirror’,'‘wrap’},可选
mode 参数确定如何处理数组边界,其中
cval
是 mode 等于 ‘constant’ 时的值。默认为‘nearest’。- cval:标量,可选
如果模式为‘constant’,则填充过去输入边的值。默认值为 0.0
- behavior:{‘ndimage’, ‘rank’},可选
或者使用旧行为(即
skimage.filters.rank.median()
scipy.ndimage.median_filter()
- out:二维数组(与输入图像相同的 dtype)
输出图像。
- selem:DEPRECATED
已弃用以支持足迹。
参数:
返回:
其他参数:
例子:
>>> from skimage import data >>> from skimage.morphology import disk >>> from skimage.filters import median >>> img = data.camera() >>> med = median(img, disk(5))
相关用法
- Python skimage.filters.unsharp_mask用法及代码示例
- Python skimage.filters.rank.noise_filter用法及代码示例
- Python skimage.filters.gaussian用法及代码示例
- Python skimage.filters.threshold_otsu用法及代码示例
- Python skimage.filters.rank.sum用法及代码示例
- Python skimage.filters.window用法及代码示例
- Python skimage.filters.gabor用法及代码示例
- Python skimage.filters.rank.autolevel用法及代码示例
- Python skimage.filters.threshold_li用法及代码示例
- Python skimage.filters.rank.pop用法及代码示例
- Python skimage.filters.rank.mean用法及代码示例
- Python skimage.filters.rank.pop_bilateral用法及代码示例
- Python skimage.filters.rank.maximum用法及代码示例
- Python skimage.filters.roberts用法及代码示例
- Python skimage.filters.rank.equalize用法及代码示例
- Python skimage.filters.rank.enhance_contrast用法及代码示例
- Python skimage.filters.rank.gradient用法及代码示例
- Python skimage.filters.LPIFilter2D.__init__用法及代码示例
- Python skimage.filters.farid用法及代码示例
- Python skimage.filters.rank_order用法及代码示例
注:本文由纯净天空筛选整理自scikit-image.org大神的英文原创作品 skimage.filters.median。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。