for R1PP$n$P.

\(1) *RANSAC Termination Condition*

The standard RANSAC termination condition [@fischler1981random] was employed for R1PP$n$P, that is

$$\label{eq_ransactermination}
trials \ge \log (1 - p)/\log (1 - {p_{\rm{inliers}} ^s}),$$

where $p$ is the certainty and we use $p = 0.99$ for all RANSAC-based methods in this paper, $trials$ is the number of RANSAC trials, $p_{\rm{inliers}} = $ (maximum number of detected inliers) / (number of all points), $s$ is the number of control points needed in each RANSAC trial. $s = 1$ for R1PP$n$P, and $s = 3,4$ for RANSAC+P3P and P4P respectively.

During the RANSAC process, the camera pose estimated by conventional RANSAC+P3P or P4P methods is based on very small number of points. Because of image noise, the estimated pose varies with different inliers as the control points. This is especially serious when the image noise is large. To improve accuracy, the termination condition suggests that the standard RANSAC scheme may continue looking for better results after finding a large percentage of inliers. In contrast, R1PP$n$P takes into account all points when estimating the pose, which makes it insensitive to the selected control point $o$. Therefore it is a reasonable assumption that when $p_{\rm{inliers}}$ is large enough (we 