1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid...

53
1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D

Transcript of 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid...

Page 1: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

1

Yago Diez and J. Antoni Sellarès

Universitat de Girona

Colored Point SetMatching under rigid motion

in 3D

Page 2: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

2

Overview

- Introduction

- Matching Algorithm

- Enumeration

- Testing

- Lossless Filtering Preprocessing Step

- Conclusions and Future Work

Page 3: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

3

Overview

- Introduction

- Matching Algorithm

- Enumeration

- Testing

- Lossless Filtering Preprocessing Step

- Conclusions and Future Work

Page 4: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

4

“Substructure search in proteins”

Motivation

Given a Protein, find all the occurrences of a secondary structure:

Proteins are formed by amino acid molecules

Only twenty types of standard amino acids.

Every amino acid relates to a unique alpha-carbon.

Page 5: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

5

Problem formulation:

Given two sets of colored points in space A and B, |A| < |B|, find all

the subsets B’ of B that can be expressed as rigid motions of A.

Introduction

We want:

• the points to approximately match (fuzzy nature of real data).

• the colors to coincide.

(*) Rigid motion: composition of a translation and a rotation.

Page 6: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

6

AB

Given two colored points sets A and B, n=|A|, m=|B|, n < m,

and a real positive number ε, determine all the rigid motions τ

for which there exists a subset B’ of B, |B’|=|A|, such that:

db (τ(A),B’) ε (Bottleneck distance)

Colored Point Set Matching Problem Definition

Page 7: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

7

Overview

- Introduction

- Matching Algorithm

- Enumeration

- Testing

- Lossless Filtering Preprocessing Step

- Conclusions and Future Work

Page 8: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

8

Matching Algorithm

- Two main parts:

• Enumeration

• More difficult than in 2D

• Numerical problems

• Testing

• Bipartite matching algorithm

• The data structures used in 2D can be adapted.

Noisy Matching Algorithm

Page 9: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

9

Matching Algorithm

IDEA:

Generate all possible motions τ that may bring set A near some B’

Enumeration: (2D)

LEMMA:

If there exist a matching of A to B then there is one that maps two points bi, bj to the circles of center ak , al and radius ε (boundary of noise regions).

Page 10: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

10

Matching Algorithm

Enumeration: 2D

We rule out all those pairs of point whose colors do not coincide.

1.- For every quadruple, generate “all” possible rigid motions

