Validation of Close-Range Photogrammetry for Architectural and Archaeological Heritage: Analysis of Point Density and 3d Mesh Geometry

: The 3D digitization and Building Information Modeling (BIM), which is based on parametric objects, have considerably advanced by developing massive data capture techniques. Thus, reverse engineering currently plays a major role as these technologies capture accurately and efficiently the geometry, color and textures of complex architectural, archaeological and cultural heritage. This paper aims to validate close-range Structure from Motion (SfM) for heritage by analyzing the point density and the 3D mesh geometry in comparison with Terrestrial Laser Scanning (TLS). The accuracy of the results and the geometry mainly depends on the processing performed on the point set. Therefore, these two variables are significant in the 3D reconstruction of heritage buildings. This paper focuses on a 15th century case study in Seville (Spain): the main façade of Casa de Pilatos. Ten SfM surveys were carried out varying the capture method (simple and stereoscopic) and the number of shots, distances, orientation and procedure. A mathematical analysis is proposed to verify the point spatial resolution and the accuracy of the 3D model geometry by section profiles in SfM data. SfM achieved acceptable accuracy levels to generate 3D meshes despite disordered shots and the number of images. Hence, stereoscopic photography using new instruments improved the results of close-range photogrammetry while reducing the required number of photographs.


Introduction
Throughout history, the knowledge of built heritage has been based on diverse topographic techniques that are rudimentary to a greater or lesser extent. With simple instruments and sketching techniques, master builders could design, arrange and construct complex buildings. Various drawing and cartographic instruments have been presented by Hambly [1]. In addition, many churches and cathedrals have been erected around the world through geometric patterns. Their façade structure is even simpler [2] and their technology is far from what is available currently. All these examples show that geometric data are crucial to build actual and 3D digital models, which recently have drawn the attention of researchers in the field of museography, architects, engineers and archaeologists [3]. Today, Building Information Modeling (BIM) appears as a new paradigm of design and digital management [4]. The imaging technology based on photogrammetry, the 3D laser scanning, the videometry and range imaging [5] are the most effective tools as Massive Data Capture Systems (MDCSs). Moreover, Structure from Motion (SfM) has undoubtedly revolutionized the way archaeologists and architects model cultural heritage, although Rönnholm et al. [6] stated that no single registration method overcomes others. Thus, cultural heritage assets should be accurately modeled to plan their conservation and restoration [7]. However, actions such as a preliminary survey, the interpretation of metric data and the analysis of materials, among others, also contribute to knowing the heritage buildings and their components. Concerning the 3D modeling in both architecture and archaeology, there are new Structure from Motion/Multi-View-Stereo (SfM/MVS) implementation algorithms making such modeling easier from photo or video surveys. Today, conducting surveys at a certain height is not possible, so photographs are collected using Unmanned Aerial Vehicles (UAVs). These data acquisition techniques are low-cost, but require time to process the field work, to generate point cloud data and to model with a suitable software. The quality of 3D models depends on the surveys that should meet certain conditions. To decide upon the appropriateness and the consistency of the quality of the photogrammetric model according to the time spent on data collection, various photogrammetric processes are analyzed using disordered image sequences. As the focus is the architectural archaeology, the resolution of Digital Surface Models (DSMs) is analyzed to optimize the geometry of the objects. Therefore, photogrammetric surveys should be organized to obtain optimal point cloud densities. Based on this new paradigm of BIM, this paper also studies the geometry obtained and compares it with that measured using Terrestrial Laser Scanning (TLS), so results could be applied in the future in Heritage Building Information Modeling (HBIM).

