Skip to main content
. 2019 Jan 21;19(2):427. doi: 10.3390/s19020427
Algorithm 2: Optimal transformation search.
input: ModelS and DataT with normals of size N×6 (N is the scale of Model/Data)
output: transformation T, correlation corr, iteration iter
1 initialize iter=0;stall=0;corr=0;T=eye(3)
2 extract normals NS and NT from S and T
3 HSH(NS); // see Equation (8)
4 while corr<0.98 and iter<50 do
5  estimate initial transformation Ttemp with Equations (15)∼(18)
6 HTH((Ttemp·(NT)T)T)
7  calculate corrtemp; // see Equation (19)
8 stallstall+1
9 ifcorr<corrtemp then
10   if corrtemp>corr×1.005 then
11    stallstall1
12   end if
13   corrcorrtemp
14   TTtemp·T
15   NT(Ttemp·(NT)T)T
16 end if
17 if stall3 and corrtemp<0.98 then
18   TTrand·T; // see Equation (20)
19   NT(Trand·(NT)T)T
20   stall0
21 end if
22 iteriter+1
23 end while