slow. With the change of detected number of inliers in a larger window size, the termination decision can be more robust and efficient, as shown in Fig. \[fig\_testTerminationA\](b).

The refinement stage makes pose estimation results more accurate based on the detected inliers. Without the reweighting mechanism, the convergence process is much simple. Hence the *termination condition B* is satisfied when the estimated rotation becomes stable, that is,

$$\label{eq_terminationB}
\left\| {{{\bf{R}}^{(k)}} - {{\bf{R}}^{(k - 1)}}} \right\| < 1e-5.$$

Experiments
===========

\[htp\] ![Except for REPP$n$P and R1PP$n$P, most P$n$P methods cannot handle outliers.[]{data-label="fig_pnpcannothandleoutliers"}](figures/cannothandleoutlierR.pdf "fig:"){width=".24\textwidth"} ![Except for REPP$n$P and R1PP$n$P, most P$n$P methods cannot handle outliers.[]{data-label="fig_pnpcannothandleoutliers"}](figures/cannothandleoutlierT.pdf "fig:"){width=".24\textwidth"}

\[htp\] ![image](figures/ordinary_no_outliers_sigma/Rmean.pdf){width=".42\textwidth"} ![image](figures/ordinary_no_outliers_sigma/Tmean.pdf){width=".42\textwidth"}

\[htp\] ![image](figures/quasi_no_outliers_sigma/Rmean.pdf){width=".42\textwidth"} ![image](figures/quasi_no_outliers_sigma/Tmean.pdf){width=".42\textwidth"}

\[htp\] ![image](figures/ordinary_no_outliers_npts/Timemean.pdf){width=".42\textwidth"} ![image](figures/quasi_no_outliers_npts/Timemean.pdf){width=".42\textwidth"}

The performance of the proposed R1PP$n$P algorithm was evaluated by comparing against the state-of-the-art P$n$P methods. The source code was implemented in MATLAB scripts and executed on a computer with an Intel Core i7 2.60 GHz CPU. We used both synthetic and real-world data to conduct evaluation experiments. The initial values for R1PP$n$P are ${\bf{R}} = diag\left \{ 1,1,1\right \} $ and $\mu = 1e-4$. RANSAC+P3P or P4P methods also used the standard termination condition .

Synthetic Experiments
---------------------

Synthetic experiments in this paper shared the following 