TOPICS
Search

Fréchet Distance


The Fréchet distance is a distance between curves that accounts for both the locations of their points and the ordering in which the points occur. Let f:[a,b]->X and g:[c,d]->X be continuous curves in a metric space (X,d). Their Fréchet distance is

 delta_F(f,g)=inf_(alpha,beta)max_(0<=t<=1)d(f(alpha(t)),g(beta(t))),
(1)

where the infimum is over continuous nondecreasing surjections alpha:[0,1]->[a,b] and beta:[0,1]->[c,d]. These maps allow the two curves to be traversed at independently varying speeds without reversing direction. Equivalently, the Fréchet distance is the shortest leash length that allows a person and a dog to traverse the two curves from their respective starting points to their endpoints without backtracking. This definition goes back to Fréchet (1906) and is the form used by Alt and Godau (1995).

The distance is unchanged when either curve is reparameterized by a continuous increasing bijection of its parameter interval. On parameterized curves it is a pseudometric; it becomes a metric on equivalence classes obtained by identifying curves at Fréchet distance 0.

The Hausdorff distance compares only the point sets traced by the curves, whereas the Fréchet distance also retains their ordering. In particular, d_H(f([a,b]),g([c,d]))<=delta_F(f,g). For example, the curves f(t)=t and g(t)=1-t on [0,1] have the same image and therefore Hausdorff distance 0, but their Fréchet distance is 1 because they traverse the interval in opposite directions.

For finite point sequences P=(p_1,...,p_m) and Q=(q_1,...,q_n), a coupling is a sequence of ordered pairs of indices from (1,1) to (m,n) whose successive steps are (1,0), (0,1), or (1,1). The discrete Fréchet distance is

 delta_(dF)(P,Q)=min_(L)max_((i,j) in L)d(p_i,q_j),
(2)

where the minimum is over all such couplings L. If D_(i,j) denotes the discrete Fréchet distance between the prefixes (p_1,...,p_i) and (q_1,...,q_j), then for i,j>1 it satisfies

 D_(i,j)=max{d(p_i,q_j),min{D_(i-1,j),D_(i-1,j-1),D_(i,j-1)}}.
(3)

The boundary values are D_(1,1)=d(p_1,q_1), with the first row and column obtained by successive maxima. Thus delta_(dF)(P,Q)=D_(m,n) and the discrete distance can be computed in O(mn) time (Eiter and Mannila 1994).


See also

Curve, Distance, Hausdorff Distance, Metric, Metric Space, Pseudometric, Reparameterization

Explore with Wolfram|Alpha

References

Alt, H. and Godau, M. "Computing the Fréchet Distance between Two Polygonal Curves." Internat. J. Comput. Geom. Appl. 5, 75-91, 1995. https://doi.org/10.1142/S0218195995000064.Eiter, T. and Mannila, H. "Computing Discrete Fréchet Distance." Christian Doppler Laboratory for Expert Systems Technical Report CD-TR 94/64. Vienna, Austria: Technical University of Vienna, 1994. https://www.kr.tuwien.ac.at/staff/eiter/et-archive/files/cdtr9464.pdf.Fréchet, M. "Sur quelques points du calcul fonctionnel." Rend. Circ. Mat. Palermo 22, 1-72, 1906. https://doi.org/10.1007/BF03018603.

Cite this as:

Weisstein, Eric W. "Fréchet Distance." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/FrechetDistance.html

Subject classifications