# Sparse Indoor Camera Positioning with Fiducial Markers
## 3 Proposed Method
### Group Pose Graphs  
As previously indicated, we use a set of markers  
To that end, we first create a group pose quiver (Figure 3c), where nodes represent markers, and edges are the pair-wise pose relationship between markers obtained from its image observations. The quiver is then refined into a group pose graph that is ultimately optimized using sparse graph optimization.  
A marker is a squared planar object whose four corners \(c_{l}\in\mathbb{R}^{3}\) can be expressed regarding the center of the marker as follows:  
\[c_{l}=\left\{\begin{array}{lcl}(\begin{array}{ccc}s/2,&s/2,&0\end{array} )&if&l=1\\ (\begin{array}{ccc}s/2,&-s/2,&0\end{array})&if&l=2\\ (\begin{array}{ccc}-s/2,&-s/2,&0\end{array})&if&l=3\\ (\begin{array}{ccc}-s/2,&s/2,&0\end{array})&if&l=4\end{array}\right., \tag{10}\]  
where \(s\) is the length of the marker sides. Let us denote \(m_{l,l}^{f_{j}}\) as the observed positions of the corner \(l\) of marker \(m_{i}\) in image \(f_{j}\). Using the PnP solution [35], we estimate the relative pose from the marker to the image:  
\[\varphi_{m_{i}}^{g^{\frac{s}{2},f_{j}}}\in SE(3),(m_{i},f_{j})\in O^{s^{k}}. \tag{11}\]  
Furthermore, if more than one marker is observed in image \(f_{j}\), we obtain a pair-wise relationship between any two markers \(m_{i}\) and \(m_{t}\) observed. Thus, we shall denote  
\[\varphi_{m_{i}m_{t}}^{g^{\frac{s}{2},f_{j}}}=\varphi_{m_{i}}^{g^{\frac{s}{2}, f_{j}}}\bigg{(}\varphi_{m_{t}}^{g^{\frac{s}{2},f_{j}}}\bigg{)}^{-1} \tag{12}\]  
Figure 3: Group pose graphs. (**a**) An example of a camera group is where the moving camera and its views are represented as purple pyramids. (**b**) Frames captured with the moving camera _mc_. (**c**) Group pose quiver for this example with images \(\{f_{1},f_{2},f_{3},f_{4},f_{5}\}\). (**d**) Pose graph for the pose quiver.  
as the transform that moves from marker \(m_{i}\) to \(m_{t}\) given the observation from \(f_{j}\).  
A pose quiver, as shown in Figure 3c, is constructed from all pair-wise combinations, with nodes symbolizing markers and edges depicting their pair-wise relationships. Among all potential edges connecting markers, the one exhibiting the minimal reprojection error is chosen to form a group pose graph (see Figure 3d), where the edges \(\phi_{m_{i},m_{j}}^{k}\) illustrate the relationships between markers.  
To obtain an initial estimation of the marker poses before the optimization process, we select one of the markers \(m_{i}\) as the local reference system (i.e., \(m_{1}\)) and apply [PERSON]'s algorithm to determine the best path to all other nodes. Then, an initial estimation \(\hat{\mathcal{M}}s^{k}\) of the local marker poses \(\mathcal{M}s^{k}\) is obtained by following the paths as follows:  
\[\phi_{m_{1}}^{s^{k}} =0 \tag{13}\] \[\phi_{m_{2}}^{s^{k}} =\varphi_{m_{1},m_{2}}^{s^{k}}\] \[\phi_{m_{l}}^{s^{k}} =\varphi_{m_{1},m_{l}}^{s^{k}}\varphi_{m_{i},m_{j}}^{k}\ldots \varphi_{m_{l},m_{l}}^{s^{k}}\]  
Similarly, we obtain an initial estimation \(\hat{\mathcal{F}}s^{k}\) of the image poses \(\mathcal{F}s^{k}\):  
\[\phi_{f_{1}}^{s^{k}} =\phi_{f_{1},m_{1}}^{s^{k}} \tag{14}\] \[\phi_{f_{i}}^{s^{k}} =\phi_{m_{j}}^{s^{k}}\bigg{(}\varphi_{m_{j}}^{s^{k},f_{i}}\bigg{)} ^{-1}\]  
from any of the markers \(m_{j}\) observed by image \(f_{i}\), i.e., \((m_{j},f_{i})\in O(g^{k})\).  
Given the initial estimation of the values, they are refined by minimizing the reprojection error of the observed markers in the images using the sparse version of the Levenberg-Marquardt algorithm, which exploits the sparsity of the Jacobian matrix to efficiently handle large-scale optimization problems typical in graph-based formulations [36; 37]:  
\[\mathcal{M}s^{k},\mathcal{F}s^{k}=\operatorname*{arg\,min}_{\mathcal{M}s^{k}, \mathcal{F}s^{k}}E_{rp}(g^{k}), \tag{15}\]  
where  
\[E_{rp}(g^{k})=\sum_{(m_{i},f_{j})\in\mathcal{O}s^{k}}\sum_{l=1}^{4}\|m_{i,l}^{ f_{j}}-\Psi\bigg{(}\delta_{f_{j}}\bigg{(}\varphi_{f_{j}}^{s^{k}}\bigg{)}^{-1} \varphi_{m_{i}}^{s^{k}},c_{l}\bigg{)}\|^{2}. \tag{16}\]