Similar Works
DSMs are the essence in archaeological and architectural heritage. These 3D models should be geometrically accurate to truly represent the assets. Experts in photogrammetry have published studies on the accuracy analysis when generating surface models [8]. Thus, several works on UAV terrain digital modeling are currently being developed [9][10][11]. These studies, especially with the appearance of low-cost drones, are improving the survey work procedures in SfM photogrammetry to know and to date a heritage building façade. In this regard, the massive point capture is used for both the textured 3D digital modeling [12] and the reconstruction and the semantic integration in BIM platforms. SfM is a data capture technique to obtain the geometry of objects at low cost by using a work process different to the post-processing operations of TLS. In contrast, TLS equipment is expensive. These technologies are useful for digitization in architecture and engineering, and they are also used for other purposes, such as the development of hyper-realistic video games. Consequently, these technologies could be considered the cornerstone of HBIM as structural deformations are captured, so physical and mechanical properties of heritage are studied [13]. As a result, they contribute to its maintenance [4] and conservation [14].
After emphasizing the importance of HBIM in this area, an important issue is what and how the accuracy influences 3D model . The accuracy of SfM photogrammetry depends on various factors [15]: the optical and digital performance of the camera, the spatial distribution and the Ground Control Points (GCPs), among others. Many studies [16][17][18][19] implicitly agreed that accuracy and point density are two important parameters in the quality evaluation of a point cloud. Khoshelham [20], who worked on the geometric quality and the depth resolution of data from a Kinect [21] sensor for indoor applications, also agreed with that statement.
To understand the influence of variables on the accuracy of geometry, topographic instruments should be used to accurately measure each face of the solid to be represented. The validity of the model is no longer based on establishing 3D coordinates (x,y,z) of the GCPs-this guarantees that the model is properly scaled. A studied building component should be modeled to verify whether it corresponds to the actual measurements. Other works [22,23] used orthophotographs to measure the horizontal accuracy between them and DSMs [24]. Working on a dihedral projection image could show the horizontal accuracy (x,y), although the vertical axis (z) should also be analyzed. Therefore, it would be better to evaluate the accuracy of mesh profiles fitting the objects [25], since both 3D curves and 3D surfaces are paired and parametrically represented in the 3D space [26]. Point cloud profiles have been analyzed to evaluate façade alterations quantitatively [27]. Concerning photogrammetry, other studies [28] analyzed the influence of the number of GCPs used for georeferencing on DSMs and orthoimage accuracies obtained using UAV-based photogrammetry. Hence, the number of control points is a key aspect in accuracy. The overlapping of images and the suitable number of GCPs has also been studied. Dai and Col [18] defined the quality parameters of the point cloud, so the distribution of the point density was determined according to the number of points in a region. Murtiyoso et al. [29] studied the performance of the Damped Bundle Adjustment Toolbox (DBAT) in reprocessing terrestrial and UAV close-range photogrammetry projects in several configurations of self-calibration setting.
Research on SfM applied to building façades has advanced from ground-based models [30] to UAV photogrammetry using Remotely Piloted Aircraft Systems (RPASs) [15], whose advantage against traditional photogrammetry is the aerial view [31,32]. The combination of both techniques is ideal for large façades and heights when working in drawings at scales 1:200 or higher, as this scale would rarely leave areas uncovered. This paper analyzes the influence of variables on the SfM survey to achieve suitable resolutions in the massive point capture in a 1:50 scale model. Furthermore, the influence of the disordered sequences of the set of images on the accuracy of the geometry is studied, and the density of the point cloud, which is an intrinsic variable of the process, and the methodology and software used. DSMs and orthophotographs provide metric information for the model reconstruction [24]. The mesh geometry obtained by the software applications available in the market determines its accuracy in close-range photogrammetric techniques. Therefore, all these variables should be considered. In addition, the standard deviation and the average distance between the points of the SfM surveys against TLS enable the evaluation of the photogrammetric DSM and the reference DSM [15,33].

Case Study: the Main Faç ade of Casa de Pilatos
Casa de Pilatos is a palace located in the historic centre of Seville (Spain), whose orientalist architectural features and decorative elements ( Figure 1) are in Mudejar, Gothic and Renaissance styles-the traditional Sevillian architecture from the early 16th century. The building is inspired by the Real Alcázar in Seville, particularly by the Palace of King Don Pedro, whose influence is evident in the inscriptions on its gypsum friezes [34]. One of the most remarkable spaces in the palace is the main courtyard because of its rich architectural shapes: the decoration of the arches, the Genoese marble columns imported by Don Fadrique, and the window openings to the courtyard on the ground floor, with pseudo-Nasrid columns dating from 1861 [35]. The main gate was built on an old wall (see Figure 1), including a central semicircular arch between the Corinthian pilasters erected on high bases, which were popular in Tuscany and Lombardy in the second half of the 15th century; according to Lleó Cañal [35], Don Fradrique saw this style during his trip to Italy. An 18th-century Gothic tracery balustrade, which replaces the original one, constitutes the decorative details of the top. Thus, most of the architectural details were copied from the Italian architecture of that period. This façade was chosen because of its uniqueness, since it alternates flat brick canvases with marble pilasters and an openwork crest.

