Given two sets A and B belonging to a space where a metric d(x,y) is defined, the directed Hausdorff distance h(A,B) will be max{a in A}min{b in B}d(a,b). Trying to be a bit clearer:

  • for each element of A, you compute the distance from each element of B;
  • for each element of A, you take the smallest of the distances you've just computed;
  • now you choose, among all the minimum distances, the one which is the largest.
Then, the Hausdorff distance is also, in some way, the largest distance from one set (A) to the closest point of the other set (B). This is obviously not symmetric. The Hausdorff distance is then defined as the max between h(A,B) and h(B,A).

It is often used in Computer Graphics, in changing the resolution of a mesh (which basically means changing the number of vertices).

It can also be used in Computer Vision, as a more robust measure of the distance between two images. Note, however, that is not bound to be used in two-dimensional spaces (like images are for pixels...poor pixels...).