ACCURACY RESEARCH OF THE EFFECT OF LOCAL SURFACE MODELING METHODS ON THE GENERATION OF 3D MODELS OF HISTORICAL OBJECTS WITH ROCK-BASED BUILDING STRUCTURES USING OPEN-SOURCE SOFTWARE

: The paper describes the effect of the local surface modelling methods known as plane, quadric and triangulation on the generation of the 3D mesh models of the historical objects with rock-based building structures using Cloudcompare, an open-source software for point cloud data processing. The methodology begins with data collection of the 3D test objects using terrestrial laser scanning technology, the pre-processing of the point cloud data, the point cloud subsampling process, the process of generating of the local surface modelling data, the process of generating the 3D mesh models and finally, the analysis, which involves the 3D surface deviation analysis between the generated 3D mesh models. The overall results shows that there are no significant differences between the 3D mesh models that was generated from all the three local surface modelling methods. The histogram analysis shows that the plane and the quadric local surface modelling methods is the best methods to be used in the research where the 3D test object to be modelled contains curvy surfaces without sharp edges and corners.


INTRODUCTION
The purposes of the research are to evaluate the accuracy of the local surface modelling methods known as plane, quadric and triangulation that was included in the Cloudcompare opensource point cloud processing software and its effect on the generation of 3D mesh models of historical object.The hypothesis of this research is that there will be significant differences between the 3D models that will be generated from the three local surface modeling methods which are plane, quadric and triangulation, especially for objects which building structures are based on laterite blocks.
The research object is part of the Bendang Dalam temple monument, a historic temple built in the Bujang Valley area, Kedah State, Peninsular Malaysia.Figure 1 shows the 3D test object that involve in the research.The research object consists of three different monuments, which is monument (a), (b) and (c) (refer to Figure 1), and was mainly built of laterite blocks as well as loose laterite.Other materials include bricks, river stones and granite.Monuments (b) and (c) (later known as first 3D test object and second 3D test object), was selected as 3D test objects in this research.Similar research has been carried out to assess the accuracy of the generated 3D mesh model using various methods.The details of the methods were reported in Barszcz et.al (2021), Daniel et.al (2018), H. Tran et.al (2018), Mikita et.al (2020) and Mohamad Haziq Ahmad Yusri et.al (2022).

METHODOLOGY
The overall methodology involved in this research was shown in Figure 2.

Figure 2. The Overall Phases involve in the Methodology
The overall methodology consists of 6 phases.The detail of each phase is described below.

Phase 1 -Data Collection
The data collection phase was carried out using Topcon GLS2000 terrestrial laser scanning system, as shown in Figure 3.This terrestrial laser scanning system is a time-off-flightbased system with scanning range up to 300 meters.In brief, the tested 3D object was scanned using medium scanning resolution.There are 6 scanning stations was setup around the 3D tested object and the scanning targets was used to connect between the scanning stations.

Phase 2 -Pre-Processing of the Terrestrial Laser Scanning Data
The pre-processing of the terrestrial laser scanning data involves three steps.The steps are shown in Figure 4. Point cloud registration process involves the process of combining all the scanning data using the scanning targets.The latest terrestrial laser scanning system produce terrestrial laser scanning output as coloured point cloud data as the laser scanner was embedded with the high-resolution digital camera and these intelligent capabilities allow the user to carry out the registration process easily.
The second steps involve in the phase 2 is the point cloud cleaning process.The point cloud cleaning process is the process of deleting the point cloud data that has not belong to the 3D test object.The cleaning process was carried out using the Magnet Collage software, a commercial point clouds processing software provided by the Topcon company with every purchase of Topcon brand laser scanning system.Again, the coloured point cloud data help to simplify this step by easily determination of the useless point cloud data in the research.
The third step involves the process of geo-referencing of the registered and cleaned point cloud data of the test 3D object.This step is an optional step.If the location of the 3D test object is not compulsory related to the project, then, the georeferencing process is not important.

Phase 3 -Point Cloud Subsampling
The purpose of the point cloud subsampling process is to subsample the raw point cloud data.In other word, the subsampling process will reduce the number of the point cloud for storage purposes.In this research, the point cloud subsampling process was carried out using the open-source software known as Cloudcompare.Figure 5 shows the point cloud subsampling process using the "space" method.The "space" method means the raw point cloud data will be subsample using the point cloud spacing that will be determined or choose by the user.In this research the point cloud spacing of 0.01meters was used to subsample the raw point cloud data of the 3D test object.The overall results of this phase were shown in sub-section 3 in this paper.