Data Collection
The geometrical design seeks effective methods to visualize and, if necessary, modify the geometrical representations of solid shapes [37]. Thus, construction representations are suitable to build and transform models using high-level engineering parameters, such as distances, angles, radii and coordinate systems. For this reason, architecture makes use of spatial measurement systems. In this work, three survey methods were used: (1) traditional range survey techniques, e.g., laser meter and tape meter; (2) TLS and total station and (3) photogrammetry using a reflex camera. Short-range digital photogrammetry measures directly from photos captured at close range. The model is based on the central perspective projection and the coordinate system is arbitrarily placed in the object space, and instead the origin is located in the center of the perspective camera. The methods have been defined numerous times [38][39][40] and defined in detail the parameters camera calibration, resection, intersection and coplanarity [41]. TLS is the most widely used data acquisition technique today. It differs from the Laser Imaging Detection and Ranging (LIDAR) since it operates on an airborne platform. Its methodology is based on calculating the distance between the laser and the object. This procedure is developed using the time-of-flight method or through the transmitted and received wave of the signal [42]. The method performs a sweep of the entire surface capturing thousands of points in a coordinate system (x, y, z), obtaining the range cloud. The classic measurements were used to compare the wall thicknesses with TLS data, which were captured using a Leica ScanStation C10 [43]. Although this laser scanner had a 4-Megapixel embedded camera to map colors onto the point cloud data, a NCTech Istar [44] camera was used because of its higher resolution and HDR imaging.
On the other hand, a Leica Flexline TS02 total station with 2 mm accuracy [45] was used to record the coordinates of the GCPs on the façade. Furthermore, a Leica Disto S910 laser distance meter was used as an auxiliary piece of equipment. Its ±1.00 mm accuracy and 0.5 m in 300 m make it usable in research works [46,47]. Ten control points spread out on the façade were recorded (see Figure 2). These points should be identifiable in the subsequent photographs for SfM. GCPs above 2 m high were recorded on the upper frieze by means of natural targets. Several devices were used in the photogrammetric survey: two Canon Digital Single Lens Reflex (DSLR) cameras producing RAW files, and a Canon E600D, an E650D and a Nikon D80 reflex camera (NEF files). The sensor of the cameras has 12 Megapixels (4000 by 3000 pixels). The main specifications of the cameras are described in Table 1. The Ground Sample Distance (GSD) represents the resolution and the detail of the final 3D reconstruction [48]. When images are not perpendicular, the GSD should be corrected using the formulae given by Leachtenauer and Driggers [49]. The effective pixel size may vary due to the lens distortion, but, as these images are not intended to perform a detailed mapping, the nominal GSD was considered [50]. Recent studies [10] determined the importance of the GSD on the accuracy of an UAV recording, for which the flight altitude is a key factor in the quality of results. In this regard, the distance was not fixed in the SfM survey. The average distance was 9 m for simple captures and 12 m for stereoscopic captures. Based on the work by Gonçalves and Henriques [50], the GSD and a fixed focal distance of 18 mm, the values 4.07 and 5.42 mm were obtained. According to these authors, the effective pixel size may be different due to the lens diffraction. The Darktable [51] open-source software was used to develop the photographs. The values for white balance, sharpness, contrast, brightness [52] and illumination parameters were adjusted. Moreover, Agisoft Metashape [53] was used for the image processing to produce 3D models from oriented and scaled images with random control points. Agisoft PhotoScan, on the other hand, processes the images through mathematical algorithms on 3D shapes [54]. Although a full description of the SfM methods is not the purpose of this paper, as [55] described them in detail, Table 2 includes the configuration parameters used in this study. This program has a simple interface and allows textured meshes and the DSM to be generated from point clouds [56].  To cover the whole width, GCPs were collected using the total station from a single position at the centre of the façade. The coordinate system was established with the axes parallel and perpendicular to the façade at 12 m. The XYZ coordinates set were 100, 100 and 10 m. The coordinates of the elements on each space were later recorded to achieve a uniform set of points. The methodology was divided into four phases. First, a test bench was chosen and survey data were collected. This test bench determined the variable geometry of the objects in the façade. As the dimensions of the case study were 20.50 m wide by 9.02 m high, short range distances were assessed [57]. Ten test datasets were carried out by varying the layout and the number of photographs. Figure  3 shows the number and the position of the cameras, and Table 3 includes the photogrammetric data. Four photograph series were taken using a single Nikon D80 SLR camera on a tripod with a nominal height of approximately 1.50 m (column 1 in Figure 3). Nadir and oblique images were taken indistinctly (up and down). Three stereoscopic series were recorded using two identical E600D and E650D reflex cameras on a single tripod with a wooden platform separated by 80 cm, considering only nadir images (column 2 of Figure 3). Other three stereoscopic series were recorded using a Nikon D80 SLR camera on a tripod with an aluminum video stabilizer sliding rail base (column 3 in Figure 3). The total width of the stabilizer was 80 cm. These last three photographic series were taken in five shots: (1) both extremes, (2) the central area and (3) two at one third. Concerning the orientation: (1) with nadir and oblique shots, (2) nadir and (3) nadir and oblique in fewer photographs and only taking central, left and right positions. The distribution of the imaging networks described in Figure 3 determines the position of the cameras in a space (x,y). To guarantee various imaging scenarios, a layout point cloud was established with different uniformity parameters and imaging distribution. Thus, researchers could know the best position in the application of façades of heritage buildings and their correlation between the number of images, capturing method, and position.  Agisoft Metashape produced dense point cloud data in a 3D coordinate system to represent the external surface of the object. An organoleptic analysis determines the distribution of the points in the space, the absence of them and the coplanarity of the segmented subset. The file formats were .e57, .ply., .xyz and .csv. The number of photographs and reprojection errors (in pixels) of the datasets were recorded. Table 3 presents the point cloud distribution, the ground resolution and the point density.
The second phase consisted of evaluating the ten photogrammetric datasets through mathematical analysis to ascertain the point density and the point cloud spatial resolution. Then, the accuracy of the entire façade between the photogrammetric series was quantitatively compared with the TLS point cloud. The fourth phase aimed at evaluating a mesh geometric pattern with the results of the previous SfM series by choosing Agisoft Metashape as the image processor. For this purpose, various applications were tested to verify the most suitable software to fit the geometry. The results were analyzed using the software chosen for the other tests. Considering the importance of DSMs, the metric accuracy of their profile as a representative standard was evaluated. Finally, following a mathematical approach, the influence of the SfM variables (the distance, the number of images, and the procedure, among others) on the results is discussed by estimating the surface deviation between the PhotoScan point set and the TLS data.

