\end{array}
  \right) = K^{-1}\left(
                    \begin{array}{c}
                      u_i \\
                      1 \\
                    \end{array}
                  \right)$$ Then the corresponding world point $p_i$ is transformed to the camera coordinates and satisfies $$\label{linep}
  \frac{R_1 p_i + t_x}{\tilde{u}_{i,x}} = \frac{R_2 p_i + t_y}{\tilde{u}_{i,y}} = R_3 p_i + t_z$$ where $R\triangleq (R_1^T,R_2^T,R_3^T)^T$ and $t \triangleq (t_x,t_y,t_z)^T$. Based on (\[linep\]), we have two constraints from a correspondence. Naturally, given another correspondence $u_j$ and $p_j$, we can have two more constraints as $$\label{linep2}
  \frac{R_1 p_j + t_x}{\tilde{u}_{j,x}} = \frac{R_2 p_j + t_y}{\tilde{u}_{j,y}} = R_3 p_j + t_z$$ According to (\[linep\]) and (\[linep2\]), we have linear constraints of the translation $t$. With proper variable substitutions among the constraints, and the globally observable pitch and roll angles from inertial measurements, we can eliminate $t$, reduce $SO(3)$ to $[-\pi,\pi]$, and derive TIM as $$\label{tim}
  d_p(\alpha) = d_{p,1} \sin \alpha + d_{p,2} \cos \alpha + d_{p,3}$$ where $\alpha$ is the unknown yaw angle, $d_{p,1}$, $d_{p,2}$, $d_{p,3}$ and the derivation details are presented in the Appendix. Now we substitute the constraints which are related to both $R$ and $t$ in (\[costrt\]) with the TIM, leading to $$\begin{aligned}
\label{costr}
  &\max_{R(\alpha),\{z_{ij}\}}\sum z_{ij} \\
  &s.t.~~~~ z_{ij} |d_{p,ij}(\alpha)| \leq n_{ij},~~i,j \in \mathfrak{P}\end{aligned}$$ where $n_{ij}=\min(n_i,n_j)$, $z_{ij}=1$ indicates the $i$-th and $j$-th 