Modeling and Visualization of Three Dimensional Objects Using Low-Cost Terrestrial Photogrammetry

ABSTRACT Several valuable heritage structures worldwide are in danger due to natural causes or human interferences. Therefore, a low-cost modeling technique is extremely important and widely needed for the preservation of heritage especially in poorer countries. This study evaluates the precision and accuracy of terrestrial photogrammetry via low-cost digital cameras to construct a 3-D model of an object. To obtain the goal, a building façade is imaged by employing two low-cost digital cameras, namely Canon and Pentax. The accuracy of the photogrammetric point clouds that are generated via the method is compared with a few natural control points collected via a laser total station. Cloud-to-cloud distance is computed for different 3-D models to investigate different variables such as camera type and control points. The results of the practical field experiment indicate that the mean differences between obtained 3-D models and reference points are in the range of 2.3–4.1 cm without using any control points. Using a few of the control points, the differences are improved such that they are between 1.4 and 1.6 cm. The comparisons indicate that the largest variances between the laser total station and photogrammetric outcomes occurred when the Pentax camera was used.


Introduction
A challenging issue in engineering sciences corresponds to the use of low-cost terrestrial photogrammetry and tools to obtain a high-precision 3-D model.Collection and modeling of 3-D surface coordinates of an object is especially important in the field of heritage conservation (Styliadis, Konstantinidou, and Tyxola 2008).Precise 3-D models of buildings are used for visualization, maintenance, restoration, and documentation processes.To obtain a 3-D model, several techniques and methods are used to collect surface data including scanning of the surface via terrestrial laser scanners, topography, closerange photogrammetry, and traditional surveying techniques (Scherer 2002).A suitable method is selected based on accuracy need, project budget, and geometrical shape of the object.In several recent studies, terrestrial scanning and photogrammetry are the most common techniques used for surface data collection, and an overview of the optical sensors and techniques used for measuring 3-D surface coordinates was discussed in the heritage field (Remondino 2011).Photogrammetry is a based-imaged method that is considered as an optimal solution for processing images with the capacity to deliver at any scale of application, accurate metric, and detailed 3-D surface information (Luhmann et al. 2006).In digital close-range photogrammetry technique, pictures captured by a camera at close range from different angles can be used to map the geometric details of any complex shape, such as a façade, or create accurate 3-D models of objects.The ability to measure and record surfaces is important in several scientific disciplines, and photogrammetry and laser scanning provide the required capability.Several investigations focus on digital image-based modeling for complex buildings.Photogrammetry and laser scanning (a range-base method) are compared for accurate modeling of architectural sites by (Baltsavias 1999;Barsantia, Remondino, and Visintini 2013;Faltýnová et al. 2016;Moon et al. 2019;Owda, Balsa-Barreiro, and Fritsch 2018).
Currently, digital camera technology is characterized by rapid development.It is cheap and exhibits significant storage capacity.Laser scanner techniques are significantly more expensive than photogrammetry.Therefore, a few researchers attempted to analyze and investigate low-cost image-based 3-D documentation techniques for cultural heritage (Boochs et al. 2007;Styliadis et al. 2009).They documented 500 caves in Ukraine and a historic monument in Germany by using low-cost images along with laser scanning and fringe pattern projection methods.A few examples of world heritage sites with 3-D documentation were reported and discussed (Remondino and Rizzi 2010).The recovery of façade by using a single historical image was investigated in (Styliadis and Vassilakopoulos 2005;Styliadis and Sechidis 2011;Styliadis 2007aStyliadis , 2008)).Additionally, 3-D Indoor modeling and accuracy were examined via data acquisition from imagery (Styliadis, Patias, and Zestas 2013;Styliadis 2007b).
A photogrammetric process to obtain the 3-D reconstruction of archaeological sites using lowcost photogrammetric techniques was presented by (Barazzetti et al. 2011).Results indicated that the combination of different techniques and mainly topography data (used to scale the obtained results) and photogrammetry made it possible to obtain dense point clouds of a complex architectonic element (Robleda Prieto and Pérez Ramos 2015).Numerous tests indicated that non-metric digital cameras are suitable to obtain a digital elevation model to sub-millimeter accuracies (Chandler, Fryer, and Jack 2005;Läbe and Förstner 2004).A few practical rules and benefits of the low-cost image technique to obtain a 3-D model for heritage preservation in Nepal (following the 2015 earthquakes) were introduced by (Dhonju et al. 2017).A certain digital measuring scheme based on a GPSenabled digital camera was tested by (Ragab and Ragheb 2010).An operational approach for the 3-D surface reconstruction of historical buildings was presented by (Habib et al. 2004).A few researchers performed unmanned aerial systems imaging based on low-cost data collection techniques (Kersten, Mechelke, and Maziull 2015;Martínez-Espejo Zaragoza et al. 2017;Oniga, Chirilă, and Stătescu 2017).They concluded that it is difficult to obtain 3-D surface information for tall buildings without using UAV.
There are several low-cost commercial software that are used to obtain a 3-D model of captured images (e.g., Photomodeler and Agisoft PhotScan).They are developed by computer vision developers.Several known low-cost software packages were used by (Aicardi et al. 2018;Balletti et al. 2014;Jebur, Abed, and Mohammed 2018;Kersten, Mechelke, and Maziull 2015;Remondino et al. 2012) to obtain 3-D surface information from images.A few studies analyzed parameters that affect the quality of photogrammetric results including used software, number of photos, and control points.The results indicated that obtained results are not always consistent (Altman, Xiao, and Grayson 2017).The results of the study recommended the camera should be raised up by using scaffolding during image capturing to obtain more accurate results for tall buildings or facades.
The present study describes an approach designed to analyze the precision and accuracy achieved by two types of low-cost digital cameras (Canon and Pentax) to collect 3-D surface coordinates of an object.The price of the Canon EOS REBEL T5i is approximately $800 while the price of the Pentax does not exceed $100.The cost of the used photogrammetry software (Agisoft PhotScan) is $3,500.The use of control points entails total station costs of $7,000 and was rented for $200 per day.The sale price of the laser scanning ScanStaion P40 exceeds $35,000 and that of a point clouds processing software (for e.g., Leica cyclone) ranges from $2,000 to $14,000.The analysis concludes that terrestrial photogrammetry is a low-cost method to collect 3-D surface information.A test field is conducted to test a range of variables.Several photogrammetric point clouds are generated.The results are constrained with the observations obtained via a laser total station.The data filtering process is performed via the prober outlier's technique.Different numbers of control points are used to analyze the sensitivity of the results.

