1 numerical geometry of non-rigid shapes in the rigid kingdom in the rigid kingdom lecture 4 ©...

41
1 cal geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book Numerical geometry of non-rigid shapes Stanford University, Winter 2009

Post on 21-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

1Numerical geometry of non-rigid shapes In the Rigid Kingdom

In the Rigid KingdomLecture 4

© Alexander & Michael Bronsteintosca.cs.technion.ac.il/book

Numerical geometry of non-rigid shapesStanford University, Winter 2009

Page 2: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

2Numerical geometry of non-rigid shapes In the Rigid KingdomImagine a glamorous ball…

Page 3: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

3Numerical geometry of non-rigid shapes In the Rigid KingdomA fairy tale shape similarity problem

Page 4: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

4Numerical geometry of non-rigid shapes In the Rigid Kingdom

Extrinsic shape similarity

Given two shapes and , find the degree of their incongruence.

Compare and as subsets of the Euclidean space .

Invariance to rigid motion: rotation, translation, (reflection):

is a rotation matrix,

is a translation vector

Page 5: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

5Numerical geometry of non-rigid shapes In the Rigid Kingdom

How to get rid of Euclidean isometries?

How to remove translation and rotation ambiguity?

Find some “canonical” placement of the shape in .

Extrinsic centroid (a.k.a. center of mass, or center of gravity):

Set to resolve translation ambiguity.

Three degrees of freedom remaining…

Page 6: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

6Numerical geometry of non-rigid shapes In the Rigid Kingdom

How to get rid of the rotation ambiguity?

Find the direction in which the surface has maximum extent.

Maximize variance of projection of onto

is the covariance matrix

Second-order geometric moments of :

is the first principal direction

Page 7: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

7Numerical geometry of non-rigid shapes In the Rigid Kingdom

How to get rid of the rotation ambiguity?

Project on the plane orthogonal to .

Repeat the process to find second and third principal directions .

Page 8: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

8Numerical geometry of non-rigid shapes In the Rigid Kingdom

Canonical basis

span a canonical orthogonal basis for in .

Page 9: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

9Numerical geometry of non-rigid shapes In the Rigid Kingdom

How to get rid of the rotation ambiguity?

Direction maximizing = largest eigenvector of .

and correspond to the second and third eigenvectors of .

admits unitary diagonalization .

Setting aligns with the standard basis

axes .

Principal component analysis (PCA), a.k.a. Karhunen-Loéve

transform (KLT), or Hotelling transform.

Bottom line: the transformation

brings the shape into a canonical configuration in .

Page 10: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

10Numerical geometry of non-rigid shapes In the Rigid Kingdom

Second-order geometric moments

Eigenvalues of are second-order moments of .

In the canonical basis, mixed moments vanish.

Ratio describe eccentricity of .

Magnitudes of express shape scale.

Page 11: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

11Numerical geometry of non-rigid shapes In the Rigid Kingdom

Higher-order geometric moments

Second-order moments allow some discrimination.

Use higher-order moments gives more discrimination.

-th order moment

Computed in the canonical basis.

Invariant to rigid motion.

Signature of moments

A fingerprint of the extrinsic geometry of .

Page 12: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

12Numerical geometry of non-rigid shapes In the Rigid Kingdom

A signal decomposition intuition

Moments are decomposition coefficients in the monomial basis

is a Dirac delta function for and

elsewhere.

span .

Page 13: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

13Numerical geometry of non-rigid shapes In the Rigid Kingdom

A signal decomposition intuition

uniquely identify a shape (up to a rigid motion).

can be reconstructed exactly from

is the bi-orthonormal basis, i.e.

The monomial basis is not orthogonal.

The bi-orthonormal basis is ugly, but we do not need to reconstruct .

Page 14: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

14Numerical geometry of non-rigid shapes In the Rigid Kingdom

Truncated signatures of moments

Compute the truncated moment signature

Construct a moments distance function, e.g.

A distance function on the shape of spaces.

Quantifies the extrinsic dissimilarity of and .

Page 15: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

15Numerical geometry of non-rigid shapes In the Rigid Kingdom

Moments distance

is small for nearly congruent and .

is large for strongly non-congruent and .

If and are truly congruent, .

However, does not imply that and are

congruent (unless ).

Which shapes are indistinguishable by ?

Ideally, congruent at a coarse resolution (“low frequency”) and

differing in fine details (“high frequency”).

Degree of coarseness is controlled by the moments order .

Geometric moments do not satisfy this requirement.

Page 16: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

16Numerical geometry of non-rigid shapes In the Rigid Kingdom

Other moments

Instead of the monomial basis, other bases can be chosen

Fourier basis

Spherical harmonics, Zernike polynomials, wavelets, etc, etc.

Page 17: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

17Numerical geometry of non-rigid shapes In the Rigid Kingdom

Moments of joy, moments of sorrow

Joy:

Shape similarity is translated to similarity of moment signatures.

Comparison of moments signatures is fast (e.g. Euclidean

distance).

Sorrow:

Do not allow for partial similarity!

Page 18: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

18Numerical geometry of non-rigid shapes In the Rigid Kingdom

Given two shapes and , find the best rigid motion

bringing as close as possible to :

is some shape-to-shape distance.

Minimum = extrinsic dissimilarity of and .

Minimizer = best rigid alignment between and .

ICP is a family of algorithms differing in

The choice of the shape-to-shape distance.

The choice of the numerical minimization algorithm.

Iterative closest point (ICP) algorithms

Page 19: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

19Numerical geometry of non-rigid shapes In the Rigid Kingdom