Validation of the Geometrical Pattern
After importing the SfM survey images, Agisoft Metashape performs an automatic calibration process in accordance with the exchangeable image file format (EXIF) [58] detected in the images. The process was described by Westoby et al. [59], from photo alignment to post-processing with mesh generation. On the other hand, the Metashape software has its own geometric reconstruction algorithm [60,61] and offers several levels of density of the 3D mesh. This research used the 'high' density level. After obtaining the dataset, various applications were tested to evaluate the quality of the 3D mesh geometry, which was later used to compare the variables from the ten surveys. Most software generate 3D meshes from TLS or SfM point clouds, such as MeshLab, Rhinoceros [62], CloudCompare [63] and Grasshopper [64], among others. Antón et al. [65] tested different commercial and open-source software to generate representative 3D meshes of the heritage assets studied in the Real Alcázar in Seville (the Pavilion of Charles V) and in the Basilica of the Baelo Claudia [66] archaeological ensemble in Tarifa, Cádiz (Spain). After a thorough accuracy and geometry evaluation of the 3D meshes, the Rhinoceros Mesh Flow plug-in [67] and the screened Poisson surface reconstruction algorithm [68] in CloudCompare provided valid results for the as-built digital reconstitution of heritage assets in HBIM.
Creating a surface mesh from a point cloud is a complex process if significant roughness is desired because of occlusion [69]. As described by Koutsoudis et al. [70], SfM methods require a large amount of memory and equipment to process field work data. In this regard, the 3D reconstruction of the façade required high performance equipment. The 3D meshing process was conducted through a dense multiple reconstruction algorithm [61]. To achieve the modeling included in Figure 4a, several steps such as those appearing in similar publications [56,59] were performed. The work was segmented into two parts to simplify the analysis. The first part focused on the base of the left pilaster ( Figure 4) to analyze the geometry of the objects. On the other hand, the second part was intended to work with the commemorative plaque in the strip of the right canvas, for which the spatial resolution and point density were analyzed. Regarding the analysis of the geometry, current reconstruction algorithms smooth the surfaces if there are no points in the object. This aspect could be observed in the moldings that shape the base of the pilaster. A representative point region of the model was used for the evaluation: the section Ϡ represented in the model of Figure 4a.