Phase 4 -Generating the Local Surface Modelling Data
The Cloudcompare software provides a method to develop a 3D mesh model directly from the point cloud data.The first step is to compute normal of the point cloud, and the computation of the normal involve the selection of the local surface model method.Cloudcompare offers three methods to compute the local surface model data, which are plane, quadric and triangulation.Figure 6 shows the compute normals window in Cloudcompare software.In this research, the compute normals process involves all the three local surface models which is plane, quadric and triangulation.The results of this process were shown in subsection 3 in this paper.

Phase 5 -Generating the 3D Mesh Models
The process of generating the 3D mesh model of the 3D test object which refer to the plane, quadric and triangulation local surface modelling data was also carried out using the Cloudcompare software.Cloudcompare software offers the Poisson Surface Reconstruction method for the generating of the 3D mesh model of the 3D test object.The method was stored in the Plugin menu.The most important step in Figure 8 above is step (b) where the user is allowed to choose the most suitable value for the filtering of the scalar field.The results of phase 5 were shown in sub-section 3 in this paper.

Phase 6 -Analysis
The purpose of this phase is to investigate whether there is a significant difference between the 3D mesh models that was generated from the plane, quadric and triangulation local surface modelling methods.In other word, phase 6 will carried out the comparison analysis to compare the 3D mesh models.Again, the Cloudcompare software were used to execute phase 6.The comparison analysis was known as the 3D surface deviation analysis.
Phase 6 involves with the implementation of a scientific method to evaluate the significant difference between the 3D mesh models as mentioned above.The scientific method is known as the 3D surface deviation method.This method involves with two main processes which are the registration process the distance computation process.As mentioned by Ahmad et.al (2018), there are few methods that has been developed for point cloud or surface registration.Among the very popular method is an iterative closet point (ICP) method.The simple concept of the ICP can be graphically shown in Figure 9.  2018), the overall purpose of the ICP method is to estimate a rigid transformation between pi P, a point from the reference 3D point cloud, and qi Q, a point from the target point cloud.Furthermore, the ICP method uses nearest neighbors and Euclidean distance calculation and estimates the closest point between the pi and qi as correspondence points.To calculate the rotation R and the translation t between the point pi and qi, the ICP method uses an error function to minimize the sum of square distances.The ICP method implements the below mathematical model as an error function (refer to Equation 1). (1) Where; pi P a point from 3D reference point cloud qi Q a point from target point cloud The deformation analysis can be performed using cloud to cloud distance computation method after the point clouds datasets are spatially registered and scaled.According to Ahmad et.al (2018), one of the most common cloud distance computation methods is Cloud-to-Cloud method (was popularly known as C2C method).C2C method is the computation of distances between two clouds or between a point cloud and a mesh.The purpose of C2C method in this research is to determine the distance difference between two epochs of mobile laser scanning data.The distance differences were referring to the movement of land slip occurred at the research area.Figure 10 shows the basic concept of C2C computation method.

RESULTS
This sub-chapter will discuss about the results that was obtained from the methodology phases.The phases involve are phase 2, 3, 4, 5 and phase 6.

Results for Phase 2 -Cleaned and Coloured Point Cloud Data
As general, the result for phase 2 is a registered and clean coloured point cloud data of the 3D test object.Figure 12 shows the result for phase 2. The research only focuses on the monuments and not including other features such as land and so on.Therefore, the filtering process has been carried out to separate the point cloud data that is belong to the monuments and other features.The filtering process was carried out using the cloth simulation filter algorithm (Zhang et.at, 2016) that was embedded in the Cloudcompare software.Figure 13 shows the filtering process.

Results for Phase 3 -The Subsampling Point Cloud Data
The results for phase 3 are the subsampling point cloud data for the two selected monuments of the 3D test object.Table 1 and Table 2 shows some information related to the subsampling process for both 3D test object, respectively.

Results for Phase 4 -The Local Surface Modelling Data
The results for phase 4 are the local surface modelling data for the two selected monuments of the 3D test object.The results of the computed normals based on the Minimum Spanning Tree (MST) method.Table 3 shows the results for the first 3D test object, while, Table 4 shows the results for the second 3D test object.

