EVALUATION OF PHOTOGRAMMETRIC BLOCK ORIENTATION USING QUALITY DESCRIPTORS FROM STATISTICALLY FILTERED TIE POINTS

Due to the increasing number of low-cost sensors, widely accessible on the market, and because of the supposed granted correctness of the semi-automatic workflow for 3D reconstruction, highly implemented in the recent commercial software, more and more users operate nowadays without following the rigorousness of classical photogrammetric methods. This behaviour often naively leads to 3D products that lacks metric quality assessment. This paper proposes and analyses an approach that gives the users the possibility to preserve the trustworthiness of the metric information inherent in the 3D model, without sacrificing the automation offered by modern photogrammetry software. At the beginning, the importance of Data Quality Assessment is outlined, together with some recall of photogrammetry best practices. With the purpose of guiding the user through a correct pipeline for a certified 3D model reconstruction, an operative workflow is proposed, focusing on the first part of the object reconstruction steps (tie-points extraction, camera calibration, and relative orientation). A new GUI (Graphical User Interface) developed for the open source MicMac suite is then presented, and a sample dataset is used for the evaluation of the photogrammetric block orientation using statistically obtained quality descriptors. The results and the future directions are then presented and discussed.


INTRODUCTION
Because of its different applications, the use of Geomatics information has known a wide spread in the last decades, especially in those areas where innovative methodologies to collect, process, validate, and exchange digital spatial information are required.Thanks to its strong interdisciplinary character, photogrammetry has been successfully adopted in a wide range of application fields: mapping at different scales, architectural and archaeological heritage documentation and monitoring, industrial metrology, forensic crime scene investigations, biostereometrics analysis, etc.In all the cases photogrammetry has already proven to be a reliable and costeffective survey technique beside its undoubtable advantages with respect to other metric survey methodologies.Following the requirements of the Digital Agenda for Europe, which promotes the use of digital technologies to stimulate Europe's economy, it is nowadays more and more important to guarantee that professionals and scientist, who works with digital reconstructions of existing (now or at some point in time) objects, can easily access the metric surveying techniques for the generation of 3D models, at different levels.Measurements cannot be used as mere numbers, therefore to guarantee a real accessibility to these techniques the definition of the achieved metric quality, that strongly influences the correct use of the data, is necessary.In this framework, the project GAMHer (Geomatics data Acquisition and Management for landscape and built Heritage in a European perspective), which is a 3-year project financed under the Italian PRIN 2015 framework (Progetti di Ricerca di Rilevante Interesse Nazionale), is working at the realization of * Corresponding author tools and guidelines for a data acquisition/processing workflow of images towards a reliable and accurate output for real, costeffective and productive work.(Bitelli, et al., 2017).The aims are not only the analysis of algorithms for automated data processing coming from photogrammetry and computer vision, but also creating an integrated system for guiding the user to obtain 3D models with a known accuracy and a certified quality.

The importance of Data Quality Assessment
One of the main aims of this project is to verify, under several conditions and interpretations, the quality of the algorithmic approaches and techniques available today (in both scientific and commercial products) privileging, whenever it is possible, open source software solutions since they are more easily transferable."The increasing importance of data quality verification has been brought about by the ability of digital camera systems and retrotargeting methods to produce high quality spatial data in a userfriendly manner under a wide variety of industrial and engineering applications" (Robson & Shortis, 1998).A critical element that must be faced is the risk of spreading 3D models whose quality is not controlled or certified and thus they could be used, now or in future, inappropriately.Metric data are usually the first step of the knowledge useful to any kind of action (e.g.knowledge, design, monitoring, etc.) and their quality strongly influence the outcomes of all the successive actions.Because quality resides not only in the control of the process, but also in the conscious choices of the user during all the phases of a metric survey (e.g.geometry of the image acquisition, geometry of metric control data, optics calibration models, etc.) it is important that the user is guided during all the phases of the acquisition and processing operations.The main factors that influences the certification of the overall data quality resides in the acquisition phase and can be thus related with quality of the initial images (i.e.resolution, contrast, exposure, radiometric integrity, etc) and the block geometry.The correct calibration of the employed sensors is another factor that influences the quality of the results.When metric cameras were widely used in the past (between the 1920s and 1980s), calibration certificates were issued by the manufacturers, because a-posteriori calibrations were impossible to perform at that time (Luhmann, et al., 2006).Nowadays, due to the wide spread of low-cost solutions and high performance sensors (tablet, smartphones, steadycams, etc.), and the continuous implementation of the self-calibration algorithms that are embedded in the software using an SfM (Structure from Motion) approach, the applications of non-metric cameras in close-range photogrammetry for the documentation of architectural and archaeological cultural heritage have been already widely adopted and positively evaluated (Cardenal, J., et al., 2004) and were then considered for the purposes of this research.As long as the camera is calibrated, just before or during the acquisition, non-metric cameras can be considered reliable tools for metrology.

