# Smartphone-Based Photogrammetry for the 3D Modeling of a Geomorphological Structure
## 3 D Model Generation: Methodology Assessment in a Controlled Environment
### Imaging Sensor Calibration  
To solve the photogrammetric problem and extract metric information from the images, it is necessary to previously estimate the internal orientation parameters of the camera through a calibration procedure. The internal orientation consists on the estimation of the position of the projection center with respect to the fiducial system on the image plane [17], and it is defined by the coordinates of the principal point (\(x_{0}\), \(y_{0}\)) and by the focal distance (\(f\)). These parameters are referred to an ideal acquisition geometry, but in the case of using a non-metric camera, such as those integrated in smartphone devices, it is fundamental to take into account the distortion of the physical geometry of the lenses (radial and tangential distortions) and the real geometry of the sensor of the camera (skew). Therefore, in order to correctly estimate the internal orientation, it is necessary to know the magnitude of the distortions resulting from the optical system and the consequent deformations on the image. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Study Area** & **Area Extension (LxH)** & **Avg. Acquisition Distance** \\ \hline Wall 1 & \(7\times 3.50\) m & 4 m \\ Wall 2 & \(13\times 4.40\) m & Variable 3–6 m \\ Wall 3 & \(4.50\times 3.30\) m & Variable 1.50–5 m \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Characteristics of the selected surfaces of the Cave of Bossea. Figure 2: The selected areas of study inside the underground cave. Since the aim of this study is to verify the performances of popular mass-market devices in a survey of geomorphological structures of underground caves, a medium range smartphone has been considered: a OnePlus 5, whose characteristics are described in Table 2.  
Generally, before using images for 3D reconstruction, it is important to analyze the intrinsic characteristics of the digital camera, which means knowing the parameters with which the images were taken, in order to study the acquisition geometry of the system. The consequence of the diffusion of these devices has led, over the years, to the development of a series of algorithms and procedures for the reconstruction of the internal orientation parameters [17; 36]. In this case study, we adopted the strategy of _the test field calibration_[37], which is based on the use of a special gridded panel with well-known coordinates or distances (Figure 3). To perform the estimation, the free software Octave [38] was used; in particular, an adaptation of the open source Camera Calibration Toolbox for Matlab [39] allows us to obtain the calibration parameters from images of a checkerboard panel taken from the camera. This panel has to be acquired from different positions, ensuring a good intersection of the rays and covering the entire sensor format. The images must be captured with the optical axis being perpendicular to the panel or convergent, and each image should have a relative rotation of \(90^{\circ}\) around the optical axis. In our case, the checkerboard of \(1\times 0.7\) m was realized on a wooden panel to limit its deformations. The procedure then suggests carrying out a series of photos of the panel from different angles, which can then be inserted in the toolbox. The calibration procedures must be conducted according to the sensor configurations (type of data acquired and resolution), which have been set during the survey, to calculate coherent intrinsic parameters. Therefore, the OnePlus 5 was calibrated using the frame extracted from the acquired videos. Indeed, the survey campaign was realized by employing the smartphone in the video mode in