Download - 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

Transcript
Page 1: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

1Numerical geometry of non-rigid shapes Iterative closest point algorithms

Iterative closest point algorithmsTutorial 4

© Maks Ovsjanikovtosca.cs.technion.ac.il/book

Numerical geometry of non-rigid shapesStanford University, Winter 2009

Page 2: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

2Numerical geometry of non-rigid shapes Iterative closest point algorithms

Outline

Closed-form solution of absolute orientation using unit quaternions. Horn, B. K. P., Journal of the Optical Society of America, Vol. 4 1987

1.Problem Formulation.

2.Intuition.

3.Some Math.

Robust Global Registration Gelfand N., Mitra N., Guibas L., Pottmann H., Proceedings of SGP, 2005

Formulation.

1.Problem and Motivation.

2.Multi-Scale point descriptors.

3.Global Matching – Branch and Bound.

4.Results.

Page 3: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

3Numerical geometry of non-rigid shapes Iterative closest point algorithms

Closed-form solution of absolute orientation using unit quaternions. Horn, B. K. P., Journal of the Optical Society of America, Vol. 4 1987

Problem Formulation:

1. Given two sets points: in . Find the rigid transform:

and that minimizes:

Page 4: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

4Numerical geometry of non-rigid shapes Iterative closest point algorithms

Closed-form solution of absolute orientation using unit quaternions. Horn, B. K. P., Journal of the Optical Society of America, Vol. 4 1987

Problem Formulation:

1. Given two sets points: in . Find the rigid transform:

and that minimizes:

Page 5: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

5Numerical geometry of non-rigid shapes Iterative closest point algorithms

Closed-form solution of absolute orientation using unit quaternions. Horn, B. K. P., Journal of the Optical Society of America, Vol. 4 1987

Problem Formulation:

1. Given two sets points: in . Find the rigid transform:

and that minimizes:

2. In practice, have many points. Perform this step many times. Want a fast way to

get an exact solution. Representation is important.

Page 6: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

6Numerical geometry of non-rigid shapes Iterative closest point algorithms

Given two sets points: in . Find the rigid transform:

and that minimizes:

Finding the translation part .1. Let and : the centroids of and

and let and . Then .

2. where:

minimized if

Page 7: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

7Numerical geometry of non-rigid shapes Iterative closest point algorithms

Given two sets points: in . Find the rigid transform:

and that minimizes:

Need to find the rotation .1. Several ways to represent rotation: Orthonormal matrix, Euler angle, Gibbs vector,

quaternions, etc. Which one is most useful in this case?

2. Plan of action:

Want to minimize

Since rotation preserves lengths. Need to maximize:

Question: What unit vector maximizes if is symmetric?

Answer: Eigenvector corresponding to the maximum eigenvalue of .

Page 8: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

8Numerical geometry of non-rigid shapes Iterative closest point algorithms

Given two sets points: in . Find the rigid transform:

and that minimizes:

Need to find the rotation .2. Plan of action:

Need to maximize:

3. If represent using orthonormal matrices, then get:

Would prefer: , where is a vector and - matrices

Quaternions allow us to express rotation in such form.

Page 9: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

9Numerical geometry of non-rigid shapes Iterative closest point algorithms

Quaternions (two slides intro).

1. Vectors with 4 components, 3 of which are imaginary:

2. Multiplication is defined using the rules:

from which follows:

In matrix form:

3. Dot product:

Matrices associated with unit quaternions are orthonormal.

Page 10: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

10Numerical geometry of non-rigid shapes Iterative closest point algorithms

Quaternions (two slides intro).

4. Conjugation: . Matrix corresponding to the conjugate is

the transpose of the original.

5. Regular vectors can be represented with purely imaginary quaternions:

6. Rotation can be represented with composite product by a unit quaternion :

where .

Conversely, every unit quaternion corresponds to a rotation.

Page 11: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

11Numerical geometry of non-rigid shapes Iterative closest point algorithms

