Overview
Hausdorff Distance compares two sets by finding, for each point in one set, the distance to the nearest point in the other set, then taking the worst such gap.
Measures the largest nearest-neighbor gap between two point sets or shapes.
Compact metadata for implementation and discovery.
Hausdorff Distance compares two sets by finding, for each point in one set, the distance to the nearest point in the other set, then taking the worst such gap.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n log n)
Worst
O(n^2)
Space
O(n)
H(A,B) = max(max_a min_b d(a,b), max_b min_a d(a,b))Measures the largest nearest-neighbor gap between two sets.
Show measuring the largest nearest-neighbor gap between two point sets on a small shape distance example.
Hausdorff Distance operates in O(n log n) time and O(n) space within the Shape Similarity family. Key governing relation: H(A,B) = max(max_a min_b d(a,b), max_b min_a d(a,b)). Often compared with Voronoi-Based Medial Axis and Frechet Distance.
What each reference supports for this entry.
Textbook support for Hausdorff Distance's computational geometry problem family, predicates, structures, or geometric construction.
Open sourceAlgorithm catalog support for Hausdorff Distance in the computational geometry benchmark area.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Geometry · Core
Frechet distance respects traversal order along curves, while Hausdorff distance compares sets by nearest-neighbor gaps.
Compare with thisGeometry · Core
Procrustes Analysis and Hausdorff Distance solve related shape alignment problems with different assumptions and tradeoffs.
Compare with thisGeometry · Extended
Shape context matching compares distributions of local shape neighborhoods rather than only the worst gap.
Compare with thisFrechet distance respects traversal order along curves, while Hausdorff distance compares sets by nearest-neighbor gaps.
Shape context matching compares distributions of local shape neighborhoods rather than only the worst gap.
Point-to-segment distances are common primitives in sampled or continuous Hausdorff calculations.