## 4 Three-Dimensional Modelling by the SfM-MVS Approach
### Direct and Indirect Georeferencing
 \tag{6}\]  
where:  
\(c\)--local length;  
\(\hat{r}_{ij}\)--element of rotation matrix;  
\(\hat{X}\), \(\hat{Y}\), \(\hat{Z}\) --object coordinates of the point;  
\(\hat{X}_{0}\), \(\hat{Y}_{0}\), \(\hat{Z}_{0}\)--ground coordinates system. The collinearity equations have nine unknown parameters (the orientation angles of the sensors, the coordinates of the camera points, and the coordinates of the object point). Since the control points have been chosen, the accuracy of that selection can be calculated through the difference between the image coordinates of the GCPs and the actual coordinates, called residual. The residual allows one to estimate both the accuracy of individual GCPs and the overall accuracy of the transformation, expressed as root mean square (RMS) error. The error can be calculated in map units (meters, degrees) or image units (pixels). The operator must be able to correctly interpret the residuals in order to obtain correct georeferencing of the image. The distribution of GCPs should be as uniform as possible. The best selection is homogeneous distribution. Starting from the four vertices and gradually proceeding according to a regular mesh will prevent the image from being nonuniform in rectification. The number of ground points to be surveyed must be such that the number of equations greater than the number of unknowns can be obtained by generating additional information, which is represented by the tie points. The combined presence of GCPs and tie points makes it possible to solve the system of equations, finding the optimal unknown parameters through least squares estimation and ensuring high redundancy to accuracy in the process. This is generally carried out by photogrammetric software that performs the procedure through two steps. First, a type of alignment between images called relative is performed, taking advantage of tie points. Subsequent use of GCPs allows the relationship between image and object to be identified, binding the photogrammetric block to the object reference system, and performing what is called absolute orientation. The equations used in these two operations are entered into a single system called \"Bundle Block Adjustment\", the resolution of which allows the estimation of the optimal unknown parameters and completion of the orientation. This is a procedure whose objective is to optimize the parameters of the collinearity equations, finding an appropriate configuration for them, such as to ensure the best possible accuracy for the photogrammetric block. Once the EO parameters have been determined with this procedure and the IO parameters have been determined through camera calibration, the collinearity equations can be applied, and, as a result, the metric characteristics of the object can be determined with high accuracy. However, although indirect georeferencing is a robust and established procedure, it shows some disadvantages. Firstly, the estimated EO do not necessarily agree with the physical position and orientation of the camera during image exposure [77]. In addition, the survey execution time must be considered, which combines not only the drone flight time but also the time related to measuring GCPs on the ground. Moreover, such operations can be very difficult in certain environments due to the complex and diverse morphological characteristics of the terrain, as well as in emergency situations where the rapid determination of image EO parameters is required.