Study area and data acquisition
An experiment was conducted to investigate the accuracy of the 3-D model obtained by low-cost cameras.The test building corresponded to the façade of the college of engineering, Najran University, south of the Kingdom of Saudi Arabia (KSA).The façade dataset covered the following area: 40 m in width and up to 35 m in height.The data acquisition was conducted on March 3, 2018.It exhibited low ornate objects, and thus it was not difficult to obtain detailed images from the ground.In the study, two types of low-cost none metric digital cameras were used.Table 1 lists the descriptions of the cameras that are used and their sensor parameters.

Taking pictures
With respect to tested cameras, several exposures from different stations were obtained.The cameras were carried manually (not on a tripod), and the camera settings for every exposure were within the specified limits of the cameras used, namely maximum f-stop, minimal ISO to reduce any noise, and fixed focus.
A few unusable images including blurred images and limited area covered were discarded from the original set of images.Two sets of data from the remaining photographs were created.The number of images used in the study for a Canon camera and a Pentax camera corresponded to eight photos.Manual selection of the photographs made it possible to reduce the number of images, avoid redundancy, and accelerate the software during the processing step.Although the image selection step appears tedious, it can significantly reduce the processing time and control points (CPs) tagging step.

Reference data
On the test site, 116 measurement points were observed with a Leica TS 06 Plus laser total station to assess the accuracy of the obtained 3-D model.In the laser electronic distance measurements, the distances to the points located on a surface were measured, and this reflected the laser.
Using the distances, the coordinates X, Y, and Z of any point on the façade were obtained.Figure 1 shows the total station that is used to collect natural reference coordinate points along with the location of reference points.Instead of using coded targets, natural targets (i.e., any natural mark on the building façade, i.e., corners of windows, intersections, and doors,) were observed and used as CPs.The mean value of the 3-D positional differences of CPs in the two epochs corresponded to 4 mm.As previously indicated earlier, CPs were used during the bundle adjustment, and the accuracy assessment of the 3-D models was obtained by low-cost cameras.

From images to point clouds
A point cloud is defined as a set of points in a 3-D coordinate system and represents the outer surface of an object.From a set of images and algorithms, it is possible to derive metric and accurate 3-D information of the scene.The workflow consists of camera calibration, image orientation, and point cloud generation.After producing point clouds, the following steps are adopted: the 3-D measurements, modeling, texture mapping, and visualization.

