用法:
cucim.skimage.measure.perimeter(image, neighbourhood=4)
计算二值图像中所有对象的总周长。
- image:(N, M) ndarray
二维二值图像。
- neighbourhood:4 或 8,可选
用于确定边界像素的邻域连通性。它用于计算轮廓。更高的邻域加宽了计算周长的边界。
- perimeter:浮点数
二值图像中所有对象的总周长。
参数:
返回:
参考:
- 1
K. Benkrid, D. Crookes. Design and FPGA Implementation of a Perimeter Estimator. The Queen’s University of Belfast. http://www.cs.qub.ac.uk/~d.crookes/webpubs/papers/perimeter.doc
例子:
>>> from skimage import data, util >>> from skimage.measure import label >>> # coins image (binary) >>> img_coins = data.coins() > 110 >>> # total perimeter of all objects in the image >>> perimeter(img_coins, neighbourhood=4) 7796.867... >>> perimeter(img_coins, neighbourhood=8) 8806.268...
相关用法
- Python cucim.skimage.measure.profile_line用法及代码示例
- Python cucim.skimage.measure.label用法及代码示例
- Python cucim.skimage.measure.moments_coords用法及代码示例
- Python cucim.skimage.measure.moments_normalized用法及代码示例
- Python cucim.skimage.measure.moments_central用法及代码示例
- Python cucim.skimage.measure.moments_coords_central用法及代码示例
- Python cucim.skimage.measure.regionprops用法及代码示例
- Python cucim.skimage.measure.moments用法及代码示例
- Python cucim.skimage.measure.centroid用法及代码示例
- Python cucim.skimage.measure.moments_hu用法及代码示例
- Python cucim.skimage.measure.regionprops_table用法及代码示例
- Python cucim.skimage.measure.block_reduce用法及代码示例
- Python cucim.skimage.morphology.dilation用法及代码示例
- Python cucim.skimage.morphology.closing用法及代码示例
- Python cucim.skimage.morphology.erosion用法及代码示例
- Python cucim.skimage.morphology.white_tophat用法及代码示例
- Python cucim.skimage.morphology.remove_small_holes用法及代码示例
- Python cucim.skimage.morphology.black_tophat用法及代码示例
- Python cucim.skimage.morphology.reconstruction用法及代码示例
- Python cucim.skimage.morphology.remove_small_objects用法及代码示例
注:本文由纯净天空筛选整理自rapids.ai大神的英文原创作品 cucim.skimage.measure.perimeter。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。