## 2 Materials and Methods
### Problem Statement and Method
#### 2.3.2 Proposed Method  
In this section we convert our problem to a P3P problem as shown in Figure 3 and then obtain the values of intermediate variables by P3P solvers [13; 16]. From Figure 3, We systematically formulate this problem in the following basic procedures:  
(1) This step involves the definition of three new 3D points \(X_{i}^{\tau}(i=1,2,3)\) and a new world frame \(\tau\) from the original image points \(x_{i}(u_{i},\upsilon_{i})\). \(X_{i}^{\tau}\) is on the ray \(O_{c}x_{i}\) and \(O_{c}x_{i}/O_{c}X_{i}^{\tau}=d\), where \(d\) is pixel size. The new world frame is defined as \(\tau=\left(O_{\tau},\overrightarrow{\tau_{x}},\overrightarrow{\tau_{y}}, \overrightarrow{\tau_{z}}\right)\), where  
\[ \begin{array}{l}\overrightarrow{\tau_{x}}=\overrightarrow{u}\\ \overrightarrow{\tau_{y}}=\overrightarrow{\upsilon}\\ \overrightarrow{\tau_{z}}=\overrightarrow{\tau_{x}}\times\overrightarrow{ \tau_{y}}\end{array}  \tag{6}\]  
Figure 2: Our problem. \(\overset{\rightarrow}{u}\), \(\overset{\rightarrow}{v}\) are parallel with the \(x\)-axis and \(y\)-axis of the original image frame, respectively. \(O_{\tau}\) is on the ray \(O_{c}l\) and \(O_{c}l/O_{c}O_{\tau}=d\). Then, we can obtain the new 3D points in the new world frame:  
\[ \begin{array}{c}X_{1}^{\tau}=\left(\begin{array}{ccc}u_{1}&v_{1}&0\\ x_{2}^{\tau}=\left\{\begin{array}{ccc}u_{2}&v_{2}&0\\ u_{3}&v_{3}&0\end{array}\right.\end{array}\right)\\ \end{array}  \tag{7}\]  
(2) We make the original 3D points \(X_{i}(i=1,2,3)\) as the new image points \(x_{i}^{\eta}(i=1,2,3)\). In addition, this step involves the definition of a new principal point \(x_{0}^{\eta}\) and a new camera frame \(\eta\) from the original 3D points \(X_{i}(i=1,2,3)\). The new camera frame is defined as \(\eta=\left(O_{\eta},\overset{\rightarrow}{\eta}_{x},\overset{\rightarrow}{ \eta}_{y},\overset{\rightarrow}{\eta}_{z}\right)\), where \(O_{\eta}\) is the camera position \(O_{C}\) and  
\[ \begin{array}{c}\overset{\rightarrow}{\eta}_{x}=\frac{x_{1}^{\top}x_{2}}{ \|X_{1}X_{2}^{\prime}\|}\\ \overset{\rightarrow}{\eta}_{z}=\frac{\overset{\rightarrow}{\eta}_{x}^{ \top}x_{1}X_{3}}{\|\overset{\rightarrow}{\eta}_{x}^{\top}x_{1}X_{2}^{\prime}\| }\\ \overset{\rightarrow}{\eta}_{z}=\overset{\rightarrow}{\eta}_{z}\times \overset{\rightarrow}{\eta}_{x}\end{array}  \tag{8}\]  
Via the transformation matrix \(N=\left[\overset{\rightarrow}{\eta}_{x},\overset{\rightarrow}{\eta}_{y}, \overset{\rightarrow}{\eta}_{z}\right]^{T}\), the original 3D points in the original world frame \(S_{W}\) can be transformed into \(\eta\) using  
\[X_{i}^{\eta}=N\cdot(X_{i}-O_{c}) \tag{9}\]  
Now we define a new camera system whose camera frame is \(\eta\) and image plane \(S\) contains points \(X_{i}\). Then, the new principal point \(x_{0}^{\eta}\) is the projection \(X_{0}\) from the point \(O_{\eta}\) to the plane \(S\). (3) The focal length \(f_{\eta}\) of the new camera system can be given by \(f_{\eta}=\|\overset{\rightarrow}{O_{\eta}x_{0}^{\eta}}\|\). Figure 3: Converting to a P3P problem. (4) In a new camera system, the pixel size is 1 and the new image points \(x_{i}^{\eta}(i=1,2,3)\) can be obtained by  
\[x_{i}^{\eta}=\frac{X_{i}-X_{0}}{f_{\eta}} \tag{10}\]  
(5) Now we have obtained three new 2D-3D point correspondences \(\left(x_{i}^{\eta},X_{i}^{\tau}\right)\) and up to four possible solutions \(\left(R_{j},T_{j}\right)\) can be obtained by the existing P3P solvers. Via the solutions \(\left(R_{j},T_{j}\right)\), points in new world frame \(\tau\) can be transformed into \(\eta\) using  
\[X_{i}^{\eta}=R_{j}X_{i}^{\tau}+T_{j},1\leq j\leq 4 \tag{11}\]  
Since the origin of the new camera frame \(\eta\) is the camera position, the  
(6) Determination of a unique solution.