Results and Discussion
The accuracy of SfM photogrammetric techniques is widely studied in various modalities. The accuracy and resolution of the 3D model in close-range terrestrial photogrammetry depends on several factors [57], including the distance from the camera to the façade, lens and atmospheric conditions that can alter the sharpness of photographs (e.g., fog). Poropat [71] carried out precision estimates in 95-meter and 150-meter works that showed differences between the software and the theodolite data of 0.005% and 0.02%, which are consistent experimental values in relation to theoretical expectations. Bevilacqua et al. [72] stated that the accuracy increase is linked to the basedepth relationship, the use of convergent images, and the increase in the number of points measured per image. The greater the number of images in which the same point appears, the better the accuracy. However, most studies on accuracy focus on the numbers of GCPs. Agüera et al. [28] analyzed the influence of the number of GCPs used for georeferencing on DSMs and orthoimage accuracies obtained using UAV-photogrammetry. The study showed that both horizontal and vertical accuracies increased as the number of GCPs increased. On the other hand, most studies based on the Root-Mean-Square (RMS) differentiated between GCP data and orthoimage markers for the (x,y) axis and the DSM for the z axis. Aicardi et al. [73] worked with various software to establish the accuracy between GCP data and orthophotographs. A similar work by Peña-Villasenín et al. [74] determined the accuracy of the camera arrangement on various façades. Sanz-Ablanedo et al. [10] correlated the Root-Mean-Square-Error (RMSE) with the GCPs for UAV.
Thus, many experimental DSM construction studies have evaluated the accuracy of the model. The DSM from photogrammetric surveys and the TLS reference model have been compared by evaluating the average deviation between these sources of points [7,15,75]. In contrast, Gkintzon et al. [24] discussed the reliability of the DSM and placed it at lower levels than orthophotographs and drawings-paintings, thus reconsidering the DSM as the approach to represent the geometry. Hence, the accuracy of the DSM was evaluated. The geometry from series 4 was first built to evaluate its deviation against the profile created from the TLS data. The metric variations represented in Figure 5 ranged from the pilaster floor level to approximately 1.57 m height. The average variation was therefore analyzed along the artifact, as Moyano et al. [14]. The average value yielded errors (ΔZ), and the simple absolute deviation (Dx) was calculated as per Equation (1). The results are shown in Table 4.
where (D ) is the simple absolute deviation, N is the sample size, x accounts for the observed values and is the average value of the sample (in meters). The results showed a maximum curve dispersion of 0.0196 m between the TLS (black curve) and DSM (green curve) profiles, and an average difference of 0.0017 m. Figure 5 compares the difference between the two samples. The average value yielded errors (ΔZ) of 0.0038 m, and the simple absolute deviation (D ) was 0.00171 m. These values represented a dispersion between the reliable model and the DSM ( Figure 6) that could make the work with DSM less reliable when optimizing the accuracy in the object geometry.

