用法:
skimage.metrics.hausdorff_distance(image0, image1)
计算给定图像的非零元素之间的 Hausdorff 距离。
Hausdorff 距离 [1] 是
image0
上的任意点与其在image1
上的最近点之间的最大距离,反之亦然。- image0, image1:ndarray
True
表示包含在一组点中的点的数组。两个数组必须具有相同的形状。
- distance:浮点数
image0
和image1
中非零像素坐标之间的 Hausdorff 距离,使用欧几里得距离。
参数:
返回:
参考:
例子:
>>> points_a = (3, 0) >>> points_b = (6, 0) >>> shape = (7, 1) >>> image_a = np.zeros(shape, dtype=bool) >>> image_b = np.zeros(shape, dtype=bool) >>> image_a[points_a] = True >>> image_b[points_b] = True >>> hausdorff_distance(image_a, image_b) 3.0
相关用法
- Python skimage.metrics.hausdorff_pair用法及代码示例
- Python skimage.measure.ransac用法及代码示例
- Python skimage.measure.profile_line用法及代码示例
- Python skimage.measure.perimeter_crofton用法及代码示例
- 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.perimeter用法及代码示例
- 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用法及代码示例
注:本文由纯净天空筛选整理自scikit-image.org大神的英文原创作品 skimage.metrics.hausdorff_distance。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。