Navigation

Operators and Keywords

Function List:

C++ API

Function File: dh = ls_hausdorff_dist (phi1, phi2, h = 1)
Function File: dh = ls_hausdorff_dist (sd1, sd2, "sd")

Approximate the Hausdorff distance between two sets. The sets are given by their level-set functions phi1 and phi2. The Hausdorff distance is calculated as the maximum difference between their distance functions. (Note that it is the ordinary distance function here, not the signed distance function!)

If we neglect possible approximation errors in the distance function, the result dh is guaranteed to be a lower bound of the exact Hausdorff distance. It is within the real distance by, roughly, h.

The second call form assumes that the level-set functions of the domains are actually already signed distance functions sd1 and sd2. In this case, the grid spacing h is not necessary. Since there is no need to call ls_distance_fcn, the calculation can be performed faster in this case.

See also: ls_equal, ls_distance_fcn, ls_signed_distance.

Package: level-set