CALIBRATION OF NON-METRIC UAV CAMERA USING DIFFERENT TEST FIELDS

. The paper deals with the calibration of a non-metric digital camera Nikon EOS 6D with a 50 mm lens that could be adapted as a potential UAV sensor for the purposes of aerial inspections. The determination of the internal orientation parameters and the image errors of the non-metric digital camera involved self-calibration with Agisoft Metashape software solving the network of the images obtained from different test fields: a chessboard field, a professional laboratory field and a spatially diverse research area. The results of the control measurement for the examined object distance of 6 meters do not differ significantly. The RMSE from the control measurement for the second analyzed object distance of 15 meters was calculated on the basis of the internal orientation elements. The images from the laboratory field, the spatial test area and the chessboard field were used, and the obtained results amounted to 7.9, 9.9 and 11.5 mm, respectively. The conducted studies showed that in the case of very precise photogrammetric measurements performed by means of the Nikon EOS 6D camera equipped with a 50 mm lens, it is optimal to conduct calibration in a laboratory test field. The greatest RMSE errors were recorded for the control images with the elements of the internal camera orientation calculated on the basis of the chessboard area. The results of the experiments clearly show a relation between the accuracy of the Nikon EOS 6D camera calibrations and the percentage of the frame area filled with the test field. This explains why the weakest calibration results were obtained from the chessboard test field.


