Duke CPS 296.2 - Lecture 23: Hausdorff and Fre´chet distance

Unformatted text preview:

CPS296.2 Geometric Optimization 05 April, 2007Lecture 23: Hausdorff and Fr´echet distanceLecturer: Pankaj K. Agarwal Scribe: Nihshanka Debroy23.1 IntroductionShape matching is an important area of research as it has applications to a number of problems, such as objectrecognition and analysis of protein structures. In this lecture, we discuss the Hausdorff and Fr´echet distances.Consider 2 point sets P ⊆ R2and Q ⊆ R2, where the goal is to find the extent of similarity between P andQ. The first question that needs to be answered is: what do we mean by “similar” ? Mathematically, we wantto find a mapping σ:P → Q, that has one of the following properties:• σ minimizes maxp∈P||p − σ(p)|| (minimizes maximum distance between mapped points) or,• σ minimizes Σp∈P||p − σ(p)|| (minimizes sum of distances between mapped points) or,• σ minimizes Σp∈P||p − σ(p)||2(minimizes sum of squared distances between mapped points)The mapping σ does not have be one-to-one. The question is: how do we find σ ?23.2 Hausdorff DistanceLet P and Q be two sets of points in Rd.The directed Hausdorff distance from P to Q, denoted by h(P, Q), is maxp∈Pminq ∈Q||p − q||.The Hausdorff distance between P and Q, denoted by H(P, Q), is max{h(P, Q), h(Q, P )}.Intuitively, the function h(P, Q) finds the point p ∈ P that is farthest from any point in Q and measures thedistance from p to its nearest neighbor in Q. Hausdorff distance is a measure of the mismatch between twopoint-sets. For d = 2, the Hausdorff distance can be computed in time O(n log n) (where n is the number ofpoints), using a Voronoi diagram in R2. In R3computing a Voronoi diagram could take quadratic time, so adifferent approach is needed to compute H(P, Q) in subquadratic time.Let D(q, r) be the disk of radius r centered at point q ∈ Q . The decision problem for the Hausdorff distancecould be written as:Given r ≥ 0, whether h(P, Q) ≤ r ? That is, ∀p ∈ P , ∃q ||p − q|| ≤ r.⇒ ∀p ∃q p ∈ D(q, r) (23.1)23-1Lecture 23: 05 April, 200723-2Figure 23.1: Translation: In the above figure, the points in blue represent one point-set, and the points in redrepresent the other. Clearly, the point-sets only differ in a translation factor.⇒ ∀p p ∈[q ∈QD(q, r) (23.2)⇒ P ⊆[q ∈QD(q, r) (23.3)A point p ∈ Rdcan be mapped to a point Q(p) ∈ Rd+1and a disk D(q, r) can be mapped to a half-space hqin Rd+1such that p ∈ D(q, r) if and only if Q(p) /∈ hq. Hence, p ∈Sq ∈QD(q , r) iff p /∈Tq ∈Qhq, i.e.,P ⊆[q ∈QD(q, r) ⇔ Q(P )\(\q ∈Qhq) = φ (23.4)A point-location data structure for convex polyhedra can be used to answer the decision query. When P andQ are sets of elements other than points (features, for example), a similar formulation is possible. A surveypaper by Alt and Guibas describes geometric techniques to measure the similarity between discrete geometricshapes [1].23.3 Hausdorff Distance under TranslationIn some cases, the point-sets P and Q are very similar and a translation applied to one of the point setswould achieve the best matching. Figure 23.1 shows an example where a simple translation transforms onepoint-set to the other. So we permit translations. Let σtbe the correspondence between P + t and Q, wheret represents the translation that is applied to P . The correspondence between the point-sets changes only atcritical values of t. Let µ(P, Q) be the matching that minimizes the Hausdorff distance between P + t and Qand f(t) represent the Hausdorff distance for a given value of t.Lecture 23: 05 April, 200723-3Define µ(P, Q) as mint∈R2H(P + t, Q). We also define f(t) as H(P + t, Q). Let π be a partition of R2sothat the map σtremains the same for all points in a face of π. Figure 23.2 shows an example of what π couldlook like. Within each face of π, the correspondence between P + t and Q remains unchanged.Figure 23.2: Partition π: Within each region of the partition, the correspondence remains unchanged.Partition π has O(n3) faces and this bound is tight in the worst case. We can compute π in O(n3log n) time.In fact, it can be shown that f(t) has Ω(n3) local minima, but most of the minima are “shallow.” There areefficient approximation algorithms for computing µ(P, Q). The notion of π and f(.) can be introduced forother similarity functions as well. For example, let σtbe the correspondence for the Euclidean minimumweight matching between P + t and Q. We can again define the partition π . It is an open problem whether πhas only polynomial number of faces in this case.A problem with taking a ‘max’ is that outliers can have a significant effect, and hence, the Hausdorff distanceis very sensitive to any outlier in P or Q.23.4 Fr´echet distanceThe Fr´echet distance is a measure that takes the continuity of shapes into account and, hence, is better suitedthan the Hausdorff distance for curve or surface matching. A popular illustration of the Fr´echet distance is,as follows [2]: Suppose a man is walking a dog. Assume the man is walking on one curve and the dog onanother curve. Both can adjust their speeds but are not allowed to move backwards. The Fr´echet distance ofthe two curves is then the minimum length of leash necessary to connect the man and the dog.The Fr´echet distance between two curves is defined as follows:F r(P, Q) = infα,βmaxt∈[0,1]||P (α(t)) − Q(β(t))|| (23.5)where P, Q : [0, 1] → R2are parametrizations of the two curves and α, β : [0, 1] → [0, 1] range over allLecture 23: 05 April, 200723-4Figure 23.3: P and Q in the above figure could be the backbones of two protein structures. A matching between P and Q should bemonotone for biological significance to be maintained here.continuous and monotone increasing functions. If P and Q are polygonal chains with n and m line segmentsrespectively, the decision problem for the Fr´echet distance can be written as: whether φ (P, Q ) ≤ r ?Before describing an algorithm for the Fr´echet distance, consider a simpler problem. Let P =< p1, ..., pn>and Q =< q1, ..., qm> be two polygonal chains. Define a mapping σ from the vertices of P to those of Qsuch that:1. if qj1= σ(pi1) and qj2= σ(pi2), and i1< i2then j1≤ j2(monotonicity)2. maxi||pi− σ(pi)|| is minimumFigure 23.3 shows an example where a matching between the backbones of two protein structures needs tobe monotone for biological significance to be preserved. This problem can be solved in O(mn) time using


View Full Document

Duke CPS 296.2 - Lecture 23: Hausdorff and Fre´chet distance

Download Lecture 23: Hausdorff and Fre´chet distance
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 23: Hausdorff and Fre´chet distance and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 23: Hausdorff and Fre´chet distance 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?