Bundle adjustment
The bundle adjustment (BA) technique is a method to generate 3-D positions based on the idea that several light rays (which come from the camera) form a bundle of intersected rays.Collinearity equations correspond to the formula used as a mathematical model to adjust the bundles.The first method for BA was developed by (Brown 1958), and this was utilized to minimize the projection error subsequent to assessing point coordinates and camera positions from used images via least squares (Abdel-Aziz 1971).The PhotosScan Professional software (which is a commercial product developed by Agisoft PhotScan® for digital photogrammetry) is commonly used for archaeological and mapping purposes.Two different BA solutions were investigated to test the efficiency of the used two digital cameras.The first solution of BA was performed with optimal (after removing outliers) CPs to obtain the most accurate 3-D model.The second solution was performed without any CPs.In order to correct the scale and obtain the model with its true scale, two scale bar measurements were considered with a long tape, namely one to scale the model and then to check the results.

Natural points locations
Laser total station

Ground control points
The transformation parameters between the different images and object space frame are typically ensured by using a few CPs whose coordinates are known in the image and in the object frame.They should improve the results by using the software.The position of CPs was used to transform the scale, position, and orientation of the model.Another method was also employed in which the model was left in a free-network mode and the right scale was retrieved via a known distance between two objects.Therefore, the 3-D models were obtained from the same photoset with and without CPs to test the validity and degree of accuracy of the results.In order to investigate the effect of the number of CPs, four models were created with 4, 8, 12, and 21 CPssee Figure 2).

Results and analysis
As previously mentioned PhotoScan Professional was used for the image processing and creating 3-D models.
Common tie points were detected and matched on photographs to compute the external camera orientation parameters for each image.Camera calibration parameters were refined to simulate the distortion of the lens with Brown's distortion model (Agisoft and St Petersburg 2014).This involved the addition of used images (eight images were used) and Camera alignment by bundle adjustment.The High accuracy parameter was used, and the tie point limit corresponding to 1000 (to speed up the alignment) was used to obtain a solution (Figure 4).
Figure 5 shows a dense point cloud as an example of the obtained 3-D model.The software was user-friendly although the adjustment of parameters was limited by predefined values.

Comparison of the bundle block adjustment for the cameras
In the study, two different bundle solutions were investigated to test the efficiency of used digital cameras.The first bundle solution was based on using all available CPs.The second bundle solution was performed without using any CPs.

BA accuracy based on using CPs
The accuracies of models after georeferencing using 38 CPs are listed in Table 2.With respect to the Canon   camera, a CP was removed because it yielded gross discrepancies, and they were considered as outliers.The skewness and kurtosis values improved following the removal of the outliers.The results after outlier removal yielded the following outcomes: the RMS values along the X-axis corresponded to 4.2 mm, RMS along the Y-axis corresponded to 5.8 mm, RMS along the Z-axis corresponded to 5.2 mm, and spatial RMS corresponded to 9 mm.The Pentax camera with the RMS values along the X-axis corresponded to 4.7 mm, RMS along the Y-axis corresponded to 14.3 mm, RMS along the Z-axis corresponded to 7.7 mm, and spatial RMS (16.9 mm) exhibited less accuracy when compared with that of the Canon.Figures 6 and 7 show the histograms and Q-Q plots of discrepancies for Canon camera before and after the removal of outliers, respectively.
The histograms showed that the tails of the residual distribution are small "thin" or "skinny" when compared with the normal distribution while that data is positively skewed.After filtering, the resulting datasets were more close to a normal distribution, and their standard deviation decreased from 4.8 mm to 3.3 mm.This is confirmed by graphical analyses (Q-Q plot in Figure 7) and the decreasing value of the kurtosis and skewness parameters as shown in Table 2.
As shown in the histogram and Q-Q plot for the Pentax camera, the residual data are normally distributed while the slope of the line corresponds to 45°T   (Figure 8).The values of skewness and kurtosis are less than values three and one as shown in Table 2 and (Riaz, Riaz, and Batool 2014).
The mean values of discrepancies between the two 3-D models using 38 CPs were less than 1 cm, and their standard deviations were between 4.8 and 3.3 mm.