Results for Phase 5 -The 3D Mesh Model of the 3D test objects
The results for phase 5 are the 3D mesh model for the two 3D test objects that has been selected from the Bendang Dalam temple archaeological monument.Table 5, 6 and 7 shows the 3D mesh model of the first 3D test object.While, Table 8, 9 and 10 shows the 3D mesh model of the second 3D test object.
Al the results contain the information about the 3D mesh model that was generated from all the three local surface models, including the 3D mesh model in scalar field and real texture (RGB) view, the number of vertices and the number of faces.It can be clearly seen that all the 3D mesh models having a difference in the number of vertices and number of faces for all the three local surface modelling methods.

Results for Phase 6 -Analysis
The main results of the phase 6 is the comparison analysis between the 3D mesh models that was generated from all the three local surface modelling methods, which are plane, quadric and triangulation.The analysis of the first 3D test object was shown in Table 11, 12 and 13.While, the analysis of the second 3D test object was shown in Table 14, 15 and 16.The overall discussion of analysis was carried out in section 4.0 in this paper.

OVERALL DISCUSSION OF THE FINDINGS
Cloudcompare software was be able to show the accuracy of the effect of the local surface modelling methods in quantitative and qualitative forms.The surface deviation analysis between the 3D models generated from the plane and triangulation local surface model methods shows the value of the mean distance and the standard deviation are 4.1776e-06m and 0.0009m, respectively.The mean distance of -1.429e-05m and standard deviation of 0.0004m was calculated for the comparison between the quadric and triangulation local surface model methods, and, the mean distance of 6.55419e-06m with standard deviation of 0.0009m was calculated for the comparison between the quadric and plane local surface model methods.
The above results were belonged to the first 3D test object.The qualitative analysis was also carried out using the colour scale method.The overall result shows that there are no significant differences between the 3D models of the first 3D test object that was generated from the three local surface modeling methods.The above results were shown in Table 11, 12 and 13 in this paper.
To verify the trueness of the results that has been obtained from the first 3D test object, the research has been carried out for the second 3D test object that was built using the same material as the first 3D test object.The similar methodology was implemented and the results for the second 3D test object was shown in Table 14, 15 and 16.The surface deviation analysis between the 3D models generated from the plane and triangulation local surface model methods shows the value of the mean distance and the standard deviation are 2.72446e-05m and 0.0018m, respectively.The mean distance of -3.26801e-05m and standard deviation of 0.0018m was calculated for the comparison between the quadric and triangulation local surface model methods, and, the mean distance of 1.9572e-06m with standard deviation of 0.0006m was calculated for the comparison between the quadric and plane local surface model methods.The analysis of the second 3D test object was ended with histogram analysis that clearly shows that there are no significant differences between the 3D mesh model that has been generated from the plane, quadric and triangulation local surface model.
Results in Table 16 show some interesting findings.The histogram analysis shows that the plane and the quadric local surface modelling methods is the best methods to be used in the research where the 3D object to be modelled contains curvy surfaces without sharp edges and corners.This finding fits the information in the cloudcompare.orgwebsite under the Normals\Compute topic.
The discussion of this research was ended with the visual comparison between the RGB images of the first 3D test object with the images of the 3D mesh model that was generated from all the three tested local surface modelling methods, which are plane, quadric and triangulation.Figure 14 shows the result of the comparison.Referring to Figure 14, the conclusion can be made that all the three local surface modelling methods can be used to generate the 3D mesh model of the 3D test object that was used in this research.Although, the texture of the 3D test object was not included in the figures, but it can be clearly seen that all the generated 3D mesh models resemble the shape of the original object.These are the main findings of the research.

CONCLUSION
In conclusion, this research has successfully achieved its objective.With the advanced facilities provided in the open source Cloudcompare software, this research successfully proved that all local surface modeling methods (plane, quadric and triangulation) can be used to generate 3D mesh models of 3D test objects.This research that has been carried out is based on the 3D test object which is the historical archaeological monument of Bendang Dalam temple at the archaeological site in Bujang Valley, Kedah State, Malaysia.The monument was mainly built of laterite blocks as well as loose laterite.Other materials include bricks, river stones and granite.This research also proves that there is no significant difference between the 3D mesh models that have been produced from all local surface modelling methods for the archaeological monument.For further research, it is suggested that the same methodology be used for historical objects with other building materials such as wood, bamboo, cement stone and so on.

Figure 1 .
Figure 1.The 3D test objects involve in the research -Bendang Dalam temple monument

