Algorithm
1: Non-rigid alignment for two point clouds in neighboring views. |
-
1:
point cloud Q:= down-sampled P1 (50 mm)
-
2:
point cloud S1:= down-sampled P1 (15 mm), point cloud S2 := down-sampled P2 (15 mm)
-
3:
new embedded deformation graph G with G.node_amount = Q.point_amount
-
4:
for i:= 1 to Q.point_amount
-
5:
G.node[i].xyz := Q.point[i].xyz
-
6:
G.node[i].translation_matrix:= 3 × 1 zero matrix
-
7:
G.node[i].rotation_matrix:= 3 × 3 identity matrix
-
8:
end for
-
9:
while not reach max iteration times or stop condition
-
10:
for i:= 1 to S1.point_amount
-
11:
S1.point[i].correspondence:= corresponding point in S2
-
12:
end for
-
13:
matrix X:= all rotation matrix and translation matrix in G
-
14:
new Gauss-Newton iterator (X = arg min ())
-
15:
new matrix f
-
16:
while not satisfy precision requirement
-
17:
compute matrix f according to
fTf =
-
18:
matrix J := jacobian_matrix(f)
-
19:
Cholesky_Decompositon.solve_linear_equation
Obtain the iteration where JTJ Δhk = −JTf
-
20:
X:= X + h
-
21:
Update E;
-
22:
end while
-
23:
deform P1 with G
-
24:
end while
|