Title: On the ICP Algorithm
1On the ICP Algorithm
- Esther Ezra Micha Sharir
- Alon Efrat
2The algorithm Besl Mckay 92
- Input
- A a1, , am, B b1, , bn A,B ? Rd
- Goal
- Translate A by a vector t ? Rd, s.t., ?(At,B) is
minimized. - The (1-directional) cost function
The cost function (measures resemblance).
The nearest neighbor of a in B.
A , B
3The algorithm
- The algorithm is based on local improvements.
- Repeat At each iterarion i
- Assign each point ati-1 ? Ati-1 to its NN b
NB(ati-1) . - Compute the relative translation ?ti that
minimizes ? with respect to this fixed (frozen)
NN-assignment.Translate the points of A by ?ti
(to be aligned to B). ti ? ti-1 ?ti . - Stop when the value of ? does not decrease.
The overall translation vector previously
computed.t0 0 .
Some of the points of A may acquire new NN in B.
4The algorithm Convergence
- Besl Mckay 92.
- The value of ??2 decreases at each iteration.
- The algorithm monotonically converges to a local
minimum. - This applies for ??? as well.
A local minimum of the ICP algorithm.
a1
a2
a3
b1
b2
b3
b4
The global minimum is attained when a1, a2, a3
are aligned on top of b2, b3, b4 .
5NN and Voronoi diagrams
- Each NN-assignment can be visualized by the
Voronoi diagram V(B) of B. - b is the NN of a
-
- a is contained in the Voronoi cell V(b) of V(B).
6- The problem under the RMS measure
7The algorithm An example in R1
- ?(At,B) RMS(t)
- Iteration 1
Solving the equation RMS(t)0 .
?(A,B) ? 3
m4, n2.
a3 1
a4 3
a1 -3-?
a2 -1
b1 0
b2 4
?t1 ? 1
(b1b2)/2 2
8An example in R1 Continue
Iteration 2
?(A?t1,B) ? 2
a4 ?t1
a3 ?t1
a2 ?t1
a1?t1
b1 0
b2 4
?t2 1
(b1b2)/2 2
Iteration 3
?(A?t1?t2,B) ? 1
a1 ?t1 ?t2
a2 ?t1 ?t2
a3 ?t1 ?t2
a4 ?t1 ?t2
b1 0
b2 4
NN-assignment does not change. ?t3 0
(b1b2)/2 2
9Number of iterations An upper bound
- The value of ? is reduced at each iteration,
since - The relative translation ?t minimizes ? with
respect to the frozen NN-assignment. - The value of ? can only decrease with respect to
the new NN-assignment (after translating by ?t). - No NN-assignment arises more than once!
- iterations NN-assignments (that the algorithm
reaches)
10Number of iterations A quadratic upper bound in
R1
am
a2
a1
ai
b1
b2
bn
bj
bj1
?t
ai crosses into a new Voronoi cell.
- Critical event The NN of some point ai is
changed. - Two consecutive NN-assignments
differ by one pair (ai,bj) . - NN-assignments ? (ai,bj) ai ? A, bj ? B
nm.
11The bound in R1
- Is the quadratic upper bound tight???
- A linear lower bound construction (n2) ?(m)
m2k2, n2
a2 -2k1
am-1 2k-1
am 2k1
a1 -2k-1
b1 0
b2 4k
(b1b2)/2 2k
Using induction on i1,, k/2 .
Tight! (when n2) .
12Structural properties in R1
- Lemma
- At each iteration i?2 of the algorithm
- Corollary (Monotonicity)
- The ICP algorithm always moves A in the same
(left or right) direction.Either ?ti ? 0 for
each i?0, or ?ti ? 0 for each i?0.
Use induction on i.
13A super-linear lower bound construction in R1.
The construction (mn) a1 -n - ?(n-1), ai
(i-1)/n -1/2 ?, bi i-1, for i1, , n.
mn
b1 0
b2 1
?1 1/2
Theorem The number of iterations of the ICP
algorithm under the above construction is ?(n log
n).
14Iteration 2
b2 1
b3 2
Iteration 3
b3 2
b2 1
b4 3
At iteration 4, the NN of a2 remains unchanged
(b3) Only n-2 points of A cross into V(b4).
15The lower bound construction in R1.
- Lemma
- Suppose that the n-1 rightmost points of A are
assigned - to bn-j1 and bn-j2 , j1, , n. Consider the
round j of all iterations in - which some of the point of A cross ?n-j1
(bn-j1 bn-j2) / 2 . - Then
- At each such iteration i, .
- The overall number of points of A that cross
?n-j1 is exactly j. (except for the last
iteration). - At the last such iteration, the overall number of
points of A that cross either ?n-j1 or ?n-j2 is
exactly j-1.
iterations of the round ? n/j .
At the next round, iterations of the round ?
n/(j-1) .
16The lower bound construction in R1.
- The overall number of iterations
17The lower bound construction in R1Proof of the
lemma
- Using induction on j, properties (i), (ii)
(iii) - Consider the last iteration i of round j
llt j points has not crossed ?n-j1 yet.
The black points still remain at V(bn-j2).
bn-j2
bn-j1
bn-j3
The points a2, , al1 cross ?n-j1, and
an-(j-l-2), , an cross ?n-j2 . Overall number
of crossing points l j - l -1 j - 1.
QED
18General structural properties in Rd
- Theorem
- Let A a1, , am, B b1, , bn be two
point sets in Rd. - Then the overall number of NN-assignments, over
all translated copies of A, is O(mdnd). - Proof
- Critical event The NN of ait is changed from
bj to bj1 - The translation t lies on the common boundary
- of V(bjai) and V(bj1ai) .
-
t
bj1 - ai
bj - ai
Voronoi cells of the shifted diagram V(B-ai) .
bk - ai
19The upper bound in Rd
- t critical events for (a fixed) ai
- Boundaries of all cells in V(B-ai) .
- t critical event for all ai, i1,,m
- Boundaries of all cells in the overlay M(A,B) of
V(B-a1),, V(B-am). - NN-assignments cells in M(A,B) .
Each cell of M(A,B) consists of translations with
a common NN-assignment.
20The upper bound in Rd
- Claim
- The overall number of cells of M(A,B) is O(mdnd).
- Proof
- We charge each cell of M(A,B) to some vertex v of
it(v is charged at most 2d times). - v arises as the vertex in the overlay Md of only
d diagrams. - The complexity of Md is O(nd) Koltun Sharir
05. - There are d-tuples of diagrams
V(B-a1),, V(B-ad).
QED
21The upper bound in RdLower bound construction
for M(A,B)
1/m
d2
A
Vertical cells Minkowski sums of vertical cells
of V(B) and (reflected) horizontal points of A .
1
B
M(A,B) contains ?(nm) horizontal cells that
intersect ?(nm) vertical cells ?(n2m2) cells.
Horizontal cells Minkowski sums of horizontal
cells of V(B) and (reflected) vertical points of
A .
22The upper bound in Rd
- The lower bound construction can be generalized
to any dimension d. - Open problem
- Does the ICP algorithm can step through all
(many) NN-assignment in a single execution? - d1
- Upper bound O(n2).
- Lower bound ?(n log n).
Probably no.
23Monotonicity
- d1
- The ICP algorithm always moves A in the same
(left or right) direction. - Generalization d?1
- Let ? be the connected path obtained by
concatenating the ICP relative translations ?t.
(? starts at the origin.) - Monotonicity ? does not intersect itself.
?
24Monotonicity
- Theorem
- Let ?t be a move of the ICP algorithm from
translation t0 to t0 ?t . Then RMS(t0? ?t) is
a strictly decreasing function of ?. - ? does not intersect itself.
The cost function is monotone decreasing along ?t.
?t
25Proof of the theorem
The Voronoi surface, whose minimization diagram
is V(B-a).
- SB-a(t) minb?B at-b2 minb?B (t2
2t(a-b) a-b2) - RMS(t)
- SB-a(t) - t2 is the lower envelope of n
hyperplanes - SB-a(t) - t2 is the boundary of a
concave polyhedron. - Q(t) RMS(t) - t2 is the average of SB-a(t)
- t2a?A - Q(t) is the boundary of a concave
polyhedron.
The average of m Voronoi surfaces S(B-a).
26Proof of the theorem
Replace f(t) by the hyperplane h(t) containing
it. h(t) corresponds to the frozen NN-assignment.
The NN-assignment corresponding to t0 defines a
facet f(t) of Q(t), which contains the point
(t0,Q(t0)).
t0
The image of ?t along h(t)t2 is a monotone
decreasing function.
?t
Since Q(t) is concave, and h(t) is tangent to
Q(t) at t0, the image of ?t along Q(t)t2
decreases more strongly than the image along
h(t)t2 .
QED
27More structural properties of ?
- Corollary
- The angle between any two consecutive edges of ?
is obtuse. - Proof
- Let ?tk, ?tk1 be two consecutive edges of ? .
- Claim
- ?tk1 ? ?tk ? 0
?
a must cross the bisector of b, b.
b NB(atk)
a
?tk
b NB(atk-1)
QED
28More structural properties Potential
- Lemma
- At each iteration i?1 of the algorithm,
- (i)
- (ii)
- Corollary
- Let ?t1, , ?tk be the relative translations
computed by the algorithm. Then
Due to (i)
Due to (ii)
Cauchy-Schwartz inequality
29More structural properties Potential
- Corollary
- d1
- Trivial
- d?2
- Given that ?ti ? ? , for each i?1, then
tk
?
Since
? does not get too close to itself.
30- The problem under the Hausdorff measure
31The relative translation
- Lemma
- Let Di-1 be the smallest enclosing ball of
ati-1 NB(ati-1) a ? A. Then ?ti moves
the center of Di-1 to the origin. - Proof
Any infinitesimal move of D increases the
(frozen) cost.
The radius of D determines the (frozen) cost
after the translation.
a3
a2
a3-b3
a3-b3?t
a2-b2
a2-b2?t
b2
b3
o
o
D
b1
?t
b4
D
a4-b4?t
a4-b4
a4
a1-b1
QED
a1
a1-b1?t
32No monotonicity (d ? 2)
- Lemma
- In dimension d?2 the cost function does not
necessarily decreases along ?t . - Proof
Final distances a2?t-b a3?t-b r
, a1?t-b lt r .
Initially, a1-b max ai-b gt r , i1,2,3
.
The distances of a2, a3 from b increase.
?t
a2
a2?t
r
b
a3
?t
c
a3?t
b
a1
a1?t
b
The distance of a1 from its NN always decreases.
b
QED
33The one-dimensional problem
- Lemma (Monotonicity)
- The algorithm always moves A in the same (left or
right) direction. - Proof
- Let a-bmaxa?A NB(a)-a .
- Suppose, w.l.o.g., a lt b.
- a-b is the left endpoint
- of D0, and its center c lt 0.
- ?t1 gt 0, ?t1 lt a-b .
- a?t1 lt b, so b is still the
- NN of a?t1 .
- a?t1-bmaxa?A a?t1-NB(a)gt
a?t1-NB(a?t1) - a?t1-b is the left endpoint of D1.
- The lemma follows using induction.
Initial minimum enclosing ball.
?t
D0
0
c
a-b
aNB(a)
a, b still determine the next relative
translation.
0
a?t1-b
a?t1NB(a)
QED
34Number of iterations An upper bound
The ratio between the diameter of B and the
distance between its closest pair.
- Theorem
- Let ?B be the spread of B.
- Then the number of iterations that the ICP
algorithm executes is O((mn) log ?B /log n). - Corollary
- The number of iterations is O(mn) when ?B is
polynomial in n (the constant of proportionality
is linear in the degree of that polynomial bound).
35The upper bound Proof sketch
- Based on the fact that the pair a, b that
satisfies a-bmaxa?A NB(a)-a always
determines the left endpoint of Di. -
- Put Ik b-(atk) .
- Classify each relative translation ?tk
- Short if
- Long otherwise.Overall O(n log ?B /log n).
Easy
36The upper bound Proof sketch
- Short relative translations
- a ? A involves a short relative translation at
the k-th iteration, - atk-1 NB(atk-1) is large.
- a ? A involves in an additional short relative
translation - a has to be translated further by
atk-1 NB(atk-1) . - Ik b-(atk) must decrease
significantly.
b1
bj
bj1
Ik-1
a
a1
?tk
37Number of iterations A lower bound construction
Theorem The number of iterations of the ICP
algorithm under the following construction (mn)
is ?(n).
- At the i-th iteration
- ?ti 1/2i , for i1,,n-2 .
- Only ai1 crosses into the next cell V(bi2).
- The overall translation length is lt 1.
b1
b2
bn
bi
n-1
n
a1
a2
an
ai