Photogrammetry best practices
Actually, the photographic cameras do the measurements: a mistake during this step cannot be recovered afterwards; for this reason, the acquisition phase is one of the most important part, because upon its correctness depends the success of the photogrammetric workflow.During the acquisition phase it is very important to comply at least the "3x3 CIPA rules" (Waldhäusl et al. 2013).Following the photogrammetric best practices, all the images of the subject should overlap no more than 80% and side-lap no more than 60% (the use of greater overlap and side-lap percentages will affect too much the achievable precision).Greater overlaps could ease the matching by increasing the resolution, but they do not increase the precision.These limits to the overlaps and side-laps between adjacent images can be strictly considered for the automatic matching of the images used to find out the needed tie-points for optic calibrations, and the relative orientation of the photogrammetric blocks.The base-distance ratio shall be adapted to the automated methods that will analyse the images, and it goes usually from 1:3 to 1:5, up to 1:10 in case of surveys without significant overhangs (Cannarozzo, et al., 2012), preferably avoiding the divergent cases and relevant changes in the acquisition distance.Even if it's true that bigger b/h increases the precision of the triangulation, we must consider that automated methods for image dense matching works well if the b/h ratio is not too high, avoiding that the points do not resemble themselves if they are visible from very different viewpoints.The users should also preliminarily check the images, discarding the ones that are blurry, too similar, or does not represent the subject.GCPs and known distances, used to orient and scale the stereomodels into specific coordinate systems, should be acquired with a precision greater than the one expected at the end of the survey, and their geometric distribution inside the volume of interest must be carefully planned, to avoid lack of consistency of the results.The processing operation is also an important part of the process that should not be underestimated; as an empirical recommendation says, for each day spent gathering data on the field, corresponds 5 days spent processing the data at the lab.An operative workflow is hereby proposed, with the aim of ensuring a data quality assessment during the processing phase.

THE PROPOSED WORKFLOW
The proposed workflow is oriented to people with a basic skill in photogrammetry and will help them to assess the quality of each steps of the procedure.The intention is not to pursue the ambition to reach an autonomous process, but the user will have to consider some results and critically accept or refuse them.(Figure 1).Talking about the spread of semi-automatic photogrammetric software, users tends more and more to let the software taking care of almost all the part of the process, misleadingly moving from an automatic to an autonomous use of the software.It is important to point out the difference between the meaning of the above-mentioned terms "automatic" and "autonomous":  an automatic process requires human intervention at some point; automation assumes that the operator performs any requirements before or after the automated sequence to complete the task;  an autonomous process, instead, refers to a process that can perform the programmed operations under defined conditions without human input or guidance.All the computation steps should be tested from a statistical point of view, to verify the quality of the entire process.Automatic matching does not give the same quality in all the extracted points: therefore, it is better to use the best tie points and the best possible geometry of the images to calibrate the optics and to estimate the IOP (Internal Orientation Parameters) and EOP (External Orientation Parameters) of the images forming the block.The tie points used in these preliminary steps must be checked also in terms of homogeneous distribution inside the interested volume to allow the validity of the estimated mathematical model parameters in each part of the images (or in the interesting parts of them).
The IOP and EOP are estimated by means of a least square approach: in these cases, the traditional checks on residuals on tie-points and GCPs (when used) can give the best way to accept the solutions proposed by the software.
To obtain a reliable estimation of the IOP, the extracted tie points can be filtered, firstly discarding the ones with a high or unacceptable re-projection error and, then, homogenizing their distribution in an automatically generated map of the tie point's displacement, accordingly to the sector of the image with the minimal registered density of tie points.Moreover, the camera distortion parameters can still be retrieved applying the well-known self-calibrating bundle adjustment, only considering a selected group of images from the dataset which fulfil the requirements for a correct self-calibration process.This is especially crucial when consumer-grade digital cameras are employed for a measurement tasks in which the network geometry is not able to give a successful self-calibration.Finally, in case of automatic generation of point clouds, each point can be certified by using the estimated m.s.e.(mean square error) of its coordinates.This analysis can help to point out specific portions of the surveyed volumes where problems can arise in terms of accuracy.This will furtherly lead to the possibility of georeferencing the models using only a selection of well measured and homogeneously distributed control points, or scaling the model via a set of trustworthy scale bars (in case of a local coordinate system), without neglecting the metric integrity of the final product.
The so obtained quality parameters can be considered as additional quality evaluation descriptors, that the users should accept before the complete generation of the 3D product, while the completely non-filtered set of tie points (including the ones previously discarded) can then be used for the generation of the necessary point clouds and the subsequent 3D modelling steps.
The process is governed by some quality descriptor, that we can state as the followings for each phase:  Tie-points extractions: quality index of the matching (R);  Tie-points distribution check: homogenisation of the tie point displacement, with a threshold that depends on a selected parameter dependent on the σx, σy, and σz of each point;  Calibration and orientation: reprojection discrepancies (reverting from the 3D space to the 2D image space).These quality thresholds have, however, to be adjustable in relation with the desired level of precision and accuracy pursued by the operator for a specific survey's purpose; in fact, it is not always necessary to obtain the maximum level of quality, as this doesn't perforce lead to a consistent improvement of the final product's quality, but often only to an undesirable enlargement of the data's size.