Point Cloud Spatial Resolution
Point density is one of the parameters that determines the quality of the geometry of a 3D mesh when it is consistent and accurate with the geometry of the objects represented. The spatial resolution of point clouds has been scarcely determined. Peña-Villasenín et al. [74] analyzed the point density per square meter in four case studies of photogrammetry. The point density was therefore evaluated according to the surface area. The Metashape software reports the results after building the mesh model. Nevertheless, the best way to verify the point cloud spatial resolution, i.e., the 3D Euclidean distance (see Equation (2)) between the closest points, is to sample the point set.
d E (P 1, P 2 , P 3 ) = √(x 2 − x 1 ) 2 + (y 2 − y 1 ) 2 + (z 2 − z 1 ) 2 (2) where d E is the Euclidean distance between points in space, and x, y and z are the Cartesian coordinates of those points. A 70 × 70 cm 2 sample of the point cloud was segmented (Figure 7) to be subsampled using CloudCompare (C2C). The flatness of this subset was approximately absolute.   Survey 4 had the lowest distance values for the first, second and third quartiles of its distribution, and the lowest interquartile range. Using survey 4 as a reference for the distribution with the lowest distance between points, surveys 3, 5 and 8 obtained distributions with a low distance between points. In this regard, the values in the first and third quartiles increased with respect to survey 4: between 0.19 and 0.84 cm in survey 3, from 0.10 to 0.52 cm in survey 5 and from 0.26 to 1.21 cm in survey 8. Likewise, survey 6 yielded distributions with similar variations (between 0.26 and 0.58 cm for the distribution quartiles). However, outliers above 10 cm were detected in survey 6, which represented an excessive distance between points. In this regard, the other surveys produced outliers that showed a high distance between the points, although survey 2 obtained low values in the first quartile. Likewise, tests such as survey 1 showed high values in the first quartile, which represented high distances between the points of the element analyzed. These results implied that the number of shots and the density of points are not clearly related. Survey 4 obtained the smallest distance between points, although its low number of shots (79) was lower than those taken in survey 8 (135) and survey 10 (81). As surveys 8 and 10 were carried out on a tripod with an aluminum video stabilizer sliding rail base and survey 4 on a tripod with a nominal height of approximately 1.50 m, the number of shots and the camera positioning technique of survey 4 could be related, thus entailing better resolution of the digitized elements.

Comparison with TLS
To quantitatively compare the accuracy of the entire façade between the photogrammetric series, the TLS point cloud was taken as a reference. Once the SfM point cloud data was obtained and previously scaled with the measurements taken in Agisoft PhotoScan software, the TLS point cloud was aligned with the TLS data by selecting pairs of common points between these two point clouds in CloudCompare. The four point pairs were located at the four extreme points of the commemorative plaque, with average RMS errors of 0.01506 m. Next, the alignment was improved using the Iterative Closest Point (ICP) algorithm in CloudCompare, which was based on searching pairs of adjacent points in the two datasets to calculate the transformation parameters between them [76,77]. The RMS is stated in Table 4. Cloud-to-cloud distance computing in CloudCompare was also performed. Figure 9 shows the data capture deviation between TLS and survey 4 (in this case, taken as an example). Georgantas et al. [78] used TLS as the reference to compare the photogrammetric IBM through C2C. Koutsoudis et al. [70] analyzed mean distances and standard deviations of all single-view range scans compared with the PhotoScan mesh. Morgan et al. [79] compared various photogrammetry applications with the TLS in laboratory on sediments with different granulometry. Thus, this method has been approved by the scientific community. Figure 9 shows the histograms between the X, Y and Z point pairs of the photogrammetric survey 4 and the TLS point cloud as a subsample of the complete façade. The X axis represented the intervals of distances in meters between the SfM and TLS points, whereas the Y axis showed the point set in each interval. Variations above 82% exceeded 0.029 m. This means that 80.57% of the point pairs were matched at less than 2.9 cm using the C2C comparison algorithm, and 99.99% of the point pairs were matched at less than 1.2 cm using the M3C2 ® comparison algorithm created by Lague et al. [69]. The results from all series are gathered in Table 4, where surveys 3, 4 and 5 show the best results, with RMS values of 0.019, 0.026 and 0.042 m, respectively. In contrast, the other surveys were more disperse, e.g., survey 9 had a value of 0.168 m. The dataset yielded consolidated values ( Figure 10). The application of the TLS and SfM in the same building allowed the point clouds recorded using quantitative data (standard deviation) to be evaluated.

