THE INFLUENCE OF GROUND CONTROL POINTS CONFIGURATION AND CAMERA CALIBRATION FOR DTM AND ORTHOMOSAIC GENERATION USING IMAGERY OBTAINED FROM A LOW-COST UAV

Technological improvement of Unmanned Aerial Vehicles (UAVs) and computer vision algorithms, such as Structured-from-Motion (SfM) and Multi-view Stereo (MVS) have provided the possibility for high-resolution mapping and high-density point cloud generation using low-cost equipment and sensors. Orthomosaics and Digital Terrain Model (DTM) are the main digital products considering mapping purposes. Their quality is directly related to the sensors boarded on the UAV and data processing. Ground Control Points (GCPs) are used in the process of indirect georeferencing and also to model the lens distortions. The number of GCPs used in this process affects the positional accuracy of the final products. This study aims to determine the optimum number of GCPs to achieve high accuracy orthomosaics and DTM. To obtain this optimum number, an area of 3.85 ha was mapped with a low-cost UAV DJI Phantom 4 Advanced at 31 m flying height, lateral and longitudinal overlap of 90% and 80%, respectively, and using 22 checkpoints for quality assessment. For the experiments, different configuration were used both for the number of GCPs and for the use of self-calibration process or pre-calibrated camera IOP (Interior Orientation Parameters). The results show that for the flight configuration used in this work and for the mentioned UAV, a total of 5 GCPs, with pre-calibrated camera IOP, yields an accuracy of 0.023 m for X, 0.031 m for Y and 0.033 m for Z.

Traditionally, the collection of geospatial data for 3D mapping is conducted using conventional survey methods by using GNSS (Global Navigation Satellite System) receivers and/ or total station, and recently, by the usage of RTK (Real Time Kinematics) GNSS technique. These methods are very costly, time consuming, and in some scenarios it is difficult to access the site area. UAV Photogrammetry is presented as a flexible and low-cost option compared to conventional surveying, traditional aerial mapping and orbital imagery (Colomina, Molina, 2014).
The UAV is able to autonomously follow a pre-programmed flight plan, to take-off from a specific point, to fly over a desired area to take pictures, and to land in a defined region. Also, there is the possibility to monitor the flight and control the UAV by using a mobile device. All data acquired by the sensors is monitored in real time, such as altitude, attitude, aircraft speed, wind speed, battery status and distance from home point. Theses information are vital to make decisions when flying a UAV. The * Corresponding author disadvantages of UAVs include the limitation of the payload, reduced autonomy, dependence on climatic conditions (temperature, lightning exposure and wind) and low-quality sensors (positioning, orientation and imaging sensor) (Chiang et al., 2015) -mainly in low-cost platforms. As the sensors are low-costs, their data are not accurate enough for most of engineering applications due to their systematic and random errors. The data acquired by these sensors can only be used as initial parameters in the photogrammetric process (Kraus, 2011).
The combination of affordable UAVs and photogrammetric software makes it possible to create georeferenced models at a much lower cost and faster than through conventional methods (Gerke, 2018). Photogrammetric software, such as Metashape, with robust computer vision algorithms SfM (Strutuctured from Motion) and MVS (Multi-view Stereo)) automated the image matching task and the dense cloud generation (Vosseman et al., 2004).
With the popularization of low-cost UAV platforms, off-theshelf digital cameras availability, ease-of-use of automated photogrammetric software together with users deficit knowledge results in products that are visually accepted. However, the products carry errors derived from the lens distortion and errors from the navigation parameters. Basically, there are 4 reasons that affect the final results of photogrammetric products: camera calibration, image overlap and flight height, and number of GCP (Ground Control Points). This research aims to study the impact of a non-metric digital camera and also find the optimum number of GCP for high accuracy mapping, considering two different camera calibration methods. The statistical analysis is based on the RMSE of check-points and on analyzing if the population follows a normal distribution.

