hausdorff_distance — 3D metrics op

• Data kinds: points × points → measurement

• Call: import fullseye as fs; fs.ledger.hausdorff_distance(a, b) (to call the implementation directly, import metrics3d; metrics3d.hausdorff_distance(a, b); from the registry, ops3d.get("hausdorff_distance"))

Usage

The symmetric Hausdorff distance = max(max_a min_b, max_b min_a). → scalar. The worst-case discrepancy.

Raises ValueError: if either is empty or not (N,3) (the maximum of an empty set would be a raw numpy exception).

Computation: with cKDTree, take the nearest-neighbour distances from each point of a to b and from b to a, and return the larger of the two directional maxima. It is the smallest radius guaranteeing "every point of one cloud lies within this distance of the other cloud". Unit = the coordinate unit.

Input: a, b are point clouds (N, 3) / (M, 3) (point counts may differ, no correspondence needed). Like its sibling chamfer_distance, it passes the input through _require_cloud at the entry: an empty point cloud or input that is not 3 columns, such as (N, 2), is rejected with a ValueError carrying this op's own message (previously an empty cloud made max() fail with numpy's "zero-size array", and input that is not 3 columns failed on cKDTree's dimension mismatch — neither says what is wrong).

Returns: Python float, [0, inf). 0 for identical point clouds. Not normalised.

Note: 1 outlier point determines the value (maximum, not mean). For evaluating noisy scans, chamfer_distance or fscore (fraction within the threshold tau) is more stable; use Hausdorff when you want to claim "at worst this accuracy" (tolerance verification, the same character as LOD max_error).

Background guides (the physics and conventions behind this op)

• blender_interop — Using Blender alongside — build the shape, measure it with fullseye (pitfalls: axes, units, ground truth)

• measurement_uncertainty — Measurement uncertainty and calibration — what it takes to claim you are measuring

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

Runnable examples (verified samples that actually call this op)

• mesh_lod_download — py -3.11 examples_3d/mesh_lod_download.py

• pointcloud_downsampling — py -3.11 examples_3d/pointcloud_downsampling.py

• poisson_surface_recon — py -3.11 examples_3d/poisson_surface_recon.py

Ops the type connects to (they accept measurement as input)

vol_gaussian_psf · fuse_to_voxel · fresnel_reflectance · snell_angle

Same category (metrics)

chamfer_distance · m3c2_distance · fscore · rmse_correspondence · normal_consistency · voxel_iou · pose_error


*Provenance: metrics3d.py — 3D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.