## 4 Three-Dimensional Modelling by the SfM-MVS Approach  
### Direct and Indirect Georeferencing  
To build 3D models using a pinhole camera model, it is necessary to understand the internal orientation (IO) and exterior orientation (EO) of each image. The IO parameters (focal length and main point offsets) of the camera can be provided directly by the manufacturer or determined through calibration processes. However, the pinhole camera model is valid only when lenses with long focal lengths are used. If more accurate measurements are required, image coordinates perturbations (radial and tangential distortions) must be taken into account [67]. A widely used model in photogrammetry is that proposed by [PERSON] [68], which is based on a polynomial approximation. Knowing the EO of a photo means establishing its spatial position at the moment of taking the picture and, as a consequence, calculating the movements that define the position of a rigid body in space, i.e., three translations (x, y, z) and three trim rotations of the camera (\(\omega\), \(\varphi\), \(\kappa\)) [69]. The EO can be determined by the use of direct or indirect georeferencing [70,71]. In order to provide an accurate external orientation of the collected data, image acquisition systems must be equipped with integrated GPS/INS devices. If the georeferencing  
Figure 5: Global drone regulations database: choosing a country (colour blue), for example, Italy (**a**), consulting the regulations (**b**). process takes place using such devices, this is referred to as direct georeferencing (DG). However, if acquisition systems without integrated devices are available, georeferencing can be carried out through the acquisition of control points in a predefined reference system and post-processing in order to determine the external orientation parameters of the photogrammetric processes. In the latter case, the indirect georeferencing process will be implemented [72]. The DG of the data from the sensor mounted on the drone is conducted through the determination of position and orientation; in this way, each pixel or element acquired can be georeferenced, without any field survey, using the data collected by the GNSS integrated with the measurements of the inertial sensors, equipped on the drone. The data collected by GNSS sensors and inertial sensors mounted on UAV platforms can be processed in real-time or after the mission; in either case, it is necessary to refer to a GNSS or a network of GNSS reference stations in order to calculate the position and orientation of the images with high accuracy [73]. It is possible, knowing the various systematic parameters a priori, to determine the coordinates of a map element directly from the coordinates of the acquired images, as shown in the following relation:  
\[r_{oA}^{l}=r_{ob}^{l}(t)+\mathbf{R}_{b}^{l}(t)(s_{A}\mathbf{R}_{c}^{b}r_{ca}^{ c}+r_{bc}^{c}). \tag{3}\]  
In the formula, \(r\) denotes a vector and \(\mathbf{R}\) a rotation matrix. Their superscripts and subscripts represent the frame, respectively, and the subscript indicates the start and end point of the vector:  
\(r_{oA}^{l}\)--vector of coordinates of point (A) in the local level frame (LLF, l-frame);  
\(r_{ob}^{l}(t)\)--vector of coordinates of the navigation sensors (INS/GPS) in frame l;  
\(s_{A}^{l}\)--scaling factor;  
\(\mathbf{R}_{b}^{l}(t)\)--rotation matrix interpolated from the b-frame to the l-frame;  
\((t)\)--exposure time, i.e., the image acquisition time;  
\(\mathbf{R}_{c}^{b}\)--rotation matrix from the camera frame (c-frame) to the b-frame, determined by calibration;  
\(r_{ca}^{c}\)--coordinate vector of point (a) in frame c (i.e., the image coordinate);  
\(r_{bc}^{c}\)--vector between the IMU centre and the perspective centre of the camera in the b frame, determined by calibration.