Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Matching Shapes with a Reference Point Volkan Çardak.

Similar presentations


Presentation on theme: "1 Matching Shapes with a Reference Point Volkan Çardak."— Presentation transcript:

1 1 Matching Shapes with a Reference Point Volkan Çardak

2 2 Problem Given two figures A,B Determine how much they “resemble each other” Figure = union of finitely many points and line segments in two dimensions or triangles in three dimensions

3 3 Measure for “resemblance” Hausdorff-metric δ H Recall : For A, B element of C d let → δ H (A,B) := max min d2 (a,b) a Є A b Є B Hausdorff-distance between two sets A and B → → δ H (A,B):= max {δ H (A,B), δ H (B,A) }

4 4 Measure for “resemblance” This can be done in O((n+m) log(n+m)) [ABB] But more natural: Figures A,B are not fixed but can be moved So a need for transformations  Translation  Rigid motion  Similarity

5 5 So what to determine? min δ H ( A,T(B) ) T Є TR Does it make any difference if we exchange the sets A and B in this problem?

6 6 Finding optimal matches in 2d In [ABB] an algorithm of O( (nm log(nm) log*(nm) ) for TR = translation along one fixed direction In [AST] one of O( (nm) 2 log 3 (nm) ) for TR = arbitrary translations In [CGHKKK] an O( (nm) 3 log 2 (nm) ) for TR = arbitrary rigid motions Latter two not applicable

7 7 Optimal vs Approximation Try not to find an optimal solution but an approximation to the optimal one by simpler algorithms Let’s assume optimal match yields the Hausdorff- distance δ These simpler algortihms will find a matching T such that δ H ( A,T(B) ) ≤ αδ constant α>1 Approximate matching with loss factor α

8 8 How to do the approximation? The idea is to use “reference points” for the approximation algortihms By using reference points with the approximation algorithms more favourable run time Before we take a look at the defintion let’s take a look at a simple reference point

9 9 Reference Point example Only applicable for translations Reference point r A = (x A min,y A min ) The points r A and r B that are assigned to sets A,B have the property that when B is transformed to match A optimally, then the distance of the transformed r B to r A is also bounded by a constant factor times the Hausdorff distance of the matching. figure

10 10 Reference Point example With an optimal match then the following holds: | x A min – x B’ min | ≤ δ & | y A min – y B’ min | ≤ δ (B’ is translated image of B) r A is as reference point for A of quality √2

11 11 Reference Point example Instead of finding optimal translation of B to match A we just match r B to r A to obtain an image B” of B. δ H ( A,B” ) ≤ δ H ( A,B’ ) + δ H ( B’,B” ) ≤ (√2 + 1) δ So the Hausdorff-distance of the match found by the reference points is at most by a factor √2 + 1 ≈ 2.4 worse than the optimal one

12 12 Optimal vs Approximation (again) The approximation algorithm has a lineair running time, since you only need to determine the reference points Best known algorithm for finding the optimal match O( (mn) 2 log 3 (mn) ) (recap from slide 6) Which approximation algorithms, later in this presentation

13 13 Reference Point (definition) So far we have only seen an example of a reference point for translations Definition: Let TR be a set of transformations on R d. A mapping r: C d → R d is called a reference point with respect to TR iff  r is equivariant with respect to TR, i.e., for all A,B Є C d and T Є TR we have r ( T(A) ) = T ( r(A) ) and  There exists some constant c ≥ 0 such that if for all A,B Є C d, d 2 ( r(A), r(B) ) ≤ c δ H (A,B)

14 14 Approximation algorithms Based on the existence of a reference point for TR there are the following 3 algorithms for approximately optimal matchings where TR stand for the set of translations, rigig motions and similiraty transformations.

15 15 Approximation algorithms Algorithm T 1. Compute r(A) and r(B) and translate B by r(A) - r(B) (so that r(B) is mapped onto r(A) ). Let B’ be the image of B. 2. Output B’ as the approximately optimal solution ( tohether with the Hausdorff-distance δ H (A,B’) )

16 16 Approximation algorithms Algorithm R 1. As in Algorithm T. 2. Find an optimal matching of A and B’ under rotations of B’ around r(A). 3. Output the solution B” and the Hausdorff-distance δ H (A,B”)

17 17 Approximation algorithms Algorithm S 1. As in Algorithm T. 2. Determine the diameters d(A) and d(B) and scale B’ by α:= d(A) / d(B) around the center r(A). 3. as step 2 in algorithm R with the scaled image of B’. 4. as step 3 in algorithm R.

18 18 Loss factors of the algorithms These algorithms are simpler than the ones for finding the optimal solutions, since after step 1 the matchings are restricted to ones leaving the reference point invariant → in d dimensions this eliminates d degrees of freedom. Algorithm T finds approximately optimal matching for translations with loss factor α = c+1 Algorithm R finds approximately optimal matching for rigid motions with loss factor α = c+1 Algorithm S finds approximately optimal matching for similarity transformations with loss factor α = c+3

19 19 Runtimes algorithms Algorithm T : lineair Algorithm R : problem is how to find the optimal matching under rotations. This can be done in O( nmlog(nm) log*(nm) ) in the plane [ABB]. So this is also the overall runtime Algorithm S : also O( nmlog(nm) log*(nm) )

20 20 Reference point: Steiner Point We have seen a reference point which holds for translations. Now let’s take a look at the Steiner Point, which is a reference point which for translations, rigid motions, scaling.

21 21 Reference point: Steiner Point Definition: B d is the d-dimensional unit ball and S d-1 its boundary, the (n-1)- dimensional unit sphere in R d. Let A be a convex body (convex and compact subset) in R d. The support function hA : R d → R of A is given by: h A (u) = max ‹a,u› aЄA The Steiner point s(A) of A is defined as s(A) = d ∫ hA (u) u dω(u) ──── S d-1 Vol (S d-1 )

22 22 Reference point: Steiner Point The Steiner point is a reference point for similarity transformations in arbitrary dimension d≥2. Quality is χ d. 2d Vol(B d-1 ) χ d= ______________ Vol(S d-1 )

23 23 Reference point: Steiner Point For a polygon the Steiner point can be computed easily. It is the weighted average of the vertices where each vertex is weighted by its exterior angle divided by 2 π. n s(P) = 1/(2 π) ∑ φ i ∙ v i i=1 This can be done in lineair time

24 24 Reference point: Steiner Point TRrunning timeloss factor translations d=2 d=3 O((n + m) log( n+m) O ( H (n,m) ) 4/π + 1 ≈ 2.27 2.5 rigid motions d=2 d=3 O(nm log(nm)log*(nm)) O((nm)3H(n,m)) 4/π + 1 2.5 similarities d=2 d=3 O(nm log(nm)log*(nm)) O((nm)3H(n,m)) 4/π + 3 ≈ 4.27 4.5

25 25 References [AAR] O.Aichholzer, H.Alt and G.Rote, Matching shapes with a Reference Point, 2001 [ABB] H.Alt, B.Behrends and J.Blömer, Approximate matching of polygonal shapes, Proceedings 7th Annual Symposium on Computational Geometry, 1991, 186-193 [AST] P.J. Agarwal, M.Sharir and S.Toledo, Applications of parametric searching in geometric optimization, Proc. 3rd ACM- SIAM Sympos.Dicrete Algorithms, 1992, 72-82 [CGKKK] P.P.Chew, M.T.Goodrich, D.P. Huttenlocher, K.Kedem, J.M. Kleinberg. D.Kravets, Geometric pattern matching under Euclidean motion, Proc.5th Canadian Conference on Computational Geometry, 1993, 151-156


Download ppt "1 Matching Shapes with a Reference Point Volkan Çardak."

Similar presentations


Ads by Google