Fréchet distance between two point sets☆
Introduction
The Fréchet distance and the discrete Fréchet distance are a popular measure between two polygonal curves that takes the order of the points along the curves into account. Intuitively, the similarity of the shapes of the two curves is measured. In this paper, we want to measure the similarity between two point sets by asking if we can find an order of the points, such that the Fréchet distance or the discrete Fréchet distance between the polygonal curves on the point sets in this order is small. That is, we ask if the point sets can be ordered such that the resulting curves have a similar shape.
This is a natural problem within the Fréchet distance research that has not been considered yet, and there are some interesting applications for this. For instance, it can be used to detect similar linear formations between two groups where one group is represented by one point for each entity within the group. Or for two sets of GPS-positions of two entities for which the time component is missing, we want to determine if the positions can be ordered such that the entities were moving along a similar route. Especially for the discrete version, there are many curves on the point sets that realize a certain distance. Thus, we also discuss how to obtain curves with desirable properties such as small total length or a small number of crossings.
A polygonal curve is a curve where n is a positive integer, such that the restriction of P to the interval is affine, that is , for each . We call the vertex set of P. To measure the dissimilarity between two polygonal curves, we use the Fréchet distance [6] and the discrete Fréchet distance [12]. For two polygonal curves and their Fréchet distance is defined as where α (resp. β) ranges over all continuous non-decreasing onto mappings from to (resp. ).
The discrete Fréchet distance is typically defined by couplings. Let be the vertex set of P and the vertex set of Q. A coupling L between P and Q is a sequence of distinct pairs from such that , , , , and for all we have or and or . The length of L is defined as , where d denotes the Euclidean distance between two points. The discrete Fréchet distance between P and Q equals the shortest possible length of a coupling between P and Q.
Typically, the Fréchet distance is illustrated by a man walking his dog. Here, the Fréchet distance equals the shortest length of a leash that allows the man and the dog to walk on their curves from beginning to end. To adapt this illustration for the discrete Fréchet distance, imagine two frogs jumping along the vertices of the polygonal curves, such that their maximum vertex-to-vertex distance during the traversal is minimized.
Now we define the Fréchet distance and the discrete Fréchet distance between point sets. For this, we use the same notation, and , as for the (discrete) Fréchet distance between two polygonal curves.
Definition 1 Given a point set of size . A polygonal curve induced by the point set S is a polygonal curve with vertex set S. That is visits each point of S exactly once.
Definition 2 Let be two point sets of size , . We define the Fréchet distance and the discrete Fréchet distance between S and R as the smallest possible (discrete) Fréchet distance between a polygonal curve induced by S and a polygonal curve induced by R.
Next we formally state the problem that we study. Problem 1 Given two point sets we ask if the Fréchet distance or the discrete Fréchet distance between the point sets is at most a given value or not. If so, we want to find two induced curves with (discrete) Fréchet distance at most ε.
Alt and Godau [6] gave algorithms for computing the Fréchet distance between polygonal curves. For two polygonal curves P and Q of complexity n and m their algorithm decides in time whether the Fréchet distance between P and Q is smaller than a given value , and computes the exact Fréchet distance in time [6]. The discrete Fréchet distance was introduced by Eiter and Mannila, who gave an algorithm to compute it for two polygonal curves in time [12]. Recently, Bringmann gave conditional near-quadratic lower bounds [9] for the Fréchet distance and discrete Fréchet distance. At nearly the same time, slightly faster algorithms were given for both the discrete Fréchet distance [4] and the Fréchet distance [10].
Eiter and Mannila defined a related distance measure, the link distance, between two point sets as the mimimum sum of point to point distances of a relation for point sets and . For each point of , must contain a pair and vice versa [13].
To the best of our knowledge, the problem of finding polygonal curves on two given point sets with small Fréchet distance has not been considered previously. However, the problem where one polygonal curve P is given and the objective is to find a polygonal curve Q on one point set S with small Fréchet distance or with small discrete Fréchet distance to P is well studied [1], [14], [17]. There are several variants of this problem. The all-points variant requires all points of S to be visited by Q, whereas the subset variant allows to build the polygonal curve on a subset of S. Furthermore, one can allow that points of S are visited more than once (non-unique) or not (unique).
For the discrete Fréchet distance, Wylie and Zhu [17] showed that both non-unique variants are solvable in time, where n is the complexity of P and m denotes the size of S. However, they showed that both unique variants are NP-complete. For the continuous Fréchet distance, Accisano and Üngör [1] showed NP-completeness for both unique variants and for the all-points, non-unique variant. Maheshwari et al. [14] showed that the continuous subset non-unique variant is solvable in time. Assisano and Üngör introduced two extensions of the problem, namely allowing an affine transformation of P to be close to some curve on the point set S under the Fréchet distance [2] and dealing with imprecise point sets [3]. However, as for most of the techniques, the order of the given curve is inherent, these approaches do not carry to our problem.
We consider the discrete and continuous Fréchet distance between two point sets. For a curve and a point set, the discrete variant is NP-hard [17]. However, we first observe that for two point sets, the discrete Fréchet distance is equivalent to the Hausdorff distance. Then we show how to obtain two curves with minimal discrete Fréchet distance in time and how to obtain a short and simple representative curve for both point sets.
In contrast to the discrete variant, we prove that the continuous variant is NP-hard to approximate for any constant factor. We develop an exponential time algorithm to decide whether for two point sets S and R and a value that exploits the given geometry in order to reduce the number of possible permutations of the points significantly.
All our results are formulated – for ease of presentation – in 2 dimensions. However note that all results generalize to point sets in for any .
Section snippets
Curves realizing the discrete Fréchet distance
Here, we consider the discrete Fréchet distance between two point sets and show how to obtain two induced curves that respect this distance.
We first compare the discrete Fréchet distance with the Hausdorff distance between two point sets. Recall, that the Hausdorff distance between two point sets S and R is defined as the smallest value ε such that for every point there exists a point with distance at most ε to s, and such that for every point there exists a point s in S with
Fréchet distance between point sets
Detecting common routes of two entities or finding similar linear formations of two groups of entities based on the discrete Fréchet distance is quite restrictive. For instance, consider the simple movement of two entities moving along a straight line. Although the movement is the same, the discrete Fréchet distance between the point sets can be large, depending on the sampled points along the line. The continuous variant corrects this shortcoming. Except for the start- and endpoints, the
Conclusion
For the discrete Fréchet distance between two point sets, we showed that we can construct a simple representative curve by approximating the shortest Hamiltonian path problem on the points given by a partition of the two point sets. For the continuous variant, we reduced the possibilities of constructing the induced curves by carefully exploiting all given geometry. Hence, we currently do not see how to obtain more efficient exact or approximation algorithms for the continuous problem in the
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgement
B. Kilgus was supported by the German Research Foundation under grant number BU 2419/3-1. We thank the anonymous referees for their helpful comments.
References (17)
- et al.
Following a curve with the discrete Fréchet distance
Theor. Comput. Sci.
(2014) - et al.
Approximate matching of curves to point sets
- et al.
Finding a curve in a point set
- et al.
Matching curves to imprecise point sets using Fréchet distance
- et al.
Computing the discrete Fréchet distance in subquadratic time
- et al.
Approximate matching of polygonal shapes (extended abstract)
- et al.
Computing the Fréchet distance between two polygonal curves
Int. J. Comput. Geom. Appl.
(1995) Polynomial time approximation schemes for Euclidean TSP and other geometric problems
Cited by (5)
Online Noninvasive Technique for Condition Monitoring of Cooling System in Urban Rail Vehicles
2023, IEEE Transactions on Industrial ElectronicsResearch on air gap magnetic density measurement of permanent magnet linear motor based on stray field sensing and NBCNN-LSTM-Attention depth regression modeling
2023, Yi Qi Yi Biao Xue Bao/Chinese Journal of Scientific InstrumentOn the Longest Flip Sequence to Untangle Segments in the Plane
2023, Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)Development of Quantification Measures to Compare Mechanical and Physical Properties’ Patterns from Additive Manufacturing Simulations
2023, Computer-Aided Design and Applications