Model Geometry Analysis
Few studies have evaluated quantitatively the profiles of the textured 3D meshes from photogrammetry. Chiabrando et al. [80] established qualitative comparisons from sections generated by 3D ReShaper and radiometric sections through ESRI ArcMap. Nevertheless, profiles are important to analyze geometries and geometrical patterns in architectural objects [81]. The matching of 3D curves (one or more) with 3D surfaces was conducted by Gruen and Akca [26] with the mathematical formula. In this paper, the profiles were arranged perpendicular to the façade plane and the corresponding element at the same distance from one side of the pilaster, which means that there were geometrical constraints that made them coincide. Although a minor value of uncertainty could be estimated, it could be negligible for these geometrical values. To determine the difference between the accuracy of the 3D meshes depending on the software used, the RMS mathematical expression was used to calculate the profiles shown in the graph included in Figure  11. The difference between TLS (Leica ScanStation C10) and DSM was 1.61 mm. There was a slight difference between the geometric profiles generated by CloudCompare (C2C) and MeshLab as both used the same Poisson algorithm [68,82,83]. This accuracy was clear when reaching values of 0.31 mm, which was virtually negligible. Despite slight fluctuations in the curve, the Rhinoceros was the most stable application within the whole. This program showed variations that ranged from 2 to 4 mm with respect to the others. Metashape provided the most disperse results when generating the 3D mesh. The difference with the pattern was 7.72 mm. Compared to a uniform mesh that fits the minimum triangles, a scattered mesh and a non-uniform triangulation outcome can be observed, so this mesh was not representative of the minimum density of the point cloud. As regards the triangulation in the areas where the point density decreased, the software lengthened the triangle (vertexes displacement). Figure 11. Data from the comparative study between TLS and each photogrammetric series.
The variation between the profile shown by the TLS point cloud and that of the meshes generated by various algorithms in the evaluation of survey 4 was significant in some cases. Slight variations of 1 mm were detected, except in two regions, with variations of 10 mm (curve at 1.35 mm and 1.55 mm of elevation). The SfM series 4 was used for this validation study. Either the C2C or the MeshLab geometry could be used as both are the most uniform software and do not experience large variations. A debate could be based as to whether it would be more appropriate to compare the point cloud in an object profile environment, as in the study by Barba et al. [84], in comparison with the reprojection error. These authors believed that the purpose of information records is to generate 3D models, and therefore the best way to evaluate their accuracy is through this process, despite the fact that generated profiles of the dense cloud are mostly used. On the other hand, according to Remondino et al. [8], the accuracy would be established by a flatness error if the profile is generated from the point cloud.
Based on the results that determined the most reliable software, and considering that the sample of the TLS profile was representative, the photogrammetric surveys were compared. The 3D meshing process was performed with the Rhinoceros 'MeshPatch' command to create a section of the object using the Ϡ plane, as shown in Figure 12. The subsets of the closest points in a x,y coordinate system were extracted from the mesh profiles. The values obtained as per Equation (3) are represented in the following barplot ( Figure 13).
where A is the differential area between the curves, and f(x) dx and g(x) dx are their functions. Rhinoceros software was used to section the 3D meshes using the Ϡ plane to create the profiles from which the points for the accuracy calculation of the series were extracted.  Table 4 was shown as the differential area between the base profile from the TLS data and the other profiles according to the representative sample of the subset of points in each survey. The area is expressed in square centimeters. Thus, series 3 was the most suitable value within the dataset, with 1.15 cm 2 along the section profile, whereas series 1 and 7 obtained the worst results: 128.01 cm 2 and 103.34 cm 2 , respectively. Figure 13 shows that series 3, 2 and 4 obtained the lowest values (apart from survey 6) and the best shots distribution, distances and number. Accordingly, the number of photographs influenced the accuracy. The geometric quality and point coincidences on the pilaster base was greater in series 3 with only 44 photographs than in series 4, which was dispersed and included nadir and oblique photographs (Figure 3). Regarding the planning to acquire the photographs and the distances to the façade plane, series 3 and 4 had the same average length. As for this parameter, series 5, 6 and 7 were the most distant photographs; however, the results were different. The three stereoscopic series with simultaneous cameras also obtained suitable results, except for series 7 whose number of photographs was lower. The stereoscopic block with rail and a single camera produced uneven results as in survey 8, despite its 135 shots. Better results were expected to evaluate this new procedure of alternating nadir and oblique cameras in minor sequences.
McCarthy [85] stated that many studies [78,86,87] have demonstrated that multi-image photogrammetry can achieve results close or even superior to those from the TLS, always under the right conditions. This research proved that the difference between the DSM of a series (e.g., series 4) and the digital model generated from the point cloud of TLS data was approximately 1.7 mm. The 3D digital model from the TLS point cloud properly conformed to the overall geometry of the architectural shapes, including the subtle details of the vertical moldings ( Figure 14). The SfM of the most accurate series, in the absence or decrease in points density when meshing, produced shapes millimeters away from the physical reality of the object. The sample used as a reference to compare the photogrammetric samples was the TLS data. The geometry evaluation revealed that the profiles generated by the photogrammetric surveys significantly varied in the regions of points perpendicular to the camera. The reason was the inefficacy of the SfM software in the reconstruction because there were no oblique photographs. However, the 9 mm accuracy could be acceptable at the 1:50 scale, as established by the English Heritage guidelines? Regarding scale tolerance and point density [88], the maximum tolerance required for the precision of detail for scale 1:50 should be ±15 mm. Considering the density of each series and the guidelines mentioned above, survey 9 showed poor precision, and surveys 9, 1 and 7 showed poor point density.
Although this research showed suitable results of interpolation between PD density of TLS points and the photogrammetry in series 4, this test 4 is not always the best in the geometry evaluation. Therefore, this is a new open field between the results of affinity, the point density and the geometry analysis that should be validated in further studies.