Back to Alignment.

1. Want to maximize:

2. In quaternion form:

3. The optimal rotation quaternion is the eigenvector corresponding to the maximum

eigenvalue of:

Page 12: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

12Numerical geometry of non-rigid shapes Iterative closest point algorithms

Summary

Efficient algorithm to find the optimal translation and rotation in the

rigid alignment, provided that the correspondences are known.

Uniform scaling can be found similarly:

Quaternions provide a simple and efficient way to represent rotations.

Other methods: SVD, Orthogonal Matrices, Dual Quaternions

Closed-form solution of absolute orientation using unit quaternions. Horn, B. K. P., Journal of the Optical Society of America, Vol. 4 1987

Estimating 3-D rigid body transformations: a comparison of four major

algorithms. Eggert et al., Machine Vision and Applications, Vol. 9 1997

Page 13: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

13Numerical geometry of non-rigid shapes Iterative closest point algorithms

Outline

Closed-form solution of absolute orientation using unit quaternions. Horn, B. K. P., Journal of the Optical Society of America, Vol. 4 1987

1.Problem Formulation.

2.Intuition.

3.Some Math.

Robust Global Registration Gelfand N., Mitra N., Guibas L., Pottmann H., Proceedings of SGP, 2005

Formulation.

1.Problem and Motivation.

2.Multi-Scale point descriptors.

3.Global Matching – Branch and Bound.

4.Results.Images by N. Gelfand

Page 14: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

14Numerical geometry of non-rigid shapes Iterative closest point algorithms

Robust Global Registration Gelfand, Mitra, Guibas, Pottmann, Proceedings of SGP, 2005

Problem:

Given:

Two shapes P and Q which partially overlap.

Using only rigid transforms, register Q against P by minimizing the squared distance between them.

Goal:

No assumptions about initial positions!

Page 15: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

15Numerical geometry of non-rigid shapes Iterative closest point algorithms

Approaches

• Rigid transform can be specified with small number of parameters– Try all possible transform bases– Find the one that aligns the most points

• Guaranteed to find the correct transform– But can be costly

Page 16: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

16Numerical geometry of non-rigid shapes Iterative closest point algorithms

Approaches

• Use neighborhood geometric information

• Descriptors should be– Invariant under transform– Local– Cheap

• Improves correspondence search or used for feature extraction

[Mokh 01, Huber 03, Li 05]

Page 17: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

17Numerical geometry of non-rigid shapes Iterative closest point algorithms

Registration Problem

• Why it’s hard– Unknown areas of overlap– Have to solve the correspondence problem

• Why it’s easy– Rigid transform is specified by small number of points– Prominent features are easy to identify

We only need to align a few points correctly.

Page 18: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

18Numerical geometry of non-rigid shapes Iterative closest point algorithms

Method Overview

1. Use descriptors to identify features– Integral volume descriptor

2. Build correspondence search space– Few correspondences for each feature

3. Efficiently explore search space– Distance error metric– Pruning algorithms

Page 19: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

19Numerical geometry of non-rigid shapes Iterative closest point algorithms

Integral Descriptors

• Multiscale

• Inherent smoothing

f(x)p

Br(p)

[Manay 04]

Page 20: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

20Numerical geometry of non-rigid shapes Iterative closest point algorithms

Integral Volume Descriptor

• Related to mean curvature.

• Provably robust to noise.

0.20

Page 21: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

21Numerical geometry of non-rigid shapes Iterative closest point algorithms

Descriptor Computation

• Approximate using a voxel grid

– Convolution of occupancy grid with ball

Page 22: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

22Numerical geometry of non-rigid shapes Iterative closest point algorithms

Feature Identification

• Pick as features points with rare descriptor values– Rare in the data rare in the model few correspondences

• Works for any descriptor

0

10

20

30

40

50

60

70

80

90

100

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Descriptor value

# o

ccu

ren

ces

Features

Page 23: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

