Top Banner
Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 200
45
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Alignment

Introduction

Notes courtesy of Funk et al., SIGGRAPH 2004

Page 2: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Outline:• Challenge

• General Approaches

• Specific Examples

Page 3: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Alignment

Challenge:

The shape of a model does not change when acted on by similarity transformations:

=Scale

Rotation

Translation

Page 4: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

AlignmentChallenge:However, the shape descriptors can change if a the model is:

– Translated

– Scaled

– Rotated

How do we match shape descriptors across transformations that do not change the shape of a model?

Page 5: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Outline:• Challenge

• General Approaches

• Specific Examples

Page 6: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

AlignmentApproaches:Given the shape descriptors of two models, find the transformation(s) -- translation, scale, and rotation -- that minimize the distance between the two models:

– Exhaustive search– Closed form solution– Minimization – Normalization– Invariance

)()(min),(DTransforms,

nTmSnmTS

Page 7: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

AlignmentAside:Because translations and rotations preserve distances, applying such a transformation to one model is equivalent to applying the inverse transformation to the other one:

)()( 1 nSmnmS

=

Page 8: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

AlignmentAside:For translations and rotations we can simplify the alignment equation:

)()(min),(DTransforms,

nTmSnmTS

)(min),(DTransforms

nTmnmT

Page 9: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Exhaustive SearchApproach:

1. Compare the descriptors at all possible transformations.

2. Find the transformation at which the distance is minimal.

3. Define the model similarity as the value at the minimum.

Page 10: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Exhaustive SearchApproach:

1. Compare the descriptors at all possible transformations.

2. Find the transformation at which the distance is minimal.

3. Define the model similarity as the value at the minimum.

Exhaustive search for optimal rotation

Page 11: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Exhaustive SearchApproach:

1. Compare the descriptors at all possible transformations.

2. Find the transformation at which the distance is minimal.

3. Define the model similarity as the value at the minimum.

Page 12: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Exhaustive Search

Properties:

Always gives the correct answer Needs to be performed at run-time and can be

very slow to compute:Computes the measure of similarity for every transform. We only need the value at the best one.

Page 13: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Closed Form SolutionApproach:

Explicitly find the transformation(s) that solves the equation:

Properties:

Always gives the correct answer Only compute the measure of similarity for the best

transformation. A closed form solution does not always exist. Often needs to be computed at run-time.

)()(min),(DTransforms,

nTmSnmTS

Page 14: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

MinimizationApproach:• Coarsely align the models using low frequency information.• Progressively refine the alignment by comparing higher

frequency components and adjusting the alignment.• Converge to the (locally) optimal alignment.Example: Light field descriptors

Spherical Extent Function

Page 15: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

MinimizationApproach:• Coarsely align the models using low frequency information.• Progressively refine the alignment by comparing higher

frequency components and adjusting the alignment.• Converge to the (locally) optimal alignment.

Initial Models Low Frequency Aligned Models

Page 16: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

MinimizationApproach:• Coarsely align the models using low frequency information.• Progressively refine the alignment by comparing higher

frequency components and adjusting the alignment.• Converge to the (locally) optimal alignment.

=

= +

+

Initial Models Low Frequency Aligned ModelsHigh Frequency

Page 17: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Minimization

Properties:

Can be applied to any type of transformation Needs to be computed at run-time. Difficult to do robustly:

Given the low frequency alignment and the computed high-frequency alignment, how do you combine the two?

Considerations can include:• Relative size of high and low frequency info

• Distribution of info across the low frequencies

• Speed of oscillation

Page 18: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

NormalizationApproach:

Place every model into a canonical coordinate frame and assume that two models are optimally aligned when each is in its own canonical frame.

Example: COM, Max Radius, PCA

Scale

Rotation

Translation

Page 19: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Normalization

Properties: Can be computed in a pre-processing stage. For some transformations this is guaranteed to give

the optimal alignment. For other transformations the approach is only a

heuristic and may fail.

Failure of PCA-normalization in aligning rotations

Page 20: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

InvarianceApproach:

Represent every model by a descriptor that is unchanged when the model is transformed by discarding information that is transformation dependent.

Scale

Rotation

Translation

Transformation-invariant descriptor

Page 21: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

InvarianceReview:

Is there a general method for addressing these basic types of transformations?

Descriptor Translation Scale RotationShape Distributions (D2) + - +Extended Gaussian Images + - -Shape Histograms (Shells) - - +Shape Histograms (Sectors) - + -Spherical Parameterizations + - -

Page 22: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Invariance

Properties: Can be computed in a pre-processing stage. Works for translation, scale and rotation. Gives a more compact representation.Tends to discard valuable, discriminating, information.

0%

50%

100%

0% 50% 100%

Recall

Precision

GEDT (3D)

Harmonic (2D)

D2 (1D)

Shells (1D)

…….....No Invariance……..……Rotation

…Translation + Rotation………….…..Rotation

Page 23: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Outline:• Challenge

• General Approaches

• Specific Examples– Normalization: PCA– Closed Form Solution: Ordered Point Sets

Page 24: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

PCA Alignment

Treat a surface as a collection of points and define the variance function:

Sp

dpvpvSVar2

,),(

Page 25: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

PCA Alignment

Define the covariance matrix M:

Find the eigen-values and align so that the eigen-values map to the x-, y-, and z-axes

Sp

jiij dpppM

Page 26: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

PCA Alignment

Limitations:– Eigen-values are only defined up to sign!

PCA alignment is only well-defined up to axial flips about the x-, y-, and z-axes.

Page 27: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

PCA Alignment

Limitations:–Assumes that the eigen-values are distinct and therefore the eigen-vectors are well-defined (up to sign).

This is not always true and can make PCA alignment unstable.

Page 28: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Outline:• Challenge

• General Approaches

• Specific Examples– Normalization: PCA– Closed Form Solution: Ordered Point Sets

Page 29: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Ordered Point Sets

Challenge:

Given ordered point sets P={p1,…,pn}, Q={q1,…,qn}, find the rotation/reflection R minimizing the sum of squared differences:

n

iii qRpQPD

1

2)(),(

p1p2

p3

p4p5

p6

q1

q2

q3

q4

q5

q6

R(q2)R(q1)R(q3)

R(q4)R(q5)

R(q6)

q1

q2

q3

q4

q5

q6

RR

Page 30: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Review

Vector dot-product:

If v =(v1,…,vn) and w=(w1,…,wn) are two n-dimensional vectors the dot-product of v with w is the sum of the product of the coefficients:

n

iiiwvv,w

1

Page 31: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Review

Trace:

The trace of a nxn matrix M is the sum of the diagonal entries of M:

Properties:–

n

iiiMM

1,Trace

)(NMMN TraceTrace )( tMM TraceTrace

Page 32: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Review

Trace:

If M is any nxn matrix and D is a diagonal nxn matrix, then the trace of MD is the sum of the products of the diagonal entries.

nnnnnnnn

nnnnnnnn

nnnn

nnnn

n

n

nnnnnn

nnnnnn

nn

nn

mmmm

mmmm

mmmm

mmmm

mmmm

mmmm

mmmm

mmmm

,1,11,21,1

,11,112,121,11

,21,212,221,21

,11,112,121,11

1

2

1

,1,1,1,

,11,12,11,1

,21,22,21,2

,11,12,11,1

000

000

000

000

nnnnnn mmmmMD ,1,112,221,11)( Trace

M D

Page 33: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Review

Matrix multiplication:

If M and N are two then the (i,j)th entry of the matrix MN is the dot-product of the jth row vector of M with the ith column vector of N.

MN

jth row ith column

MN

(i,j)th entry

Page 34: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Review

Matrix dot-product:

If M and N are two mxn matrices then the ith diagonal entry of the matrix MtN is the dot-product of the ith column vector of M with the ith column vector of N.

Mt

N

ith row ith column

mn

nm

MtN

ith diagonal entry

Page 35: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Review

Matrix dot-product:

We define the dot-product of two mxn matrices, M and N, to be the trace of the matrix product:

(the sum of the dot-products of the column vectors).

NMM,N tTrace

Page 36: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Review

SVD Factorization:If M is an mxm matrix, then M can be factored as the product:

where D is a diagonal mxm matrix with non-negative entries and U and V are orthonormal (i.e. rotation/reflection) mxm matrices.

tUDVM

Page 37: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Trace Maximization

Claim:

If M is an mxm matrices, whose SVD factorization is:

then the orthonormal transformation R=VUt is the orthonormal transformation maximizing the trace:

tUDVM

RMTrace

Page 38: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Trace Maximization

Proof:

We can rewrite the trace equation as:

If we set R0 to be the rotation R0=VtRU, we get:

RUDV

RUDVRMt

t

Trace

TraceTrace

DRRM 0TraceTrace

Page 39: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Trace Maximization

Proof:

Since R0 is a rotation, each of its entries can have value no larger than one.

Since D is diagonal, the value of the trace is the product of the diagonal elements of D and R0.

DRRM 0TraceTrace

Page 40: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Trace Maximization

Proof:

To maximize the trace we want R0 to be maximal on the diagonal (i.e. have only 1’s).

Thus, R0 is the identity matrix and we have:

So that the rotation/reflection R that maximizes Trace(RM) is:

DRRM 0TraceTrace

RUVR t 0Identity

tVUR

Page 41: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Ordered Point Sets

Challenge:

Given ordered point sets P={p1,…,pn}, Q={q1,…,qn}, find the rotation/reflection R minimizing the sum of squared differences:

n

iii qRpQPD

1

2)(),(

Page 42: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Ordered Point Sets

Solution:

Use the fact that we can express the difference:

to rewrite the equation as:

wvwvwv ,2222

n

iiiii

n

iii

qRpqRp

qRpQPD

1

22

1

2

)(,2)(

)(),(

n

iii qRpQPD

1

2)(),(

Page 43: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Ordered Point Sets

Solution:

Use the fact that rotations preserves lengths:

to rewrite the equation as:

22)( vvR

n

iiiii

n

iiiii

qRpqp

qRpqRpQPD

1

22

1

22

)(,2

)(,2)(),(

n

iiiii qRpqRpQPD

1

22)(,2)(),(

Page 44: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Ordered Point Sets

Solution:

Since the value:

Does not depend on the choice of rotation R, minimizing the sum of squared distances is equivalent to maximizing the sum of dot-products:

n

iii qp

1

22

n

iii qRp

1

)(,

n

iiiii qRpqpQPD

1

22)(,2),(

Page 45: Alignment Introduction Notes courtesy of Funk et al., SIGGRAPH 2004.

Ordered Point Sets

Solution:

If we let MP (respectively MQ) be the 3xn matrix whose columns are the points pi (respectively qi) then we can rewrite the sum of the vector dot-products as the matrix dot product:

and we can find the maximizing rotation/reflection R by trace maximization.

tPQ

Qt

P

QP

n

iii

MRM

RMM

RMMqRp

Trace

Trace

,)(,1

n

iii

RqRp

1

)(,maxRotations