RELATED WORK AND BACKGROUND
The goal of photogrammetric processing is to derive metric information from multiples images. There are two main fundamental prerequisites to derive accurate metric information: camera calibration and image orientation (Förstner et al., 2004).
According to (Galo, Tommaselli, 2011), when applying a nonmetric digital camera, it is necessary to carry out a camera calibration process to extract reliable metric information from a set of 2D images. Usually, off-the-shelf digital cameras express two different types of distortion: radial distortion (k1 , k2 , k3 ) and tangential distortion (p1 and p2 ) (Brown, 1971). Camera calibration is the process of correcting the lens distortion, principal point displacement (xp and yp) and the focal length (c). Self-calibration is the process in which these parameters are obtained simultaneously with the image orientation (Kraus, 2011). The final results of a camera calibration is a representation of the interior camera geometry during image acquisition by modelling the Interior Orientation Parameters (IOP).
To date, there is vast literature aiming to model the impact of unstable low-cost digital cameras IOPs aiming to reduce the effort to improve the quality of final products derived from UAV imagery. These methods rely on different approaches, among these: different patterns for calibrating the cameras(linear features (Zhang, W, 2020) and 2d checkerboard (Zhang, 2000)), reducing the number of images (Geiger et al., 2012) and the difference in scale when using a 3D calibration range (Hamid, Ahmad, 2014). The use of computer vision algorithms reduced the time to calibrate the camera and produce reliable parameters, due to the task of measuring control points is automated.
In regards to the use of GCP in aerial imagery, its necessity is brought due to the use of a low-precision sensors, mainly integrated GNSS/inertial systems. These both sensors provide the Exterior Orientation Parameters (EOPs) that represents the position and attitude of each image at the moment of acquisition. As soon as these parameters are not accurate, the final product incorporate undesired errors if direct georeferencing is considered. Therefore, when using low-cost system, it is important to use the direct EOP as initial values in the phototriangulation and adjustment process to reduce the processing time. The usage of a set of known coordinate points (GCP) visible from more than one image allow the execution of an indirect orientation, but only when the overlapping images are connected via tie-points (Förstner et al., 2004). One of the most costly and time consuming tasks is to place and measure the GCP on the field and on the images -the last task has been run in a semi-automatic mode in most of photogrammetric software. Besides the time consuming field task, there is a possibility to insert systematic errors when measuring the GCP in object and image space. In literature, there is no expressive improvement in accuracy when using more than 7 to 10 GCP other than reducing the final standard deviation as the number of GCP increases (Tonkin, Midgley, 2016, Agüera-Vega et al., 2017, Sanz-Ablanedo et al., 2018. Also, the references recommend positioning the GCP on the external borders and the center of the site(Agüera-Vega et al., 2017).

MATERIAL AND METHODS
In this section materials will be presented and the proposed methodology will be discussed. In section 3.1 study area and UAV data acquisition steps are introduced. Section 3.2 gives a brief explanation of ground control points and check-points survey. Section 3.3 details the steps to conduct the photogrammetric pipeline aiming to generate photogrammetric products at two different configurations, by using a self-calibration and by using fixed IOP. Finally, in section 3.4 the products evaluation and statistical analysis are presented.

Study Area and UAV Data Acquisition
The study area of approximately 3.85 ha is located near the Faculty of Civil Engineering, Architecture and Urban Planning at the University of Campinas (22.8167 • S, 47.0604 • W) ( Figure  1), Brazil. This area area covers two parking lots and it has low vegetation, with the terrain altitude ranging from 626.10 m to 635.90 m. The low-cost UAV weights 1.38 kg and is equipped with GNSS receiver, INS, and a built-in digital camera with a sensor size of 2.63 µm capable of taking images with a resolution of 20 MP and 4864 × 3648 pixels.
The UAV was controlled via radio by a mobile device. The flight planning was done and conducted with DroneDeploy online application, choosing a flight configuration of: longitudinal and lateral overlap of 90% and 80%, respectively, at flying height of approximately 31 m, and the camera being oriented in a nadiral direction. This configuration provided an average GSD (Ground Sample Distance) of 0.85 cm. The EOP are stored in the image metadata, also known as external information file (EXIF), as geotags. In total, the mission provided 1336 In Brazil, the usage of this type of UAVs in urban areas requires submission and approval of flight configuration (the height and area to be covered). Therefore, the flight configuration for this research was submitted and approved by the ANAC (National Civil Aviation Agency -Brazil).

Ground Control Points and Check Points
Before proceeding with the imagery acquisition, a set of 32 points were established. To survey these points, 3 landmarks were established and surveyed using GNSS receivers/antenna Topcon Hyper/Hyper Lite+ in static mode (adjusted coordinates with standard deviation of 1.0 cm and 2.0 cm, in planimetric and altimetric components, respectively). The total station Nikon Nivo 5C was used to collect all 32 points for the experiments -to be used as GCP and check-points (standard deviation of 0.6 cm and 0.8 cm, in planimetric and altimetric components, respectively). The points were materialized using a sheet of white paper attached to the ground with long nails. The target final dimensions were 0.70 m × 0.70 m (Figure 3a). To reduce the labor, established features such as signing and pavement marking were also used (Figure 3b). Some of these points were applied as GCP in the process of aerial triangulation, ranging from 0 to 10 points, and from 22 to 32 points used as check points, according to each configuration tested (Figure 4).

Photogrammetric Processing, Point Cloud Classification and DTM Generation
In regards to the capacity of computational processing and to ensure consistent results, all tasks were performed using the same computer. Photogrammetric processing was conducted in Agisoft Metashape, version 1.5.5 (LLC, 2018). The reason for this choice is due to experiments done using different photogrammetric software, in which Metashape presented better results for DTM generation (Ferreira et al., 2019). The processing steps followed the standard photogrammetric pipeline ( Figure  5) aiming to generate 3D point cloud, DEM (Digital Elevation Model), DTM and orthomosaic. Photogrammetric pipeline will be conducted under two photo-triangulation configuration using different number of GCP (0, 3, 4, 5, 8 and 10): first configuration is conducted using self-calibration with GCP coordinates to correct the image orientation and lens distortion, and the second configuration is inserting the IOP derived from an on-the-job self-calibration processing using the imagery obtained from the same area and all 32 GCPs. The first step is to align images using an algorithm similar to the Scale Invariant Feature Transform (SIFT) operator (Lowe, 2004) to identify and match relevant points in all images, also known as keypoints. These keypoints are well defined and invariant to image scale and rotation. In this step, the geolocation stored in the EXIF is used as initial approximation to minimize the processing time. The second step is to import and manually measure the points that are going to be used as GCP.
The third step is to optimize the EOP and IOP. In this step, photo-triangulation is performed using GCP coordinates to correct the image orientation, and also to calibrate the camera (if desired). In the case where the camera is pre-calibrated, there is no need to perform the "optimize parameters" step since the IOP are already optimized and the indirect orientation was done in the "alignment" step. Fixed IOP is derived from an on-thejob self-calibration using all 32 points, which aimed to determine the following parameters: focal length, principal point displacement (xp and yp), radial distortion (k1, k2, and k3) and decentering distortion (p1 and p2). The fourth step is the dense cloud generation. This task applies a pair-wise depth map computation to generate 3D point cloud. Finally, the DEM reconstruction task is used to generate the input for georeferenced orthomosaic. The configurations for image alignment and dense cloud generation was set to medium and the orthomosaics were exported with 2.0 cm resolution (2.35 × average GSD).
For the DTM generation, the generated 3D LAS point cloud was imported to the Trimble TBC software (Trimble, 2018). First, a classification and filter tool was used to extract only points representing the ground level. The second and last step is to create a surface from the extracted ground points. This interpolated surface will be used to extract the Z component for each surveyed point aiming to evaluate the DTM quality.
In total, 12 independent photogrammetric processing were performed, using 0, 3, 4, 5, 8 and 10 GCP, and the remaining points were used as check points.

Products Evaluation and Statistical Analysis
The input information for the planimetric evaluation of the final orthomosaics was obtained by using QGIS 3.8.2 software (QGIS Development Team, 2018). A point shapefile layer (.shp) was created and points were measured on centres of established marks and pavement signs. Resulting shapefile layer was exported as text file with the following information: point ID, X and Y coordinates.
The input data for DTM evaluation was obtained by using Trimble TBC software. The X and Y coordinates of check-points were imported as points and the Z coordinates were extracted from the interpolated surface. The resulting report was exported as text file with the following information: point ID, X, Y and Z (interpolated) coordinates.
All the extracted coordinates were then compared to the surveyed check-points coordinates.
For both planimetric and altimetric evaluation the Root Mean Square Error (RMSE) considering surveyed and measured in final products was used. This metric measures the discrepancies between the reference coordinates and the extracted coordinates from orthoimages and DTM (Ghilani, Wolf, 2006). Calculation of RMSE in regards to a given component X, Y or Z in a sample size (n) is presented in Equation 1.
where n = number of CP tested Xi = X, Y or Z coordinates measured in the cartographic product for the ith CP If a sample is extracted from a population, it it necessary to assess for significance using a two-tail t-test. In this case, a 90% confidence level was considered, according to (Galo, Camargo, 1994). First, discrepancies are calculated (Equation 2) for each component. The second step is to calculate the mean (Equation 3) and the standard deviation (Equation 4).
In this step, it is necessary to calculate t (Equation 5) and test it against the confidence interval (Equation 6).
The population is accepted if t-calculated is lower than t-critical. This hypothesis suggests that the population presents a normal distribution.

RESULTS AND DISCUSSION
The aim of this study is to investigate the impact of the number of GCPs on photo-triangulation process and the usage of fixed IOP vs. self-calibration. The results provide an optimum number of GCP based on accuracy results for a light weight-rotatory wing UAV when generating orthomosaic and DTM products. The results and discussion session is focused on RMSE and population distribution. Based on the study, two sets of output are obtained. The first result is for orthomosaic (planialtimetric evaluation) and the second for DTM (altimetric evaluation). For the proposed method, a comparison is presented in The results presented in Table 1 and 2 are used for discussion in the following sessions.

Orthomosaic (Planimetric Evaluation)
In terms of accuracy, increasing the number of GCP with regular spatial distribution indeed increases the accuracy. As observed when using no GCP, the X coordinates are 0.464 m and 0.361 m, the Y coordinates are 2.180 m and 2.187 m, with selfcalibration and with fixed IOP respectively. These errors are due to the information derived from the low quality sensors onboard. As the processing only had the data stored in the EXIF file, there is no accurate information to properly reference, rotate, translate and scale the model.
The processing with 3 GCP reached a cm level accuracy, matching the requisites to indirect georefence a model (Kraus, 2011).
Besides the accuracy, a digital product can only be reliable if the population follows a normal distribution. This scenario is accepted when the self-calibration processing is conducted using 8 GCP, and also when using 5 GCP with fixed IOP. It is important to mention that adding more than 3 GCP to the processing only reduces the check-points standard deviation. Table 1 and 2 show the errors obtained from the DTM. The processing using 0 GCP has a RMSE of 10.214 m using selfcalibration and 10.104 m using fixed IOP. As noticed on the orthomosaic analysis, the errors are due to the low-quality sensors.

Digital Terrain Model (Altimetric Evaluation)
Following the same processing using as the centimeter level accuracy for the orthomosaic (3 GCP), the DTM reached 0.441 m and 0.039 m, for self-calibration and fixed IOP, respectively. It is noticed that the optimum number for generating accurate DTM is 8 GCP using self-calibration (0.052 m) and 5 GCP using fixed IOP (0.33 m).

CONCLUSION
This paper presented a positional evaluation of generated DTM and orthomosaic based on UAV images acquired with a lowcost UAV DJI Phantom 4 Advanced. Overall, the results obtained from 12 sets of photogrammetric processing were compared to the reference coordinates acquired by traditional survey methods. The authors also determined the optimum number of GCPs by processing with self-calibration and fixed IOP with 0, 3, 4, 5, 8 and 10 GCP.
The results show that there are no expressive precision improvements on orthomosaics by using more than 3 GCPs to reach a centimeter level accuracy when using self-calibration or fixed IOP. In regards to the DTM, when applying self-calibration approach and using 5 GCP (4 on the external borders and the center of the site), a centimeter level accuracy is reached (0.052 m).
Overall, the results are quite similar in both scenarios. The optimum number of GCP to produce a high accuracy orthomosaic and DTM when processing with self-calibration is 8 GCP to achieve accuracy of 0.026 m and 0.032 m, and 0.029, for X, Y and Z, respectively. On the other hand, applying a fixed IOP using 5 GCP reduces the labor and generates unbiased results with an accuracy of 0.023 m, 0.031 m and 0.033 m, for X, Y and z, respectively.
From practical point of view, placing more GCP makes the survey more labor intensive and expensive. However, these elements allow the production of better quality products. It is important to mention that this methodology may not have same results when using different equipments over a really different area characteristics as those presented in this research, and also running the different flight configuration. Even though, the results can be used to have an idea of the importance of using GCPs in processing dataset from low-cost UAV. For future work, the image overlap and flight height will be addressed to obtain an optimum flight configuration.