MicMac
With the aim of applying the above principles in a free, open source and widely accessible photogrammetric platform, the MicMac project has been chosen as one among the few not-commercial solutions able to completely accomplish the whole photogrammetric workflow.MicMac is a free and open-source photogrammetric suite developed by IGN and ENSG.The operation workflow is similar to the other commercial available solutions, but all the commands are sent to the terminal using a simplified command line.For the Tie Points extractions, MicMac use the Vedaldi (Vedaldi, 2007) modified version of the SIFT (Scale Invariant Feature Transform) originally developed by Lowe (Lowe, 2004).The camera orientation and calibration step estimate the purely relative orientation of images, using observed tie points as the only input.Unlike the commercial solutions a wide range of camera calibration models are available in MicMac, and even more have been recently introduced.Since the MicMac suite is still in development, there are some limits in this research that depends on the current version of the software (v.10.beta13).MicMac covers the entire photogrammetric pipeline (i.e.does not stop after the bundle adjustment phase); it also generates dense point clouds and orthophotos.The suite works with perspective and push broom images and it allows deformations studies on all types of images (Rupnik, et al., 2017).

Use of GUI
For the aims of this research, new solutions have been developed for the generation of point clouds, and the possibility to retrieve metric quality descriptors has been implemented using a newly designed GUI (Graphical User Interface), allowing the user to understand and criticise the obtained results systematically.The innovative purpose of GEMINI is to allow the assessment of the data's quality, which is independent from the software that is used and, instead, related with the network geometry, the distribution of tie and control points, the nature of the surveyed object itself, etc.The purpose of GEMINI is not only to present a user-friendly environment; its main aim is to allow the user to understand and criticise the obtained results systematically in a guided way, preserving the automation of the process.The introduction of a GUI with quality inspection checks will allow a more guided approach towards a more conscious use of the software.

DESCRIPTION OF THE EMPLOYED ROUTINES
In this chapter, the employed MicMac routines and their functioning for the tie-points extraction and the internal and relative orientation phases are explained.