Figure 4 .
Figure 4. Steps involve in the pre-processing of the terrestrial laser scanning data

Figure 5 .
Figure 5.The point cloud subsampling process using an opensource software known as Cloudcompare

Figure 6 .
Figure 6.The compute normal window in Cloudcompare software

Figure 7
shows the Poisson Surface Reconstruction window in the Cloudcompare software.

Figure 7 .
Figure 7.The Poisson Surface Reconstruction window in the Cloudcompare software for the generation of the 3D mesh model of the 3D test object The process of generating the final 3D mesh model of the 3D test object was shown in Figure 8.

Figure 8 .
Figure 8.The steps of generating the final 3D mesh model of the 3D test object (a) the result of the 3D mesh model based on the selected scalar field value, (b) the process of filtering the scalar field value that suitable for the generated 3D mesh model, (c) the final 3D mesh model in scalar field view and (d) the final 3D mesh model with real texture view

Figure 9 .
Figure 9. Correspondence estimation between undeformed reference point cloud data P and deformed point cloud data Q According to Ahmad et.al (2018), the overall purpose of

Figure 10 .
Figure 10.The basic concept of C2C distance computation methodThe basic C2C distance computation method calculate nearest neighbor distance between the reference cloud and the compared cloud datasets.The principle of nearest neighbor distance is used to compute the distances between the two points where for each point in the compared cloud, the nearest point in the reference cloud is searched and their Euclidean

Figure 11 .
Figure 11.The concept of local surface model C2C distance computation method Local surface model methods work by locally model the surface of the reference cloud by fitting a mathematical primitive on the nearest point and several of its neighbors.This process was carried out when the nearest point in the reference cloud is determined.CloudCompare software offers three local surface model methods which are least square plane, 2D1/2 triangulation and quadric.According toJafari (2016), the C2C distance computation algorithm implements the Hausdorff distance that calculate the distances between the correspondence points.The Hausdorff distance from set A to set B is a maximum function defines as Equation 2 below:

Figure 12 .
Figure 12.A registered and clean coloured point cloud data of the 3D test object: (a) plan view of the 3D test object and (b) perspective view of the test 3D object

Figure 13 .
Figure 13.The point cloud filtering process: (a) point cloud data -before filter, (b) the Cloth Simulation Filter window in Cloudcompare software and (c) point cloud data -after filter

Figure 14 .
Figure 14.The visual comparison of the 3D mesh model that was generated from all three local surface modelling mothods: (a) images of part of the first 3D object, (b) images of the 3D mesh model from the plane method, (c) images of the 3D mesh model from the triangulation method, and (d) images of the 3D mesh model from the quadric method

Table 1 .
The point cloud subsampling process of the first 3D test object

Table 2 .
The point cloud subsampling process of the second 3D test object

Table 3 .
The local surface modelling results of the first 3D test object

Table 4 .
The local surface modelling results of the second 3D test object

Table 5 .
The 3D mesh model of the first 3D test object generated from the plane local surface modelling method

Table 6 .
The 3D mesh model of the first 3D test object generated from the quadric local surface modelling method

Table 7 .
The 3D mesh model of the first 3D test object generated from the triangulation local surface modelling method

Table 8 .
The 3D mesh model of the second 3D test object generated from the plane local surface modelling method

Table 9 .
The 3D mesh model of the second 3D test object generated from the quadric local surface modelling method

Table 10 .
The 3D mesh model of the second 3D test object generated from the triangulation local surface modelling method

Table 11 .
A qualitative analysis using colour scale to show 3D surface deviation analysis results between the 3D models generated from the plane and triangulation local surface modelling methods for the first 3D test object

Table 12 .
A qualitative analysis using colour scale to show 3D surface deviation analysis results between the 3D models generated from the quadric and triangulation local surface modelling methods for the first 3D test object

Table 13 .
A qualitative analysis using colour scale to show 3D surface deviation analysis results between 3D models generated from the quadric and plane local surface modelling methods for the first

Table 14 .
A qualitative analysis using colour scale to show 3D surface deviation analysis results between the 3D models generated from the plane and triangulation local surface modelling methods for the second 3D test object

Table 15 .
A qualitative analysis using colour scale to show 3D surface deviation analysis results between the 3D models generated from the quadric and triangulation local surface modelling methods for the second

Table 16 .
A qualitative analysis using colour scale to show 3D surface deviation analysis results between the 3D models generated from the plane and quadric local surface modelling methods for the second 3D test object