Cloud-to-cloud comparisons
Several studies used the terrestrial laser scanners as a tool to produce a reference surface to compare the accuracy of the obtained 3-D model for other techniques such as photogrammetry or even Mobil mapping system (Altman, Xiao, and Grayson 2017;Toschi et al. 2015).In the study, terrestrial laser scanner data were absent, and our target involved obtaining a low-cost model.Therefore, 116 natural CPs that were collected by a laser total station were used as reference points.As previously indicated, CloudCompare software was used to calculate cloud-to-cloud distances (C2C) between two cloud points and graphically represent the differences to evaluate match or mismatch of areas with the reference cloud data.Prior to the calculation, the bottom part of the study object was removed from the investigation due to the presence of obstructions such as vegetation and individuals.The mean value of all differences was used to calculate the accuracy.The standard deviation was used as an indicator of data noise.Table 3 summarizes the results of comparisons between point clouds obtained via the total station and via photogrammetry methods.
As shown in Table 3, the Canon camera exhibits a lower mean C2C distance (16 mm) when compared to that of Pentax (21 mm).Based on standard deviation values, the 3-D model obtained via the Pentax camera was significantly noisier than the model obtained via the Canon.The histograms of C2C distances indicated that in the model using the Canon camera, 95% of the points exhibited less than 2.8 cm differences.However, in the case of the Pentax camera, 98% of the points exhibit differences less than 7 cm as shown in Figure 9.The results indicated that different digital cameras significantly affect the quality of the results.

Relative comparison between canon and pentax point clouds
The point clouds obtained from two cameras are compared with each other.The relative precision between the two 3-D models was calculated.The Canon camera yielded a better accuracy of 1 cm, and thus the Canon model was used as the reference model to compute the comparison.The C2C distances were calculated.The mean value and standard deviation of distances corresponded to 2.7 cm and 4.3 cm, and the RMSE corresponded to 5.2 cm (Table 4).
Figure 10 shows a graphical representation of C2C distances between the two surfaces.The areas with red color at windows and boundaries indicate a difference exceeding 8 cm, and green indicates a difference of less than 4 cm.Blue indicates difference values of less than 2 cm. Figure 11 shows the histograms of the results and indicates that the C2C distance of 94.2% of the points is less than 7.69 cm while 53.8% of the points exhibit a C2C distance of less than 1.65 cm.

BA accuracy without using CPs
The aim involved determining the accuracy of the 3-D models without using any CPs.The Agisoft program  processed self-calibration procedures based on determining tie points between different images in the absence of CPs.The orientation parameters (interior and exterior) for each camera position were simultaneously determined via solving a self-calibrating bundle.The obtained 3-D models (in this case) were in a local coordinate system.Prior to calculating the C2C distance, all photogrammetric point clouds were aligned to the reference data via the iterative closest point (ICP) alignment tool by using CloudCompare software.A few point clouds were created with CPs to test their effects on the geometry (not for georeferencing).Hence, they were still aligned by ICP to maintain the test consistency.This was rotated and translated to determine the best fit for the models obtained by using CPs clouds without changing the scale.Outlying points were excluded from the process to improve the fit.The obtained statistical results of the C2C absolute distances without using CPs are listed in Table 5.
The mean values of the C2C distances corresponded to 23 mm and 41 mm for the Canon and Pentax camera, respectively.The obtained standard deviations corresponded to 13 cm and 121 cm.This indicated that the 3-D model obtained from Pentax is noisy while its standard deviation corresponded to 121 mm. Figure 12 shows that 98% of the point clouds are within 5 cm for the Canon camera while 97% of the point clouds are less than 21 cm for the Pentax camera.

Effect of the number of CPs
The effect of the total number of CPs on the results was tested.This was tested using Agisoft Photoscan software.Models were created from the same photoset with different CPs corresponding to 21, 12, 8, and 4 points (Figure 2).The four models were used to test the impact of the number of CPs and their distribution within the control region.Only the CPs of the central part of the control region were considered to assess the errors on the external parts of the area.Results indicated that the outcomes of the different scenarios were affected both via reducing the number of CPs and via changing their distribution.The 3-D models of each scenario were generated and integrated into the CloudCompare software to calculate accuracy by using laser total station CPs as a reference model.Table 6 presents the obtained results for different CP configurations.
The mean distances were stable for all the four models obtained from Canon camera ranging from 14 to 16 mm.The results suggested that the difference corresponds to 23 mm when no control point is used (Table 6).With respect to the Pentax camera, the mean distances varied between 21 mm and 32 mm (Figure 13).
The standard deviation of C2C distances was approximately stable at 2 cm for all configurations for the Canon camera.However, after using only eight CPs, the standard deviation exhibited no change for   Pentax and exhibited values between 6 and 8 cm (Figure 14).