Tie points extraction (Tapioca)
The first step of the process computes tie points from all pairs of images.This is the part of the workflow in which currently we have the less control of the quality, as it uses an external solution (SIFT++) that will be eventually changed in the following updates of the suite due to some patent issues for non-academic use (as announced to the user community at the end of 2017).
The need of matching features in a group of images has been a shared problem for computer vision and photogrammetrists for years; as a solution, the SIFT key-point detector offers not only the Scale Invariant Feature Transform, but it allows also differences in illumination, viewpoint and rotation of the used images.
SIFT and SIFT++ are respectively a MATLAB/C and command line/C++ implementation of the SIFT feature detector and descriptor.
To date the most important problem related with this this step is the computation time required for performing the tie-points extraction, as it is a very slow process compared to the other steps of the workflow.
Apart from when there is little or no texture present in the images, the object of the survey are vegetated areas or there are large b/h ratios, the robustness of the extraction itself appears to not be a problem in this phase, as points with higher residuals are already eliminated from the bundle block adjustment.This elimination is done by MicMac and is based on the reprojection error.
The SIFT detector works with four principal steps (Figure 3), i.e. scale-space extrema detection, key point localization, orientation computation and key point descriptor extraction (Lowe, 2004).The process done By SIFT can be synthetized in the following way (Khan, et al., 2011):  Images are progressively down sampled, in order to reduce the level of details, using the Gaussian Blur operator; the so generated blurred images are then used for the generation of the Difference of Gaussians (DoG).The resulting images are an approximation of scale invariant Laplacian of Gaussian (LoG), and suits for locating the key points in the second step;  The second step consist in locating the candidate key points by detecting the maxima and minima in the DoG images and comparing neighbouring pixels (in the current, the below and above scale).Key points located at the edges or inside low contrast regions, are automatically discarded;  The third step assigns a principal orientation to each key point (based on local image gradient directions);  The final step computes a highly distinctive descriptor for each key point.More than that, the MicMac suite can perform a neighbourhood check, that is independent from the SIFT workflow (Figure 4).Following the development of MicMac, it will be, however, interesting to look forward to obtaining (yet in this initial phase) an index of the overall matching quality.

Internal and relative orientation (Tapas)
To obtain reliable metric data from images, it is mandatory to calibrate the camera to eliminate the systematic errors generated by the real optics.Calibration is the process that allow gathering the parameters that allows reconstructing the central projection of the images generated by a camera.These parameters are the same for all the images of the survey (e.g.MicMac do not allow the management of photogrammetric blocks formed by images acquired by different camera and optics), as are dependent on the used sensor and, as we are considering the use of non-metric cameras, are not provided by the sensor manufacturer.Several calibration models have been theorized for photogrammetric purposes, but sensor calibration and orientation are usually done via a perspective geometrical model by means of the bundle adjustment (Brown, 1971).The mathematical model is provided by the non-linear collinearity equations, usually extended by additional parameters (Fraser, 1997), and needs approximate values of unknowns and an iterative strategy to obtain the coordinates of the points and their precision parameter estimation (Gruen & Huang, 2003).The growing employment of low cost sensors for the generation of 3D models through a SfM approach and the possibility to perform a self-calibration of the cameras underlined the need to investigate a more robust method for the self-calibration of these sensors (Calantropio, et al., 2017).In 1956 Brown developed the bundle adjustment as a means of simultaneously solving for target co-ordinates, camera locations and lens parameters.(Clarke et al., 1998a).Camera calibration and image orientation problems are usually solved by using mathematical models based on Euclidean geometry: all observations are weighted by an a priori precision of the measurement (by default in MicMac for tie points set to SigmaTieP=1); on top of this, the weighting function considers the reprojection error.Even if the results seem the same in terms of point density, an effective metric comparison about the accuracy could reveal surprising results.For the above reasons it appears crucial to define new strategies to allow a higher control of the quality indicators for the generation of photogrammetric 3D models, which can be a priori deducted by the precision and the accuracy of the tie points selected to carry out the interior and relative orientation of the block.Because self-calibration can be successfully considered reliable only when some conditions are met, for example a well distributed number of 3D targets and a highly convergent network (Clarke et al., 1998b) or to avoid incorrect calibration using a separate camera calibration at the same focal settings used in the project (El-Hakim et al., 2003) the following approach is proposed.The aim is to use a restricted set of images to obtain the internal orientation parameters; these images must fit the following self-calibration requisites:  images must converge on the same part of the object's area;  the object's area must represent a 3D volume, to have a better estimation of the focal length;  a given part of the object must figure in different positions in all the images, for a better estimation of the distortion parameters.The so obtained parameters will be then used for the orientation of the whole dataset.The possibility to obtain a quality feedback at the end of the calibration phase is useful to understand whether the network geometry or the employed calibration model are suitable for the object reconstruction.Pursuing this aim, a sample dataset will be used and a synthetic set of statistical indexes for the evaluation of the photogrammetric block orientation will be retrieved; the problem and solution analysis will be then presented and discussed.

THE MICMAC'S QUALITY EVALUATION TOOLS
With the aim of experimenting the possibilities offered by the quality evaluation tools embedded in MicMac, that can be performed after the calibration and relative orientation phase, a sample dataset has been used.The dataset is retrievable from the Tutorial page of the MicMac suite (Girod, 2017), and was acquired to model a volcano model created by O Galland.It is composed by 4 images acquired with a NIKON D90 using an objective with 26 mm focal length (Figure 5).

