= {\sum\limits_{i = 1,i \ne o}^N {\left( {\frac{1}{{{\lambda _i}}}\left\| {{{\bf{p}}_i} - {{\bf{q}}_i}} \right\|} \right)} ^2}.
\label{eq_objfun2}$$

As this objective function approaches the global optimal solution and as shown in Fig. \[fig\_bunnyimg\], point ${\bf{p}}_i$ gets close to ${\bf{q}}_i$ and the $z$-component of ${\bf{p}}_i$ gets close to $f\lambda_i$. Hence, it is expected that the objective function has similar optimal solutions as the conventional reprojection error cost, because

$$\begin{array}{*{20}{l}}
{f({{\bf{p}}_i},{{\bf{q}}_i})}\\
{ = \sum\limits_{i = 1,i \ne o}^N {{{\left\| {{{\left[ {\frac{{{{\bf{p}}_{i,x}}}}{{{\lambda _i}}},\frac{{{{\bf{p}}_{i,y}}}}{{{\lambda _i}}},\frac{{{{\bf{p}}_{i,z}}}}{{{\lambda _i}}}} \right]}^T} - {{\bf{x}}_i}} \right\|}^2}} }\\
{ \approx \sum\limits_{i = 1,i \ne o}^N {{{\left\| {{{\left[ {f\frac{{{{\bf{p}}_{i,x}}}}{{{{\bf{p}}_{i,z}}}},f\frac{{{{\bf{p}}_{i,y}}}}{{{{\bf{p}}_{i,z}}}},f} \right]}^T} - {{\left[ {{u_i},{v_i},f} \right]}^T}} \right\|}^2}} }.
\end{array}
\label{eq_objfun2_explaination}$$

Core Algorithm Design
=====================

We first introduce the core algorithm of R1PP$n$P, which solves the P$n$P problem in outlier-free situations. This section introduces the core algorithm process, proof of convergence, the local minima avoidance mechanism and the strategy to select the control point.

The core algorithm of R1PP$n$P is an optimal iterative process with the objective function or . In each iteration, it estimates the points set ${\bf{q}}_i$ and ${\bf{p}}_i$ $(i=1,...,N,i\neq o)$ alternately by fixing one points set and updating the other one according to the objective function minimization.

**(1) ${\bf{q}}_i$ estimation stage.**

Because each ${\bf{q}}_i$ 