## 2 Materials and Methods
### Image Processing
#### 2.2.2 BBA and Camera Self-Calibration  
The matched features were reconstructed by implementing the bundle block adjustment (BBA) algorithm that triangulates the tie points from all the overlapping images. However, the camera poses must be computed first by estimating the camera orientation parameters. The internal parameters can be estimated via an accurate standard camera calibration using a calibration grid (e.g., chessboard) before image processing and then uploaded to the software as external input data. Nevertheless, this study relied on the auto-calibration approach conducted algorithmically within the BBA. Agisoft Metashape exploits the Exif metadata associated with the images to extract the camera data (e.g., camera type, pixel size, and focal length) [43]. These data are used to extrapolate the initial values of the calibration parameters. Therefore, the Exif metadata must be ensured that they represent the actual settings with which the images were captured, especially in the case of using a smartphone camera. The more reliable the Exif metadata, the more accurate the 3D reconstruction results. The interior orientation parameters include the focal length (\(f\)) in pixels, the principal point (\(c_{x},\ c_{y}\)) that is the \(x\) and \(y\) coordinates in pixels of lens optical axis interception with sensor plane. These parameters compose the intrinsic matrix (\(K\)), Equation (1). The intrinsic matrix along with the extrinsic matrix, whose parameters (i.e., translation and orientation) are estimated via triangulation with BBA based on the collinearity equations [40], form the camera matrix (\(\mathcal{P}\)), Equation (1). \[\mathcal{P}=\mathcal{K}\left[ \begin{array}{cc}\mathcal{R}&\mathcal{T}\\ \end{array} \right],\hskip 28.452756 pt\mathcal{K}=\left[ \begin{array}{ ccc}\frac{f}{p_{x}}&0&c_{x}\\ 0&\frac{f}{p_{y}}&c_{y}\\ 0&0&1\\ \end{array} \right] \tag{1}\]  
where \(\mathcal{P}\) is the camera matrix, \(\mathcal{K}\) is the intrinsic matrix, \(\mathcal{R}\) is the extrinsic rotation parameters (i.e., Euler rotation angles), \(\mathcal{T}\) is the translation parameters, \(f\) is the focal length, and \(p_{x}\) and \(p_{y}\) are the pixel size in \(x\) and \(y\) directions. Since the camera matrix (\(\mathcal{P}\)) applied for points projection and transformation was based on the pinhole camera model, the lens distortion had to be configured and considered to simulate a real camera. Agisoft Metashape uses [PERSON]'s distortion model [44; 45] to simulate lens distortions for frame cameras. The distortion parameters include the radial distortion coefficients (\(K_{1},K_{2},\text{and}K_{3}\)), and the tangential distortion coefficients (\(P_{1}\text{and}P_{2}\)). In cases of severe distortion, four coefficients of each distortion type are needed for a \begin{table}
\begin{tabular}{c c} \hline \hline Operating System & Windows 64 bit \\ RAM & 15.92 GB \\ CPU & Intel(R) Core (TM) i7-7700 HQ CPU @ 2.80 GHz \\ GPUs & GeForce GTX 1050 \\ Intel(R) HD Graphics 630 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The configuration of the PC system used for processing the images. better simulation. The software applies Equations (2)-(6) [40] to model the combination of both distortions.