skimage2.metrics.hausdorff_pair#
- skimage2.metrics.hausdorff_pair(image0, image1)[source]#
Returns pair of points that are Hausdorff distance apart between nonzero elements of given images.
The Hausdorff distance [1] is the maximum distance between any point on
image0and its nearest point onimage1, and vice-versa.- Parameters:
- image0, image1ndarray
Arrays where
Truerepresents a point that is included in a set of points. Both arrays must have the same shape.
- Returns:
- point_a, point_barray
A pair of points that have Hausdorff distance between them.
References
Examples
>>> 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_pair(image_a, image_b) (array([3, 0]), array([6, 0]))