23Numerical geometry of non-rigid shapes Iterative closest point algorithms

Multiscale Algorithm

• Features should be persistent over scale change

r=0.5 r=1 r=2 r=4 r=8

Y Y Y N N

N N Y Y Y

N N Y N N

Page 24: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

24Numerical geometry of non-rigid shapes Iterative closest point algorithms

• Search the whole model for correspondences– Range query for descriptor values– Cluster and pick representatives

Correspondence Space

PQ

Page 25: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

25Numerical geometry of non-rigid shapes Iterative closest point algorithms

Evaluating Correspondences

• Coordinate root mean squared distance

– Requires best aligning transform– Looks at correspondences individually

Page 26: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

26Numerical geometry of non-rigid shapes Iterative closest point algorithms

Rigidity Constraint

• Pair-wise distances between features and correspondences should be the same

PQ

Page 27: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

27Numerical geometry of non-rigid shapes Iterative closest point algorithms

Rigidity Constraint

• Pair-wise distances between features and correspondences should be the same

PQ

Page 28: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

28Numerical geometry of non-rigid shapes Iterative closest point algorithms

Evaluating Correspondences

• Distance root mean squared distance

– Depends only on internal distances

Page 29: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

29Numerical geometry of non-rigid shapes Iterative closest point algorithms

Search Algorithm

• Few features, each with few potential correspondences– Minimize dRMS– Exhaustive search still too expensive

PQ

Page 30: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

30Numerical geometry of non-rigid shapes Iterative closest point algorithms

Branch and Bound.

• Find global minimum of a function.

Search Space:

Page 31: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

31Numerical geometry of non-rigid shapes Iterative closest point algorithms

Branch and Bound.

• Find global minimum of a function.

Search Space:

1.Split (Branch).

2.Bound.

3.Prune:If min2 > max1, can remove branch 2.

min1

max1

min2

max2

Page 32: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

32Numerical geometry of non-rigid shapes Iterative closest point algorithms

• Branch and bound– Initial bound using greedy assignment

• Discard partial correspondences that fail thresholding test–

• Prune if partial correspondence exceeds bound– Spaced out features make incorrect correspondences fail quickly

• Since we explore the entire search space, we are guaranteed to find optimal alignment– Up to cluster size

Search Algorithm

pi

pjqj

qiRc

Page 33: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

33Numerical geometry of non-rigid shapes Iterative closest point algorithms

Search Algorithm

• Branch and bound– Initial bound using greedy assignment

• Discard partial correspondences that fail thresholding test–

• Prune if partial correspondence exceeds bound– Spaced out features make incorrect correspondences fail quickly

• Since we explore the entire search space, we are guaranteed to find optimal alignment– Up to cluster size

Page 34: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

34Numerical geometry of non-rigid shapes Iterative closest point algorithms

Greedy Initialization

• Good initial bound is essential• Build up correspondence set hierarchically

Page 35: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

35Numerical geometry of non-rigid shapes Iterative closest point algorithms

Greedy Initialization

• Good initial bound is essential• Build up correspondence set hierarchically

Page 36: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

36Numerical geometry of non-rigid shapes Iterative closest point algorithms

Greedy Initialization

• Good initial bound is essential• Build up correspondence set hierarchically

Page 37: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

37Numerical geometry of non-rigid shapes Iterative closest point algorithms

Partial Alignment

• Allow null correspondences, while maximizing the number of matches points

Page 38: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

38Numerical geometry of non-rigid shapes Iterative closest point algorithms

Alignment Results

Input: 2 scans Alignment Refined by ICP

Page 39: 1 Numerical geometry of non-rigid shapes Iterative closest point algorithms Iterative closest point algorithms Tutorial 4 © Maks Ovsjanikov tosca.cs.technion.ac.il/book.

39Numerical geometry of non-rigid shapes Iterative closest point algorithms

Alignment Results

Input: 10 scans

Alignment Refined by ICP