Introduction
The measurement methods based on properly processed digital images have become increasingly popular in recent years. The development of photogrammetric software followed by the automation of image orientation has facilitated the use of the studies on photogrammetry by specialists in different fields of science (Deng et al., 2014;Han et al., 2018;Kolecki & Rzonca, 2015;Tokarczyk & Huppert, 2006;Mikoláš et al., 2014).
Similarly, a growing tendency can be observed in the availability of Unmanned Aerial Vehicles (UAVs) as a new solution in the fast acquisition of digital images at lower altitudes. In the case of more advanced technologies, it is possible to integrate cameras equipped with replaceable optics with UAVs, enhancing the quality of the obtained images and allowing the adjustment of the optics to the purpose of the task. In the studies of Jung et al. (2009Jung et al. ( , 2010 the Authors attempted to evaluate such a solution in the context of gathering spatial 3D information from of the lens radial distortion reduces the quality of the future photogrammetric product. On the other hand, the knowledge of the locations of the main point and the camera constant before starting aerotriangulation of the image block permits limiting the number of the unknowns in the functional model of collinearity equation, and as a consequence -enables enhancing the quality and accuracy of the aligned network. There are many applications supporting the process of calibration of non-metric cameras for measurement purposes. Some of them use Authors' own fields (usually chessboard ones). Others require a spatial test field properly prepared and intended with high accuracy. The importance of the issue of calibrating non-metric cameras is emphasized by numerous scientific studies conducted throughout the world (Cramer et al., 2017;Yusoff et al., 2017;Lim et al., 2019).
The study (Yusoff et al., 2017) describes the problem of calibrating a digital camera that can be adapted as an additional sensor on board of the UAV. The accuracy of the photogrammetric measurements was checked on the basis of the calculated camera's internal orientation elements obtained from images taken from different object distances. The following distances were studied: 1.5 m, 15 m and 25 m, respectively. It can be concluded from the research that it is necessary to conduct the calibration of the UAV camera for different object distances. According to the researchers, it is the only approach that allows an optimum determination of the internal orientation elements of the UAV camera, which acquires images at various scales during the raid. The literature review shows that the studies conducted so far have not particularly focused on the optimization of the UAV camera calibration or testing various test fields. The Pérez et al. (2011) study presented the analysis of the results of internal orientation elements obtained from various test fields, without examining their effect on the accuracy of photogrammetric measurements. Further studies checked the accuracy of determining the elements of internal camera orientation using the same sets of images but different software (Lim et al., 2019) or examined imaging errors made by cheap digital cameras adaptable on board of UAVs (Yanagi & Chikatsu, 2015). Similarly, the previously described studies did not check the effect of the camera's internal orientation elements on the accuracy of photogrammetric measurements. Neither did they study which kind of the test field is the most favourable for the calibration of UAV cameras. In addition, the results of the performed calibrations were not analyzed for different types of test fields.
An attempt to optimize the calibration procedure of non-metric UAV cameras undertaken by Gašparović and Gajski (2016) yielded interesting results. The Authors proposed a two-stage approach to calibrating fisheye-type cameras fitted in certain types of amateur drones. By removing image errors prior to aerotriangulating a block of images with a concurrent self-calibration of the camera, the researchers were able to improve the accuracy of calibration as compared to the one-stage approach. The proposed procedure is effective for fisheye-type cameras, increasingly less often installed even in cheap solutions for acquiring images from the air. The studies by Zhou et al. (2020) in turn, proved that providing better approximations of the camera's internal orientation elements that can be adapted to a UAV improves the ultimate results of aerotriangulation with the simultaneous self-calibration of the camera. The researchers emphasize that the use of oblique images in the calibration further improves the results obtained from the non-metric camera calibration.
The objective of adapting the non-metric digital camera so that it can perform accurate 2D/3D measurements is to conduct the calibration procedure of such a sensor and check the elements of internal orientation stability, e.g. based on repeatability of the obtained calibration results. The process involves defining the sensor model geometry through the determination of the internal orientation elements.
The camera calibration process involves defining the sensor model geometry through the determination of the internal orientation elements and, most often, also the image errors. There are several methods of calibrating nonmetric digital cameras. In the reference sources (Kraus, 2007;Kurczyński, 2014) there is a division of camera calibration methods based on the type of the test field, the functional model, or the place of performing such a calibration. In practice, there are two approaches towards determining the internal parameters of cameras: a selfcalibration during the measurement process and a calibration outside the measurement process when the camera construction stability ensures the transfer of camera parameters in time. In the second case, aligning the network with self-calibration is most often used to determine calibration parameters.
The self-calibration during the measurement process uses images of objects or areas subjected to further analyses. The test field is replaced by a scene under measurement. The internal orientation elements determined on the basis of the in-field calibration ensure the highest accuracy of the reconstructed object. Nowadays, the notion of self-calibration is more versatile and means a procedure consisting in a simultaneous determination of not only the internal orientation elements but also external orientation elements, image errors and coordinates of the points measured on the images. The self-calibration is commonly used during determining internal orientation elements of digital cameras such as COTS (Commercial of the Shelf) installed in UAV for the purposes of mapping the areas.
A growing interest in the possibility to conduct photogrammetric measurements for the purposes of aerial inspection and the possibility to perform documentation works is strongly related to the increased availability of Unmanned Aerial Vehicles and high resolution digital cameras at increasingly lower prices. Many advanced flying platforms have the capability of operating compact cameras with changeable lens (Jung et al. 2009(Jung et al. , 2010. It seems valid to determine the internal orientation parameters of such lens -especially taking into account that the fixed focal length lenses have in many cases focusing rings moving within the minimum ranges of the image space. This permits manipulating the depth of focus affecting both the focal distance and the coordinates of the main point and the parameters modelling the distortion (Sužiedelytė-Visockienė & Bručas, 2009). Thus, even in the case of a fixed focal length lens there is a certain small range of focusing where the determined camera constant c k is present. The unknown values of the internal orientation elements of non-metric digital camera will also differ depending on the applied calibration software, the number and configuration of images, the distribution of image-points on the images, the depth of scene, the applied calculation model including the model approximating the distortion distribution or the applied test field.
The main objective of the paper was to find the optimum method of calibrating the Nikon EOS 6D camera -adaptable as a potential UAV sensor. This goal required checking how the scatter of the obtained results from the Nikon EOS 6D camera calibration can affect the accuracy of the photogrammetric measurement.
It has been assumed that during such future photogrammetric measurements two types of images will be obtained: detailed ones at the object distance of 6 meters and situational ones at the object distance of about 15 metres. The calibration of the camera was performed and control images were taken considering such distances. An additional goal of the Author's research was to assess the impact of the results obtained from camera calibration on various test fields.
A synthetic answer to the questions enabled the development of a reliable procedure during calibration of Nikon EOS 6D camera for very precise inspection purposes using UAV and finally to evaluate the impact of such procedure on the accuracy of photogrammetric measurement within the discussed research context.

Methodology
The methodology of the study focused on the use of three types of test fields for calibration and included an attempt to assess the impact of the field type on the accuracy of the photogrammetric measurement. The test fields used in the research comprised a chessboard test field implemented in the AgisoftMetashape program for the purpose of camera calibration for very close object distances. The advantage of this test field is its simple design and automatic measurement. The literature review did not reveal many comparative studies on the results of the UAV camera calibration using different test fields.
The Nikon EOS 6D camera with 50 mm lens was used during the experiments. This model of camera permits remote viewing of a live image. It also enables triggering the shutter using Wi-Fi connectivity, which in turn allows for adapting it as an additional UAV sensor. The analysed distances (6 and 15 meters) were selected empirically, as object distances allowing to obtain a very small ground pixel (1-3 mm/px) for the purpose of precise photogrammetric measurements. The Nikon EOS 6D camera, which enabled setting the exposure triangle via Wi-Fi connection in a remote manner, was selected for the tests. All the images obtained during the research were taken after the camera was mounted on a tripod. In order to ensure the stability of the elements of internal orientation during the examination, the lens was immobilized in the manual mode after setting the object distance using the autofocus mode. The Nikon EOS 6D camera can be adapted as a potential UAV sensor, and the adaptation method using an electronic stabilizer is shown in Figure 1. The study involved the use of three different test fields, described in Pérez et al. (2011), Cramer et al. (2017, Tokarczyk and Huppert (2006). The assumption was to use various types of fields with a different structure and configuration of points: - Figure 2a -a spatial test field that allows to perform a camera self-calibration based on several points, thus simulating the calibration of the camera during its operation, - Figure 2b -a flat chessboard field displayed on a computer screen, which is implemented in the Ag-isoftMetashapei program, and measured automatically in the program, - Figure 3c -a flat test field consisting of 80 marked and precisely measured coordinates of points in the adjustment system, located at the Kielce University of Technology in Kielce, Poland. Detailed program of the performed measurement works was as follows: 1. Measurement of 20 image-points distributed as shown in Figure 2a using geodetic method of angular intersection, 2. Taking the images: at a distance of 6 meters from the test field as in Figure 2a focalizing by means of an autofocus function. Then, turning the autofocus off and closing the lens with moving focusing ring. Repeating a series of images at distance of 6 meters.
3. Taking 5 convergent images of the research area as in Figure 2a. 4. Taking 5 convergent images of a flat test field at the Photogrammetric and Remote Sensing Laboratory of the Kielce Technical University - Figure 2c. 5. Taking 25 images of chessboard field using Agisoft-Metashape (Figure 2b). The images were taken using a method that ensures complete filling of the frame area with the test field within a single series of images. 6. Performing two control stereograms of the spatial research area (Figure 2a). 7. Repeating the performed works at a distance of 15 meters. The aforementioned works yielded four sets of images per two object distances (and corresponding different camera constants c k ): of 6 and 15 meters. The obtained network of images was solved using AgisoftMetashape software during the self-calibration. In the process of the camera calibration based on the images from the fields in Figure 2a and Figure 2c, a rare point cloud composed of tie points and additionally supplemented with marked and precisely measured photopoints was used.
When solving the network of images composed of 5 convergent images from the spatial test field, 6 equally distributed photo-points were used. In the case of a network of images from a flat test field ( Figure 2c) the configuration of 5 images was also used with 80 control points. The images with the photographed chessboard pattern were taken so as to fill the entire camera frame with them. The calibration of the apparatus in a chessboard field for an object distance of 6 meters involved the use of 25 images and over 750 detected corner points of the chessboard on each of the images. For a distance of over 5 meters, 35 images were taken with over 450 corner points on each of them. The RMSE < 0. 4 pixel was regarded as an accuracy criterion of the calibrations performed in three test fields. Finally, 6 sets of internal orientation elements were obtained: 3 per each of the examined object distances.
In order to determine the impact of the three analysed test fields on the accuracy of photogrammetric measurement, it was decided to perform control measurements using previously determined calibration parameters. The calibration control involved taking 3 images with axes parallel and perpendicular to the base of the spatial test field: for the two different object distances that were set using the camera's autofocus function. 6 photo-points and 14 control points were measured on the images for both of the analysed distances.
Calculations were performed for the implemented calibration results from the investigated test fields. As a result, 6 sets of control points coordinates were obtained and compared with the reference coordinates.
The accuracy analysis was based on the comparison of Euclidean distance between two points: the point obtained from the photogrammetric measurements and the one from the reference measurements. Before the analysis, the observations with gross error were excluded from the calculations. The interpretation of the obtained results is based on the average error of a single observation as in Equation (1): where: m XYZ -average error of a single observation, vapparent error of an observation calculated as a Euclidean distance between the reference and the control points, nnumber of observations.

Results of the performed experiments
The obtained results were divided into two parts. The first one - Figure 3, Figure 4, Figure 5 -presents the variability of the calculated internal orientation elements and the radial distortion. The second - Figure 6 -presents the obtained average errors from photogrammetric measurements in relation to the reference data for two measurement scenarios, i.e. 6-meter and 15-meter images. The six-time calibration of Nikon EOS 6D 50-mm lens camera with the use of three different test fields for the two analysed object distances yielded six sets of data describing the internal orientation elements, as presented on graphs in Figure 3 and Figure 4.
The calculated parameters that model the distortion (according to the Brown model), provided the basis for the graphs (Figure 4) that present the distortion distribution as a function of the radial radius.
The determined calibration parameters (Figures 3-5) were used to perform photogrammetric measurements composed of ordinary images. distance of 15 m, as shown in Figure 3. It is reflected in the distributions of image errors caused by radial distortion ( Figure 5). This confirms that even though the same mathematical model and a similar (or even the same) number of images were used for calculation purposes, different parameters of the internal orientation elements were obtained. The differences are due to i.a. the kind of the applied test field, the degree of the frame filling and the configuration of these images. A similar degree of filling the frame with the test field is achieved in the case of the spatial and Author's test fields (Table 1), whereas the greatest difference was observed for the chessboard test field. In the case of images taken at a distance of 15 m, the percentage of filling the frame in the images from different test fields was not as differentiated as before. This can explain the relation between filling the frame with images used for calibration Flat test eld (Fig. 2c) Spatial test eld (Fig. 2a) Chequered test eld (Fig. 2b)

Camera constant ck [mm]
Camera constant determined for a lens calibrated at a distance of 6 m Camera constant determined for a lens calibrated at a distance of 15 m

Discussion of the results
Three test fields were used for the camera calibration. The characteristics of the fields is presented in Table 1. Calibration images were taken using 50 mm lens. The calibration was performed on distances at which future photogrammetric measurements will be performed (i.e. 6 and 15 m). As a results of the performed calibration, different sets of internal orientation elements and image errors were obtained. For the lens calibrated at the object distance of 6 meters, the differences between the determined camera constants were significantly larger than at the object IOE obtained for a lens calibrated at a distance of 6 m IOE obtained for a lens calibrated at a distance of 15 m and the accuracy of the obtained camera constant from self-calibration and image errors. When analysing the main point coordinates (Figure 4) one may notice a similarity of the results calculated on the basis of the images from the chessboard and Author's test fields. Both test fields were characterized by a large number of field points located on a flat, uniformly structured surface and a favourable configuration of images. The control measurements revealed significant discrepancies between the results for images taken at the two analysed distances of 6 and 15 meters. The comparison of the obtained average errors for all the variants is presented in Figure 6.
In the case of the images taken from 6 meters, the root mean square error did not exceed the value of 6.9 mm. The results from the control measurement calculated on the basis of the internal orientation elements from the images of the Author's and spatial test fields do not differ significantly. A considerably larger range of the obtained errors occurs in the second case of situational images, and the distribution of errors itself tends to increase with respect to the successively specified test fields. The largest error was obtained in the case of the calibration using the chessboard test field for the object distance of 15 metres.
This value is greater almost by half than the error obtained in the photogrammetric measurements with calibration parameters determined on the basis of the images taken on the Author's test field (7.9 mm) at a distance of 15 m. Less accurate results in the case of the chessboard field may be due to a different measurement method applied for that field.
The calibration of the UAV camera on the spatial and flat test fields involved the use of manually measured points and tie points. The frame of the image in the discussed test fields was much larger when compared to the filling of the frame with a chessboard field (Table 1). Determining the internal orientation elements of the Nikon EOS 6D camera on the basis of chessboard images was affected by a small filling of the frame with a chessboard field and not using additional manually measured points in the calculations. When calibrating the camera on the basis of the chessboard images, only those tie points determined in the matching process that were located in the chessboard area were used in the calculations, the background in the image being disregarded.
The arguments cited above may explain the lower accuracy obtained from photogrammetric measurements for control images with the use of internal camera orientation elements from the chessboard field.

Conclusions
The performed experimental works confirm the possibility to use the non-metric digital camera Nikon EOS 6D for precise photogrammetric measurements, for very close object distances. The paper analyses the calibration of the camera with the application of three different test fields. The main research problem was to find the optimum methodology for calibrating the non-metric Nikon EOS 6D camera to conduct precise measurements for short measuring distances. As a result of the performed tests it was found that in order to get images from 6 and 15 meters, for internal use and works with enhanced accuracy, it suffices to perform calibration of the camera using the laboratory test field (Figure 1c). It was found that the calibration using the chessboard test field based images provides poor results in the case of photogrammetric measurements, as compared to the Author's test field. This may be due to the fact that the calibration data were not supplemented with precisely measured photopoints and to the flatness of the chessboard field displayed on the screen. This is especially conspicuous when performing measurements on images taken at an object distance of 15 m., where the root mean square error of the measurement was almost 12 mm. If the percentage of filling the frame with test image was the same for all of the analysed variants, the relative error would be similar, but its value is higher by the impact of filling the frame filling and unfavorable configuration of images. Based on the performed works, the following conclusions can be drawn: In order to perform calibration of non-metric camera Nikon EOS 6D that can be applied on board of a UAV to take images at a distance exceeding 15 meters, it is necessary to design a new test field ensuring a uniform filling of the image frame, The calibration of the digital camera using the chessboard field images provides less accurate results compared to the remaining test fields images, A low percentage of filling the frame with the test image deteriorates calibration including parameters modelling the distortion distribution of lens and results in less accuracy of the photogrammetric measurements. Further experimental work is aimed at creating a new spatial test field for the calibration of optical UAV cameras, for object distances corresponding to the performance of photogrammetric flights for the purpose of creating orthophotos. The presented studies are of pilot nature.