用法:
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 skimage.measure.perimeter_crofton用法及代码示例
- Python skimage.measure.profile_line用法及代码示例
- Python skimage.measure.ransac用法及代码示例
- Python skimage.measure.moments_hu用法及代码示例
- Python skimage.measure.moments_coords_central用法及代码示例
- Python skimage.measure.LineModelND用法及代码示例
- Python skimage.measure.block_reduce用法及代码示例
- Python skimage.measure.moments用法及代码示例
- Python skimage.measure.shannon_entropy用法及代码示例
- Python skimage.measure.moments_normalized用法及代码示例
- Python skimage.measure.euler_number用法及代码示例
- Python skimage.measure.moments_central用法及代码示例
- Python skimage.measure.EllipseModel用法及代码示例
- Python skimage.measure.regionprops用法及代码示例
- Python skimage.measure.find_contours用法及代码示例
- Python skimage.measure.CircleModel用法及代码示例
- Python skimage.measure.label用法及代码示例
- Python skimage.measure.regionprops_table用法及代码示例
- Python skimage.measure.moments_coords用法及代码示例
- Python skimage.metrics.hausdorff_distance用法及代码示例
注:本文由纯净天空筛选整理自scikit-image.org大神的英文原创作品 skimage.measure.perimeter。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。