Skip to main content
. 2016 Sep 27;16(10):1589. doi: 10.3390/s16101589
Algorithm 1 False matches rejection combining depth information + RANSAC
Input: D={pji|1iN, 1jM}: feature matches set in image space; C= {qji|1iN, 1jM}: 3D points corresponding to feature matches; dXYZ: distance threshold in object space for RANSAC iterations; duv: distance threshold in image space
Output: number of inliers: n2DInlier, Inliers: F = {pji|1iN, 1jM}
1. F=
2. For i = 1→n do
3.  Iterations = 0, n3DInliermax=0, G =
4.  While Iterations <= MaxIterations do
5.   n3DInlier = 0
6.   Randomly select 5 feature points in current feature matches from qi, compute the mean value of 3D coordinates qi
7.   For qi{qi} do
8.    If qiqi < R.E.XYZ then
9.      n3DInlier = n3DInlier + 1
10.     3DInliers= 3DInliers{qi}
11.     End if
12.   End for
13.   If n3DInlier > n3DInliermax then
14.    n3DInliermax= n3DInlier
15.    G=3DInliers
16.   End if
17.  End while
18.  qi=n=0n3DInliermaxGnn3DInliermax
19.  n2DInlier = 0, f=
20.  For j = 1→m do
21.   Let qi backproject to j-th Frame, obtain the backprojected image point p1ji
22.   If pjip1ji < R.E.uv then
23.    f=fpji
24.    n2DInlier=n2DInlier+1
25.   End if
26.  End for
27.  If n2DInlier3 then
28.   F=Ff
29.  End if
30. End for
31. Return n2DInlier,F