1 Matching Shapes with a Reference Point Volkan Çardak.

25
1 Matching Shapes with a Reference Point Volkan Çardak
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    232
  • download

    0

Transcript of 1 Matching Shapes with a Reference Point Volkan Çardak.

Page 1: 1 Matching Shapes with a Reference Point Volkan Çardak.

1

Matching Shapes with a Reference Point

Volkan Çardak

Page 2: 1 Matching Shapes with a Reference Point Volkan Çardak.

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

Page 3: 1 Matching Shapes with a Reference Point Volkan Çardak.

3

Measure for “resemblance”

Hausdorff-metric δH

Recall : For A, B element of Cd 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) }

Page 4: 1 Matching Shapes with a Reference Point Volkan Çardak.

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

Page 5: 1 Matching Shapes with a Reference Point Volkan Çardak.

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?

Page 6: 1 Matching Shapes with a Reference Point Volkan Çardak.

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 log3(nm) )

for TR = arbitrary translations

In [CGHKKK] an O( (nm)3 log2(nm) )

for TR = arbitrary rigid motions

Latter two not applicable

Page 7: 1 Matching Shapes with a Reference Point Volkan Çardak.

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 α

Page 8: 1 Matching Shapes with a Reference Point Volkan Çardak.

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

Page 9: 1 Matching Shapes with a Reference Point Volkan Çardak.

9

Reference Point example

Only applicable for translations Reference point rA= (xA

min ,yAmin )

The points rA and rB 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 rB to rA is also bounded by a constant factor times the Hausdorff distance of the matching.

figure

Page 10: 1 Matching Shapes with a Reference Point Volkan Çardak.

10

Reference Point example

With an optimal match then the following holds:

| xAmin – xB’

min | ≤ δ &

| yAmin – yB’

min | ≤ δ

(B’ is translated image of B)

rA is as reference point for A of quality √2

Page 11: 1 Matching Shapes with a Reference Point Volkan Çardak.

11

Reference Point example

Instead of finding optimal translation of B to match A we just match rB to rA 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

Page 12: 1 Matching Shapes with a Reference Point Volkan Çardak.

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 log3(mn) ) (recap from slide 6)

Which approximation algorithms, later in this presentation

Page 13: 1 Matching Shapes with a Reference Point Volkan Çardak.

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 Rd . A mapping r: Cd → Rd is called a reference point with respect to TR iff r is equivariant with respect to TR, i.e., for all A,B Є Cd 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 Є Cd ,

d2 ( r(A), r(B) ) ≤ c δH(A,B)

Page 14: 1 Matching Shapes with a Reference Point Volkan Çardak.

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.

Page 15: 1 Matching Shapes with a Reference Point Volkan Çardak.

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’) )

Page 16: 1 Matching Shapes with a Reference Point Volkan Çardak.

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”)

Page 17: 1 Matching Shapes with a Reference Point Volkan Çardak.

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.

Page 18: 1 Matching Shapes with a Reference Point Volkan Çardak.

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

Page 19: 1 Matching Shapes with a Reference Point Volkan Çardak.

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) )

Page 20: 1 Matching Shapes with a Reference Point Volkan Çardak.

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.

Page 21: 1 Matching Shapes with a Reference Point Volkan Çardak.

21

Reference point: Steiner Point Definition: Bd is the d-dimensional unit ball and Sd-1 its

boundary, the (n-1)- dimensional unit sphere in Rd .

Let A be a convex body (convex and compact subset) in Rd . The support function hA : Rd → R of A is given by:

hA (u) = max ‹a,u›

aЄA

The Steiner point s(A) of A is defined as

s(A) = d ∫ hA (u) u dω(u) ──── Sd-1

Vol (Sd-1 )

Page 22: 1 Matching Shapes with a Reference Point Volkan Çardak.

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(Bd-1 )

χd = ______________

Vol(Sd-1 )

Page 23: 1 Matching Shapes with a Reference Point Volkan Çardak.

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 ∙ vi

i=1

This can be done in lineair time

Page 24: 1 Matching Shapes with a Reference Point Volkan Çardak.

24

Reference point: Steiner PointTR running time loss 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

Page 25: 1 Matching Shapes with a Reference Point Volkan Çardak.

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