Partition of [0,2π [

2.- For every representative rigid motion, execute Testing algorithm.

Page 11: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

11

Matching Algorithm

IDEA:

Generate all possible motions τ that may bring set A near some B’

Enumeration: 3D

LEMMA:

If there exist a matching of A to B then there is one that maps three points bi, bj bk to the spheres of center ap aq , ar and radius ε (boundary of noise regions).

Page 12: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

12

Matching Algorithm

Enumeration: 3D

Generate:

- Volume described by the fourth vertex of a teterahedron when the other three vertices move on the surfaces of three spheres of the same radius.

- Algebraic volume.

- Numerical problems.

Page 13: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

13

Page 14: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

14

Page 15: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

15

Page 16: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

16

Matching Algorithm

Enumeration: 3D

In order to know when two points may be matched, intesect the resulting surfaces with spheres.

Page 17: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

17

Page 18: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

18

Matching Algorithm

Enumeration: 3D

We obtain cells in the space of parameters (cube of side 2π )

Page 19: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

19

Page 20: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

20

Page 21: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

21

Overview

- Introduction

- Matching Algorithm

- Enumeration

- Testing

- Lossless Filtering Preprocessing Step

- Conclusions and Future Work

Page 22: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

22

Matching Algorithm

For every motion τ representative of an equivalence class, find a matching of cardinality n between τ(A) and S.

Testing (bi`partite matching algorithm)

A set of calls to Neighbor operation corresponds to one range search operation in a skip octree

Neighbor ( D(T), q )

Delete ( D(T), s )

Corresponds to a deletion operation in a skip octree.

Amortized cost of Neighbor, Delete: t(n)

Under adequate assumptions t(n) = log n

Page 23: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

23

Matching Algorithm

Arrangement size:

O( n5 m5 λq (nm) )

Total cost (testing every cell):

O( n6 m5 λq (nm) t(n,n’) )

Computational Cost

Page 24: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

24

Overview

- Introduction

- Matching Algorithm

- Enumeration

- Testing

- Lossless Filtering Preprocessing Step

- Conclusions and Future Work

Page 25: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

25

Our Approach

The main goal is to transform the problem into a series of smaller instances.

We will use a conservative strategy to discard, cheaply and at an early stage, those subsets of B where no match may happen.

Then we will execute the matching algorithm that we have already described

Page 26: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

26

Candidate Zone Determination

What geometric parameters, invariant for rigid motion, do we consider ?

- number of Colored Points,- histogram of colors,- maximum and minimum distance between disks of the same color,- …

There cannot be any subset B‘ of B that approximately matches A fully contained in the four top-left squares, because A contains twelve colored Points and the squares only six.

Page 27: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

27

Candidate Zone Determination (3D)

Page 28: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

28

Candidate Zone Determination (2D)Candidate Zone Search Algorithm

a

b

b

c

Three search functions needed for every type of zone according to the current node:

-Search type a zones. -Search type b zones. -Search type c zones.

Page 29: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

29

Candidate Zone Determination (3D)Candidate Zone Search Algorithm

Four search functions needed for every type of zone according to the current node:

- Type a zones -> Inside the node.- Type b zones -> Overlapping two nodes. - Type a zones -> Overlapping four nodes. - Type a zones -> Overlapping eight nodes.

The search begins at the root and continues until nodes of size s are reached.

Early discards will rule out of the search bigger subsets of B than later ones.

Page 30: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

30

Overview

- Introduction

- Matching Algorithm

- Enumeration

- Testing

- Lossless Filtering Preprocessing Step

- Conclusions and Future Work

Page 31: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

31

Our Approach: Conclusions

CONCLUSIONS

- Uses a conservative pruning technique.

- Is implementable.

- There exist the possibility of adapting it to specific problems.

-Is parallelizable.

-FUTURE WORK

- Approximate algorithm

-

Page 32: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

32

QUESTIONS?

Page 33: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

33

Yago Diez and J. Antoni Sellarès

Universitat de Girona

Colored Point SetMatching under rigid motion

in 3D

Page 34: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

34

Matching Algorithm

Exact

Enumeration

Approximate

Page 35: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

35

Candidate Zone Determination

Initial step

1. Determine an adequate square bounding box of A.

2s (size s)

2. Calculate associated geometric information.

Page 36: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

36

Candidate Zone Determination

Page 37: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

37

Candidate Zone Determination

Candidate zone determination algorithm complexity:

O(max{m log m, c(t - s)})

- c: number of candidate zones

- t (root quadtree size) and s depend on the size of

the bounding boxes of A and B.

- In practice we expect t-s to be close to constant

and c in O(m).

Page 38: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

38

“Constellation recognition problem”

Motivation

Given a constellation of stars:

determine whether it exists in the night sky (fixed magnification):

Stars can be seen as disks with radii determined by their brightness (discrete range).

Page 39: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

39

Candidate Zone Determination Calculate quadtree of B with geometric parameters.

.

.

.

.

.

.

Page 40: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

40

Candidate Zone Determination

- Search’s first step:

3 – Candidate Zone Search Algorithm

...

...

Sites = 550

Sites = 173Sites = 113 Sites = 131 Sites = 133

23 5756

3720 6 53 34

54 12 1451 49 46 34 4

0 6 1 16

1 3 22 313 11 1 22

20 19 6 11

-Target number of sites = 25

- Launch search1? yes(in four sons)

- Launch search2? yes (all possible couples)- Launch search3? yes

(possible quartet)

Page 41: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

41

Candidate Zone Determination

- Search’s first step:

3 – Candidate Zone Search Algorithm

...

...

Sites = 550

Sites = 173Sites = 113 Sites = 131 Sites = 133

23 5756

3720 6 53 34

54 12 1451 49 46 34 4

0 6 1 16

1 3 22 313 11 1 22

20 19 6 11

-Target number of sites = 25

- Launch search1? yes(in three sons)

- Launch search2? yes (all possible couples)- Launch search3? yes

(possible quartet)

Page 42: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

42

Example

Consider:

A

B

Find:

Page 43: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

43

Candidate Zone Determination

Page 44: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

44

Candidate Zone Determination Execution Tests

\A\ \B\ NUMBER OF CANDIDATE

ZONES

TOTAL TIME (seconds)

8 259216 19193 5

8 275216 19625 6

8 316816 20075 6

25 35550 82 1

25 49550 84 2

25 117550 4343 2

25 180050 4756 3

25 247550 5010 5

Page 45: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

45

Given two ball sets A and B, n=|A|, m=|B|, n < m, and a real

number ε, determine all the isometric transformations τ for

which there exists a subset S’ of B such that:

db (τ(A),S’) ε

Noisy Ball Matching Problem Definition

Page 46: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

46

Efrat et al. Matching Algorithm

All endpoints of these angle intervals partition the interval [0, 2 [ in O(n2) subintervals, so that for all angles in one interval the same points of B are mapped into the same neighborhoods of points of A.

All these relationships are represented as edges in a bipartite graph whose two sides of nodes are A and B.

If there is an angle for which the corresponding graph has a perfect matching, then the associated motion approximately matches A and B.

Page 47: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

47

Efrat et al. Matching Algorithm

To find all perfect matchings, traverse the subintervals from left to right:

- For angle = 0, find the maximum matching. If it is a perfect matching, keep the associated motion.

- For each one of the remaining O(n2) subintervals, check if its corresponding graph together with the previous matching contains an augmenting path. If we obtain a perfect matching, keep the associated motion.

- Finding an augmenting path, using a layered graph, takes O(n log n) time.

Page 48: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

48

Efrat et al. Matching Algorithm

For a query point q, returns a point in D(B) whose distance to q is at

most ε, if it exists.

Neighbor(D(B),q)

Delete(D(B),s)

Deletes the point s from D(B).

• Cost of Neighbor and Delete: O(log m), m=|B|.

• Difficult to implement.

To build the layered graph, a data structure D(B) with two main operations is used:

Page 49: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

49

Efrat et al. Matching Algorithm

For each one of the O(n4) 4-tuples: ak, al, bi, bj

there are O(n2) subintervals where

to find a perfect matching in O(n log n) time.

Total cost: O(n4) O(n2) O(n log n) = O(n7 log n).

Computational Cost

Page 50: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

50

Candidate Zone Determination

- Search’s first step:

3 – Candidate Zone Search Algorithm

...

...

Sites = 550

Sites = 173Sites = 113 Sites = 131 Sites = 133

23 5756

3719 5 54 35

54 12 1451 49 46 34 4

0 6 1 16

1 3 22 313 11 1 22

20 19 6 11

-Target number of sites = 25

- Launch search1? yes(in two sons)

- Launch search2? yes (three possible couples)- Launch search3? yes

(possible quartet)

Page 51: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

51

Candidate Zone Determination

...

...

Sites = 550

Sites = 173Sites = 113 Sites = 131 Sites = 133

23 5756

3720 6 53 34

54 12 1451 49 46 34 4

0 6 1 16

1 3 22 313 11 1 22

20 19 6 11

Example with geometric parameter: number of disks

Page 52: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

52

Candidate Zone Determination

...

...

Sites = 550

Sites = 173Sites = 113 Sites = 131 Sites = 133

23 5756

3720 6 53 34

54 12 1451 49 46 34 4

0 6 1 16

1 3 22 313 11 1 22

20 19 6 11

Example with geometric parameter: number of disks

Page 53: 1 Yago Diez and J. Antoni Sellarès Universitat de Girona Colored Point Set Matching under rigid motion in 3D.

53

IntroductionLet A, B be two disk sets of the same cardinality.

A radius preserving bijective mapping f : A B maps each disk D(a, r) to a distinct and unique disk f(D(a,r))= D(b,s) so that r = s.

Let F be the set of all radius preserving bijective mappings between A and B.

The Bottleneck Distance between A and B is is defined as:

db(A , B) = min f F max D(a,r) A d(D(a,r), f(D(a,r))).

|F| may severely diminish when the disks in A and B have a high number of different radii.