Computation of models' reliability
With the interest of verifying how the choice of a different calibration model affects the relative orientation and the object reconstruction, two calibration models have been chosen; the Brown (Brown, 1971) and the Fraser (Fraser, 1997).The first test that has been performed is the analysis of the tiepoints residual; the generation of a coloured 3D model, with a colour related to the residuals of each tie-points allow to evaluate the part of the model with a good geometry.This can be done via the command Campari: it generates the files CloudResidual.ply (the reliability model) and CloudResidual_Leg.ply (the related legend) that can be inspected by the users for an overview of the quality reconstruction.This quality check has been performed for both the models here employed (Figures 6 and 7).Another interesting analysis is given by the option ExpImRes of Campari, that generates images representing the spatial repartition of residuals in the sensor plane; this has been performed again for each internal calibration model adopted (Figures 8 and 9).The clearer areas represent a higher module of residual.There is also the possibility to obtain the variance of any parameter that is estimated during the bundle adjustment; here we will only focus on the Internal Orientation parameters that could be used as quality descriptors, as they are the more realistic evaluation of the estimation uncertainty.This can be done using the parameter ExportSensib in Campari command.As the two models employ different kind of radial and tangential distortion parameters, the comparison has been done considering the estimated values and uncertainties of the focal length and the coordinates of the principal point, for each calibration model (Table 1).

CONCLUSIONS
This paper described the importance of valorising the information inherent the photogrammetric software useful for the quality control of the 3D reconstruction process, nowadays used by a wide range of researchers and professionals in different fields.
Deepening this study, it appeared that apart from the first step of the pipeline (the automatic tie-points extraction) the MicMac suite already allows a good control of the quality parameters, even if sometimes these are not easily accessible or presented to the user in a clearly understandable way.The purpose of the future researches will be focused to the improvement of the GEMINI interface for enhancing a better user experience (e.g.guiding the user through the whole process) and the graphical feedbacks.Considering that Format angle is a convenient method of distinguishing between different basic lens types, one idea could be sorting the typical lens in 4 groups; telephoto (small angle), normal (default) wide angle and fish-eye.This can be done in a screen of the GUI to guide the user for a preliminary choice of the appropriate distortion model.Another interesting development direction could be the possibility to plot a graphical description of the camera distortion (after the calibration) for a better fruition of the generated data, useful for the quality control of the process in most of its parts.

Figure 1 .
Figure 1.The pipeline of the proposed operative workflow.
To date, CEREMA (Centre d'études et d'expertise sur les risques, l'environnement, la mobilité et l'aménagemen) has released a working GUI for MicMac, which is named AperoDeDenis (by Denis Jouin) and is still under development.IGN (Institut national de l'information géographique et forestière) has also designed a GUI named InterfaceMicmac (by Isabelle Cléry) but its development has been discontinued.Other solutions have been proposed in the past years but none of them allow a quality assessment of the achieved results.GEMINI (Graphically Enhanced MicMac's New Interface), created in the framework of this research, is a free, open source and cross platform GUI (Figure 2), developed on top of an existing framework (Wilcurt, 2014) for abstracting command line arguments into UI elements (using HTML, CSS, & JavaScript).

Figure 2 .
Figure 2. The main page of the GEMINI interface (operating in Windows 10), showing the first part of the photogrammetric block orientation workflow.

Figure 3 .
Figure 3. Schematization of the functioning of SIFT (Scale Invariant Feature Transform).

Figure 4 .
Figure 4. MicMac perform a check a-posteriori, verifying that the neighbours of a point in one image are also its neighbours in the other.

Figure 5 .
Figure 5.The four images of the Gravillon dataset.

Figure 6 .
Figure 6.3D model representing the residuals of the tie-points relative to the calibration and relative orientation performed using the Brown's model.

Figure 7 .
Figure 7. 3D model representing the residuals of the tie-points relative to the calibration and relative orientation performed using the Fraser's model.

Figure 8 .
Figure 8. Image representing the module of residual generated for the internal calibration using the Brown's model.

Figure 9 .
Figure 9. Image representing the module of residual generated for the internal calibration using the Fraser's model.

Table 1 .
Comparison of the estimated values and uncertainties (in pixels) of the focal length and the coordinates of the principal point for the employed calibration models.