## 2 Materials and Methods
### Image Processing
#### 2.2.2 BBA and Camera Self-Calibration
\[x^{\prime}=x\Big{(}1+K_{1}r^{2}+K_{2}r^{4}+K_{3}r^{6}\Big{)}+\Big{(}P_{1}\Big{(}r^ {2}+2x^{2}\Big{)}+2\ P_{2}xy\Big{)} \tag{2}\]  
\[y^{\prime}=y\Big{(}1+K_{1}r^{2}+K_{2}r^{4}+K_{3}r^{6}\Big{)}+\Big{(}P_{2}\Big{(}r ^{2}+2\ y^{2}\Big{)}+2\ P_{1}x\ y\Big{)} \tag{3}\]  
\[r^{2}=x^{2}+y^{2} \tag{4}\]  
\[u=0.5\ w+c_{x}+x^{\prime}f+x^{\prime}\ B1+y^{\prime}\ B2 \tag{5}\]  
\[v=0.5h+c_{y}+y^{\prime}f \tag{6}\]  
where \(x\) and \(y\) are the undistorted point location in the normalized image coordinates resulting from transforming a 3D point (X, Y, Z) in the real world space (\(\Re^{3}\)) into the image plane (\(\Re^{2}\)); \(x^{\prime},y^{\prime}\) are the distorted point coordinates; \(w\), \(h\) are the image width and height in pixels; \(u\), \(v\) are the projected point in the image coordinates on the sensor indexation system given in pixels; \(r\) is the radial distance; \(B1\), \(B2\) are the affinity and skew coefficients in pixels, both were estimated to be equal to 0 for the calibration data provided in Tables 5 and 6. The calculated parameters for both cameras after optimization along with their standard deviation error are presented in Tables 5 and 6. These parameters were estimated based on the square beam data set (43 images) as an example of the self-calibration approach. The tables also present the correlation matrix reflecting the degree of correlation among the calibration parameters. The correlation values for parameters that are highly correlated (>0.5) are presented in bold. \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline  & **Value** & **Error** & \(f\) & \(c_{x}\) & \(c_{y}\) & \(K_{1}\) & \(K_{2}\) & \(K_{3}\) & \(P_{1}\) & \(P_{2}\) \\ \hline \(f\) & 3503.02 & 0.190 & 1 & 0.12 & \(-0.27\) & \(-0.15\) & 0.22 & \(-0.18\) & 0.1 & \(-0.25\) \\ \(c_{x}\) & 18.59 & 0.147 & 1 & \(-0.02\) & 0.02 & 0 & 0 & **0.89** & \(-0.02\) \\ \(c_{y}\) & \(-29.73\) & 0.174 & & 1 & 0.05 & \(-0.03\) & 0.02 & 0.01 & **0.68** \\ \(K_{1}\) & 0.08767 & \(2.14\times 10^{-4}\) & & & & 1 & \(-\)**0.95** & **0.90** & 0.03 & \(-0.01\) \\ \(K_{2}\) & \(-0.24273\) & \(6.66\times 10^{-4}\) & & & & 1 & \(-\)**0.98** & \(-0.02\) & 0.02 \\ \(K_{3}\) & 0.19971 & \(6.71\times 10^{-4}\) & & & & & 1 & 0.02 & \(-0.02\) \\ \(P_{1}\) & \(8.69\times 10^{-4}\) & \(1.76\times 10^{-5}\) & & & & & & 1 & 0.01 \\ \(P_{2}\) & \(-1.12\times\) & \(10^{-3}\) & \(1.56\times 10^{-5}\) & & & & & & & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: The smartphone (Huawei RNE-L21,\(f\) = 7 mm) calibration parameters and their estimation errors for the beam data set (43 images) along with their correlation matrix. For highly correlated parameters (>0.5), their correlation values are in bold. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline  & **Value** & **Error** & \(f\) & \(c_{x}\) & \(c_{y}\) & \(K_{1}\) & \(K_{2}\) & \(K_{3}\) & \(P_{1}\) & \(P_{2}\) \\ \hline \(f\) & 8963.51 & 0.346 & 1 & \(-0.02\) & \(-\)**0.76** & \(-0.07\) & 0.1 & \(-0.08\) & \(-0.01\) & \(-0.48\After the camera poses were estimated, the tie points were triangulated from the overlapping images and were reconstructed as 3D points (\(x\), \(y\), \(z\)) with assigned pixel colors (RGB) and an intensity value (I). This resulted in the first photogrammetric output (i.e., the sparse point cloud) along with the computed camera positions.