Sei sulla pagina 1di 3

Rigid Alignment of Two Sets of Points

AWM

1 Problem definition
Let X1 . . . Xn and Y1 . . . Yn two sets of points. Let

T : R2 −→ R2
T (x) = ρ · Rφ x + τ
be a rigid transformation, where ρ > 0 and
 
cos φ − sin φ
Rφ =
sin φ cos φ

Find the rigid transformation T that minimizes the error


1X
E(ρ, φ, τ ) = |T (Xi ) − Yi |2 (1)
2 i

1.1 Error minimization


Assume for simplicity that τ = 0. This can always be arranged by translating X1 . . . Xn by the vector determied
by the centers of mass of the two sets of points.
Additionally, let Rφ be of the form
 
c −s
R=
s c
and minimize
1X
E(ρ, c, s) = |T (X) − Y |2 (2)
2
subject to

c2 + s2 = 1

2 Gradient computation
X
∇E = < ∇T (X), T (X) − Y >

X
∂ρ E = < RX , ρRX − Y >
X X X
= ρ· |X|2 − c · < X, Y > −s · < Rπ/2 X, Y > (3)

1
X
∂c E = < ρX , ρRX − Y >
X X
= ρ2 c · |X|2 − ρ · < X, Y > (4)

X
∂s E = < ρRπ/2 X , ρRX − Y >
X X
= ρ2 s · |X|2 − ρ · < Rπ/2 X, Y > (5)

Let us denote

X
α = |X|2
X
β = < X, Y >
X
γ = < Rπ/2 X, Y > (6)

We must solve ∇E = 0 (we’ve used c2 + s2 = 1 in eqn 3). By eqn. 3, 4 and 5 we have

αρ − βc − γs = 0
2
αρ c − ρβ = 0
αρ2 s − ργ = 0

Solving for c and s from 2-nd and 3-rd equation and substituting in the first, we get

β2 γ2
αρ = +
αρ αρ
so

p
β2 + γ2
ρ = (7)
α
β
c = p (8)
β2 + γ2
γ
s = p (9)
β2 + γ2

where α, β and γ are given by eqn 6.

2
Figure 1: Blue: the X points. Red: the Y points. Green: T(X).

Potrebbero piacerti anche