用法:
skimage.measure.perimeter_crofton(image, directions=4)
计算二值图像中所有对象的总克罗夫顿周长。
- image:(N, M) ndarray
二维图像。如果图像不是二进制的,则所有严格大于零的值都被视为对象。
- directions:2 个或 4 个,可选
用于近似克罗夫顿周长的方向数。默认情况下,使用 4:它应该比 2 更准确。两种情况下的计算时间相同。
- perimeter:浮点数
二值图像中所有对象的总周长。
参数:
返回:
注意:
该度量基于 Crofton 公式 [1],它是来自积分几何的度量。它通过沿所有方向的双积分定义用于一般曲线长度评估。在离散空间中,2 或 4 个方向给出了非常好的近似值,对于更复杂的形状,4 比 2 更准确。
与
perimeter()
参考:
- 1
- 2
S. Rivollier. Analyse d’image geometrique et morphometrique par diagrammes de forme et voisinages adaptatifs generaux. PhD thesis, 2010. Ecole Nationale Superieure des Mines de Saint-Etienne. https://tel.archives-ouvertes.fr/tel-00560838
例子:
>>> 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_crofton(img_coins, directions=2) 8144.578... >>> perimeter_crofton(img_coins, directions=4) 7837.077...
相关用法
- Python skimage.measure.perimeter用法及代码示例
- 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_crofton。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。