Discussion and conclusions
The aim of the study involved investigating the accuracy of the low-cost digital camera to collect 3-D surface information of an object as a low-cost technique.Several parameters were considered including camera type and CPs.
The obtained results were compared to that of laser total station.The models indicated that the most accurate results were obtained when CPs were used.The results revealed that the mean values of C2C distances in models with CPs ranged between 14 mm and 21 mm.The lowest mean C2C distance was 14 mm and corresponded to the model with 12 CPs as obtained via a Canon camera.The results also suggested that the accuracy was stable and exhibited extremely small changes when eight or more CPs were used.The outcomes varied in the absence of CPs, and the mean value of C2C distances was in the range of 23-41 mm.The comparisons indicated that the largest variances between the laser total station and photogrammetric outcomes occurred when the Pentax camera was used.The C2C distances between laser total station data and photogrammetry outcomes were distinctly lower when the Canon digital camera was used.The mean value of the differences corresponded to 14 mm.The results indicated that the use of more than 12 CPs led to an increase in the standard deviation.The corresponding error distribution (Figure 10) demonstrated that    the areas exhibited the highest C2C distances at zones imaged from high distances and with high acquisition angles such as the right and upper parts of the façade.Furthermore, the same error patterns occurred in areas that were characterized by difficult materials such as glass windows or doors.
The number of CPs from the total station was lower than from the terrestrial laser scanner data.Therefore, the negative point of that during the comparison process, the algorithm of C2C function yielded unexpected results when C2C distances are measured from the laser total station to the photogrammetric clouds.In this case, the results of C2C distances were high and yielded high values of mean and standard deviation.
The results of the study suggested that the low-cost 3-D model is obtained with Agisoft Photoscan software and an inexpensive digital camera such as Canon or Pentax.The obtained accuracy indicated that the technique is comparable with respect to several considerations (for e.g., accuracy, time demands, and demanded outputs) with more expensive techniques such as terrestrial laser scanner and can be applied for building documentation.It exhibited faster acquisition, low-cost albeit a slower point cloud production process when compared with that of the terrestrial laser scanner.Both Canon and Pentax cameras exhibited significant noise level in the data and reached several centimeters for Canon camera.With respect to the high accuracy purposes, it is necessary for a user to be aware of using the right digital sensor and to ensure that CPs are well distributed.A few CPs acquired by laser total station were used in the comparison process.However, when compared with the huge point cloud from the terrestrial laser scanner, the laser total station yielded a good evaluation of accuracy results during the test field.

Figure 1 .
Figure 1.Imaged façade and natural targets used as CPs by using a laser total station.
CloudCompare and Meshlab correspond to open source software that are commonly used for 3-D data comparison(Cignoni et al. 2008;Girardeau-Montaut 2011).With respect to each comparison, direct cloud-to-cloud (C2C) distance is computed between each photogrammetric point cloud and the reference one.Specifically, C2C corresponds to a direct 3-D comparison of the point clouds.Distance calculations are based on different performing algorithms such as nearest neighbor, nearest neighbor with local modeling normal shooting, and iterative closest point (ICP)(Koutsoudis et al. 2014;Lague, Brodu, and Leroux 2013).The nearest neighbor distance was used (as shown in Figure3) to calculate the C2C.With respect to every point of the compared cloud, the CloudCompare algorithm searches for the nearest point in the reference cloud and compute their (Euclidean) distance.

Figure 3 .
Figure 3. Cloud-to-cloud distance based on the nearest neighbor.

Figure 5 .
Figure 5. Dense point cloud details after 3-D model reconstruction.

Figure 6 .
Figure 6.Residual histogram and Q-Q plot for Canon before removal of outliers.

Figure 7 .
Figure 7. Residual histogram and Q-Q plot for Canon camera after the removal of outliers.

Figure 8 .
Figure 8. Residuals histogram and Q-Q plot for Pentax camera.

Figure 9 .
Figure 9. Histograms of C2C absolute distances for models generated by the Canon (left panel) and Pentax cameras (right panel).

Figure 10 .
Figure 10.C2C absolute distances for relative comparison between Canon and Pentax models.

Figure 12 .
Figure12.Histograms of C2C absolute distances for Canon and Pentax without using any CPs.

Figure 11 .
Figure 11.Histograms of C2C absolute distances for Pentax using the Canon as a reference model.

Figure 14 .
Figure 14.Standard deviation values of C2C distances for different CPs.

Figure 13 .
Figure 13.Mean values of C2C distances for different CPs.

Table 1 .
Descriptions of digital camera parameters.

Table 3 .
Statistical results of the C2C absolute distances between the compared models and laser total station.

Table 4 .
C2C absolute distances for relative comparison.

Table 5 .
Statistical results of the C2C absolute distances without using CPs.

Table 6 .
Results of the models with different CPs.