Conclusions
One of the current issues is the reverse engineering process for HBIM, i.e., to generate a parametric 3D model from point cloud data to include the deformations and geometric peculiarities of heritage assets [65]. This research showed that photogrammetry, together with a topographic instrument, could constitute an interesting technical and economic reality. This study focuses on the accuracy between TLS and SfM, shows that photogrammetry is a suitable technique for dense 3D cloud reconstruction, and, by studying the accuracy of DSMs, assesses the point cloud geometry for the SfM geometric reconstruction of 3D architectural and archaeological objects. Thus, this study analyzed the distribution of imaging networks suitably placed in a space (x,y) to analyze a façade plane. Moreover, the difference between the capture of simple and stereoscopic images was introduced. These procedures originated various surface models where the geometric quality of the 3D results was evaluated, an aspect not studied up to now.
The point density and geometry analyses for SfM revealed how photogrammetric series should be addressed. For this purpose, low-cost elements were used, which could produce a huge advantage as in the case of stereoscopic pair shots.
In contrast to other studies, the number of photographs did not always determine an appropriate dataset, unless the survey was properly planned. In relation to the precision studies on DSM, there is a large deviation in the 3D mesh in comparison with the meshing process of the Metashape software. To obtain a good dataset, the taking of photographs disorderly distributed in the façade plane of the building should be planned. Most surface should be covered. The better the uniformity in the distances to the plane, the better are the results. This paper is a first approach to study the accuracy that SfM can provide BIM with, thus opening a new paradigm in the use of low-cost tools in modeling. To corroborate this affirmation, medium resolution reflex cameras (compared to current cameras) were used in the experimentation, together with a Laser Leica Disto TM S910 equipment, which is cheaper than topographic equipment, such as Leica Flexline TS02 total station with 2 mm accuracy. However, Laser Leica Disto TM S910 also limits the accuracy in large lengths.
The photogrammetric process has so far used sequences of unordered images, but this research revealed that photographs should be distributed along the surface to be surveyed to achieve a suitable point density and geometry. Therefore, photogrammetric surveys using a single camera and less than 45 shots are not advisable: they should be nadir and oblique for 181.35 m 2 .
Today, sequences of stereoscopic photographs with the new instruments improve the results of close-range photogrammetry, requiring fewer shots. Despite the 135 shots of survey 8, for instance, the stereoscopic block with rail and a single camera produced uneven results, although better results were expected to evaluate this new procedure of alternating nadir and oblique cameras in minor sequences. The reason could be the consequence of uneven positioning (scarce dispersion) of the tripod along the façade width.
This study stresses that, based on a series of imaging networks taking through the photogrammetric technique, the accuracy of the techniques to acquire point cloud data by means of DSM is assessed. The impact relies on the fact that many research studies on this area use DSM as the model to compare the quality of the 3D representation, so researchers have a reference on the variation of the model.
As is well known in the scientific community, the methods based on photographs imply many steps, each with a certain algorithm. Each parameter could obtain various results, so this aspect will be further studied. In addition, the results could be improved by using different lens and sensors and by improving the calibration parameters, so this new challenge could be considered in the future.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Abbreviations
The following abbreviations are used in this paper: