用法:
skimage.morphology.black_tophat(image, footprint=None, out=None)
返回图像的黑色礼帽。
图像的黑色礼帽定义为其形态闭合减去原始图像。此操作返回图像中小于足迹的暗点。请注意,原始图像中的暗点是黑色礼帽之后的亮点。
- image:ndarray
图像阵列。
- footprint:ndarray,可选
邻域表示为 1 和 0 的二维数组。如果没有,请使用cross-shaped 占用空间(连接性=1)。
- out:ndarray,可选
存储形态学结果的数组。如果 None 被传递,将分配一个新数组。
- out:数组,形状和类型与图片
形态学黑色礼帽的结果。
- selem:DEPRECATED
已弃用以支持足迹。
参数:
返回:
其他参数:
参考:
例子:
>>> # Change dark peak to bright peak and subtract background >>> import numpy as np >>> from skimage.morphology import square >>> dark_on_gray = np.array([[7, 6, 6, 6, 7], ... [6, 5, 4, 5, 6], ... [6, 4, 0, 4, 6], ... [6, 5, 4, 5, 6], ... [7, 6, 6, 6, 7]], dtype=np.uint8) >>> black_tophat(dark_on_gray, square(3)) array([[0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 1, 5, 1, 0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0]], dtype=uint8)
相关用法
- Python skimage.morphology.h_minima用法及代码示例
- Python skimage.morphology.dilation用法及代码示例
- Python skimage.morphology.remove_small_holes用法及代码示例
- Python skimage.morphology.flood_fill用法及代码示例
- Python skimage.morphology.h_maxima用法及代码示例
- Python skimage.morphology.local_maxima用法及代码示例
- Python skimage.morphology.area_closing用法及代码示例
- Python skimage.morphology.label用法及代码示例
- Python skimage.morphology.max_tree_local_maxima用法及代码示例
- Python skimage.morphology.thin用法及代码示例
- Python skimage.morphology.flood用法及代码示例
- Python skimage.morphology.diameter_closing用法及代码示例
- Python skimage.morphology.remove_small_objects用法及代码示例
- Python skimage.morphology.reconstruction用法及代码示例
- Python skimage.morphology.erosion用法及代码示例
- Python skimage.morphology.diameter_opening用法及代码示例
- Python skimage.morphology.max_tree用法及代码示例
- Python skimage.morphology.local_minima用法及代码示例
- Python skimage.morphology.medial_axis用法及代码示例
- Python skimage.morphology.skeletonize用法及代码示例
注:本文由纯净天空筛选整理自scikit-image.org大神的英文原创作品 skimage.morphology.black_tophat。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。