Skip to main content
. 2016 Sep 27;16(10):1589. doi: 10.3390/s16101589
Algorithm 2 Global Scale Recovery for RGB images + Pau Ta Norm and RANSAC
Input: PC={Pi|1iN}: 3D points from RGB images; PD={Pi|1iN}: 3D points from depth images
Output: S
1. Fs=
2. For i = 1→[N×(N1)]2 do
3.  Randomly select 2 points from PC,PD, compute scale value S
4.  Fs=FsS
5. End for
6. Compute the mean value S¯ and the root-mean-square error σ
7. nInliermax=0, S = 0
8. While Iterations <= MaxIterations do
9.   nInlier=0, Fs=
10.  Randomly select 5 scale values from Fs, compute the mean value Sc
11.  For i = 1→[N×(N1)]2 do
12.   If |ScS¯|<3σ then
13.    nInlier = nInlier + 1
14.    Fs=FsSc
15.   End if
16.  End for
17.  If nInlier > n3DInliermax then
18.   nInliermax= nInlier
19.   S=n=0nInliermaxFsnnInliermax
20.  End if
21. End while
22. Return S