Shape-to-shape distance

The Hausdorff distance

is the distance between a point and

the shape .

is the distance between a point and

the shape .

Page 20: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

20Numerical geometry of non-rigid shapes In the Rigid Kingdom

Shape-to-shape distance

A non-symmetric version is preferred to allow for partial similarity

The (max-min) formulation is sensitive to outliers.

Use the variant

is a point-to-shape distance.

Different possibilities to define .

Page 21: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

21Numerical geometry of non-rigid shapes In the Rigid Kingdom

Point-to-point distance

Treat as a cloud of points.

Find the closest point to on .

Define the distance as

Page 22: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

22Numerical geometry of non-rigid shapes In the Rigid Kingdom

Point-to-plane distance

Treat as a plane, and define the point-to-plane distance

is the normal to the surface at point .

Can be approximated as

Page 23: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

23Numerical geometry of non-rigid shapes In the Rigid Kingdom

Point-to-plane distance is a first-order

approximation of the true point-to-shape distance.

Construct a second-order approximation

are the principal curvature radii at .

are the principal directions.

is the signed distance to the closest point.

Second-order point-to-shape distance

Page 24: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

24Numerical geometry of non-rigid shapes In the Rigid Kingdom

Second-order point-to-shape distance

The second-order distance approximant may become negative for

some values of .

Use a non-negative quadratic approximant

Page 25: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

25Numerical geometry of non-rigid shapes In the Rigid Kingdom

Second-order point-to-shape distance

“Near-field” case – point-to-plane distance

“Far-field” case – point-to-point distance

Page 26: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

26Numerical geometry of non-rigid shapes In the Rigid Kingdom

Second-order point-to-shape distance

Second-order distance generalizes the point-to-point and the point-to-

plane distances.

Gives more accurate alignment between shapes.

Requires principal curvatures and directions (second-order quantities).

Page 27: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

27Numerical geometry of non-rigid shapes In the Rigid Kingdom

Iterative closest point algorithm

Initialize

Find the closest point correspondence

Minimize the misalignment between corresponding points

Update

Iterate until convergence…

Page 28: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

28Numerical geometry of non-rigid shapes In the Rigid Kingdom

Closest points

How to find closest points efficiently?

Straightforward complexity:

number of points on , number of points on .

divides the space into Voronoi cells

Given a query point , determine to which cell it belongs.

Page 29: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

29Numerical geometry of non-rigid shapes In the Rigid Kingdom

Closest points

Page 30: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

30Numerical geometry of non-rigid shapes In the Rigid Kingdom

Approximate nearest neighbors

To reduce search complexity, approximate Voronoi cells.

Use binary space partition trees (e.g. kd-trees or octrees).

Approximate nearest neighbor search complexity: .

Page 31: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

31Numerical geometry of non-rigid shapes In the Rigid Kingdom

Given two sets and of corresponding points.

Find best alignment

A numerical minimization algorithm can be used.

For some point-to-shape distances, a closed-form solution exists.

Best alignment

Page 32: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

32Numerical geometry of non-rigid shapes In the Rigid Kingdom

MATLAB® intermezzoIterative closest point algorithm

Page 33: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

33Numerical geometry of non-rigid shapes In the Rigid Kingdom

Until convergence…

ICP should find the solution of

Instead, it solves

Correspondence fixed to instead of .

Not guaranteed to produce a monotonically decreasing sequence of

values of .

Not guaranteed to converge!

Page 34: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

34Numerical geometry of non-rigid shapes In the Rigid Kingdom

Enter numerical optimization

Treat

as a numerical minimization problem.

Express the distance terms as a quadratic function

is a 3×3 symmetric positive definite matrix,

is 3×1 vector, and is a scalar.

Page 35: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

35Numerical geometry of non-rigid shapes In the Rigid Kingdom

Local quadratic approximant

Point-to-point distance:

Point-to-plane distance:

Page 36: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

36Numerical geometry of non-rigid shapes In the Rigid Kingdom

Local quadratic approximant

Minimize

over .

Dependence of and on might be complicated.

For small motion , hence

Page 37: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

37Numerical geometry of non-rigid shapes In the Rigid Kingdom

Minimization variables

is required to be unitary (orthonormal).

Enforcing orthonormality is cumbersome.

Minimization w.r.t. to the rotation angles

involves nonlinear functions.

Under small motion assumption,

Linearize rotation matrix

Page 38: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

38Numerical geometry of non-rigid shapes In the Rigid Kingdom

Let Newton be!

Linearized rotation yields a quadratic objective w.r.t .

Use a Newton step to find the steepest descent direction.

Approximation is valid only for small steps.

Use Armijo rule to find a fractional step ensuring sufficient

decrease of objective function.

What is a fractional step?

Page 39: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

39Numerical geometry of non-rigid shapes In the Rigid Kingdom

Fractional step

Let be a small transformation, which applied times gives .

is a rotation by .

Hence

Page 40: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

40Numerical geometry of non-rigid shapes In the Rigid Kingdom

Iterative closest point algorithm revisited

Initialize

Find closest point correspondence

Construct local quadratic approximant of

Find Newton direction

Use Armijo rule to find such that

Update

Iterate until convergence…

Page 41: 1 Numerical geometry of non-rigid shapes In the Rigid Kingdom In the Rigid Kingdom Lecture 4 © Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

41Numerical geometry of non-rigid shapes In the Rigid Kingdom

Iterative closest point algorithm revisited

Coefficients of the quadratic approximant can be

computed on demand using efficient nearest neighbor search.

Alternative: approximate the values of in the space

using a space partition tree.