# Geometric Modeling ofRosa roxburghii Fruit Based on Three-Dimensional Point Cloud Reconstruction

Authors: Zhiping Xie; Yancheng Lang; Luqi Chen
Journal: Journal of Food Quality
 (2021)

---

## Abstract

Fruit three-dimensional (3D) model is crucial to estimating its geometrical and mechanical properties and improving the level of fruit mechanical processing. Considering the complex geometrical features and the required model accuracy, this paper proposed a 3D point cloud reconstruction method for theRosa roxburghii fruit based on a three-dimensional laser scanner, including 3D point cloud generation, point cloud registration, fruit thorns segmentation, and 3D reconstruction. The 3D laser scanner was used to obtain the original 3D point cloud data of the Rosa roxburghii fruit, and then the fruit thorns data were removed by the segmentation algorithm combining the statistical outlier removal and radius outlier removal. By analyzing the effects of five-point cloud simplification methods, the optimal simplification method was determined. The Poisson reconstruction algorithm, the screened Poisson reconstruction algorithm, the greedy projection triangulation algorithm, and the Delaunay triangulation algorithm were utilized to reconstruct the fruit model. The number of model vertices, the number of facets, and the relative volume error were used to determine the best reconstruction algorithm. The results indicated that this model can better reconstruct the actual surface of Rosa roxburghii fruit. The method provides a reference for the related application.


---

## Body

## 1. Introduction

Rosa roxburghii is a perennial deciduous shrub of the Rosaceae Rosa genus, which is mainly distributed in southwest areas in China, such as Yunnan, Guizhou, and Sichuan [1, 2]. Rosa roxburghii fruit has high nutritional value and health function [2–4], and it is a kind of fruit with great economic value. In recent years, the Rosa roxburghii has been vigorously promoted in Guizhou, which has 133,000 hectares of planting area and 100,000 tons of annual output of fresh fruits. However, the degree of automation in the fruit processing process is not high, especially the process of fruit picking and fruit pedicle removal. In order to realize the whole automation of fruit processing, it is particularly important for the three-dimensional digital reconstruction of Rosa roxburghii fruit.3D reconstruction of agricultural and forestry crops has become an important research method in agricultural scientific research. In this method, plants with complex shapes can be studied by combining agricultural production knowledge and computer graphics technology [5, 6]. The 3D reconstruction methods of agricultural and forestry crops mainly include the image-based reconstruction, the parametric model-based reconstruction, and the 3D point cloud-based reconstruction [7–10].The image-based reconstruction method is to use multiple images to reconstruct the surface model of crops. Quan et al. [11] and Wang et al. [12] reconstructed 3D models of plants and corn ears, respectively, based on image technology. A robotic arm with a camera was used to collect a series of two-dimensional images of the object to achieve three-dimensional reconstruction, and the influence of the motion of the robotic arm on the accuracy of the three-dimensional image reconstruction was studied [13]. This method has the advantage of quickness and simplicity but has the defect in detailed features.The parametric model-based reconstruction method needs to collect the surface characteristic parameters of the object. Kempthorne et al. [14] applied the discrete smoothing D2-spline algorithms to reconstruct the leaf surfaces from point cloud data. Hu et al. [15] presented the method based on 3D visualization to measure the leaf area, length, and width of poplar seedlings. Tinoco et al. [16] modeled the topological structure of coffee fruits based on Bezier curves and performed finite element analysis. The accuracy of this method is not very high, and it is not suitable for the reconstruction of complex shapes.The 3D point cloud-based reconstruction method relies on the instrument to directly obtain the 3D information of the measured object, which has high accuracy and wide applications. Sun and Wang [17] proposed the 3D rapid greenhouse plant point cloud reconstruction method based on autonomous Kinect v2 sensor position calibration. Xie et al. [18] used the terrestrial LiDAR to obtain point cloud data of a single tree and reconstructed the 3D model of the tree with leaves. Zermas et al. [19] utilized an unmanned aerial vehicle and the handheld camera with structure from motion to reconstruct 3D canopies of small groups of corn plants. An accurate 3D point cloud data is critical for these methods, but the methods of using the Kinect v2 sensor, terrestrial LiDAR, and unmanned aerial vehicle to obtain point cloud data ignore or simplify the object details. In addition, the prickly surface of Rosa roxburghii fruit brings challenges to the acquisition of the 3D point cloud of the fruit.The 3D lasers canner is widely used to obtain 3D point cloud data due to the advantages of noncontact and high accuracy [20]. Zhang et al. [21] employed the 3D laser scanning technology to obtain the point cloud data of apple tree leaves and achieved 3D reconstruction of apple tree leaves. Considering that the detailed features of the fruit surface can be acquired by a 3D laser scanner, it is a novel idea to use the 3D laser scanner to obtain the point cloud data of the Rosa roxburghii fruit.The novelties and contributions of this paper are summarized as follows:(1)
Proposing a 3D point cloud reconstruction method for theRosa roxburghii fruit based on the 3D laser scanner(2)
Designing a fruit thorns segmentation algorithm combining statistical outlier removal and radius outlier removal and improving the accuracy of the 3D model ofRosa roxburghii fruit(3)
Proposing a volume calculation method forRosa roxburghii fruit based on cylindrical coordinates to verify the accuracy of the reconstructed modelThe main purpose of this paper is to obtain an accurate 3D geometric model of theRosa roxburghii fruit without thorns which will facilitate the subsequent finite element simulation of the mechanical properties and the design of related mechanical processing equipment. The rest of this paper is arranged as follows: in Section 2, the measurement system, point cloud registration, segmentation algorithm, and 3D reconstruction algorithm are described in detail. In Section 3, the results of point cloud segmentation, simplification, and reconstruction are discussed in detail, and the 3D reconstruction method is verified. Section 4 summarizes this paper.


## 2. Materials and Methods

### 2.1. Structure and Principle of the Measurement System

The schematic diagram of obtaining point cloud data ofRosa roxburghii fruit is shown in Figure 1. Figure 1 shows that Rosa roxburghii fruit has sharp thorns and an uneven surface. The noncontact 3D laser scanner (Laser-RE600111) was used to obtain the surface of Rosa roxburghii in this experiment. And its collection frequency, scanning accuracy, scanning distance, and measurement range are 1000–15000/s, 0.02 mm, 150 mm, and 600 mm (length) × 500 mm (width) × 400 mm (height), respectively. The operation process of collecting data was divided into 3 steps. Firstly, a white developer was sprayed on the fruit surface to obtain a good diffuse reflection shape, and then the laser scanner was employed to measure the horizontal and vertical point cloud data of the fruit in the rotating state. Secondly, the point cloud data from different angles were manually registered through three preset marker points, and then the point cloud processing software (Geomagic studio 2017) was used for secondary fine registration. Finally, the final point cloud format was saved as a PCD file to facilitate the subsequent running of algorithms. The point cloud data collection experiment of Rosa roxburghii was completed in the reverse engineering laboratory.Figure 1
Schematic diagram of point cloud data acquisition.In the paper, the point cloud images were all visualized by MATLAB R2018b. The 3D reconstruction flowchart ofRosa roxburghii fruit is shown in Figure 2.Figure 2
Flowchart of 3D reconstruction ofRosa roxburghii fruit.


### 2.2. Registration of the Point Cloud of Fruit

Since the pedicle end of the fruit is concave and the stalk end is approximately flat, the point cloud data of the top and bottom of the fruit cannot be obtained for the vertical position. Therefore, it is necessary to rotate the fruit to obtain the top and bottom point cloud data. In the experiment, the fruit was placed vertically along thez-axis (Figure 1), and the platform was rotated 360° to collect point cloud data around the fruit. In order to make the point cloud on the top and bottom of the fruit and the point cloud on the side of the fruit in the same coordinate system, the fruit must be rotated 90° and −90° (rotate counterclockwise as positive direction) around the y-axis (Figure 1), respectively. Through the rotation matrix (equation (1)), the point cloud data on the top and bottom of the fruit and the point cloud data on the side of the fruit can be unified into the same coordinate system by iterative closest point (ICP) [22] algorithm. The registration process of fruit point cloud data is shown in Figure 3. The relationship between point cloud data before and after rotation is shown in equation (2):(1)Ryα=cosα0sinα010−sinα0cosα,(2)pointcloud′mxn,yn,zn=pointcloudmxn,yn,zn×Ryα,where pointcloudm is the mth point cloud data before rotation adjustment; (xn, yn, zn) are the coordinates of the point cloud; n is the number of point clouds; pointcloud′m is the mth point cloud data after rotation adjustment; Ry(α) is rotation matrix of the fruit rotating around the y-axis; and α is the rotation angle of the point cloud.Figure 3
Registering the entire model of fruit through point cloud data from different coordinate systems.In Figure3, the point cloud data of the side, top, and bottom of the Rosa roxburghii fruit were scanned by a platform that can rotate at a uniform speed, and they were registered together through the corresponding rotation matrix. After the point cloud registration process, the complete point cloud of Rosa roxburghii fruit was obtained for fruit thorns segmentation and point cloud simplification.


### 2.3. Segmentation Algorithm of Fruit Thorns

Generally, it is inevitable to be affected by the accuracy of the instrument, the operation of personnel, and external environmental factors, so that the collected point cloud data contains noise, which have adverse effects on the subsequent operation and 3D reconstruction of the point cloud data [23]. Besides, the analysis of mechanical properties of Rosa roxburghii fruit is affected by the fruit thorns on the fruit surface, which need to be removed when building the geometric model. The segmentation algorithm combining the statistical outlier removal [24, 25] and radius outlier removal [26] was proposed to remove noise and fruit thorns. A flowchart of a fruit thorn segmentation algorithm was proposed, as shown in Figure 4. The steps of the segmentation algorithm can be summarized as follows:Step 1: the point cloud dataset is assumed to beP=p1,p2,…,pn, and the three-dimensional space coordinates of any point pi is xi,yi,zi. The size k value of the neighborhood is input, and then the 3D space coordinates of the k neighbors of pi are expressed as xj,yj,zj. The formula for calculating the average distance di from each point to its k neighbors is as follows:(3)di=1k∑j=1kxi−xj2+yi−yj2+zi−zj2.Step 2: the meanμ and standard deviation σ of the average distance between each point’s neighborhoods are calculated. Their calculation formulas are as follows:(4)μ=∑i=1ndin,(5)σ=1n∑i=1ndi−μ2,wheren is the original point cloud number of Rosa roxburghii fruit.Step 3: each point of the dataset is judged on whether it is an outlier. The standard deviation multipleα is set as a constant; if d > μ + ασ, the point is judged as an outlier, and it is deleted; and if d < μ + ασ, the point is judged to be a normal point, and it is retained.Step 4: steps 1–3 are repeated until all points are calculated and judged.Step 5: the remaining outliers are removed by radius outlier removal. The thresholdN of the number of k nearest neighbors and the radius r of the search sphere are, respectively, determined. If the number of neighbors of a point within the radius r of the sphere is less than the threshold N, the point is determined to be an outlier and can be deleted. Otherwise, the point is a normal point and retained.Step 6: until all the points are traversed, the segmentation algorithm is ended.Figure 4
Flowchart of the segmentation algorithm of fruit thorns.


### 2.4. Point Cloud 3D Reconstruction

Nowadays, some well-known reconstruction algorithms based on point cloud have been proven to have good reconstruction effects on solid surfaces, such as ball pivoting [27], Poisson reconstruction [28], screened Poisson reconstruction [29], marching cubes [30], alpha shapes [31], greedy projection triangulation [32], and Delaunay triangulation [33]. This paper uses the Poisson reconstruction algorithm, screened Poisson reconstruction algorithm, greedy projection triangulation algorithm, and Delaunay triangulation algorithm to reconstruct the 3D model of Rosa roxburghii fruit.


#### 2.4.1. Poisson Reconstruction Algorithm

The Poisson reconstruction algorithm belongs to the implicit function of the triangle mesh reconstruction algorithm, in which the advantages of local fitting and global fitting are taken into account [34]. While the global smoothness of the reconstructed surface is realized, the local detailed features are preserved, and the reconstruction effect for closed surfaces is better. Except for the point samples around the surface, the gradient of the indicator function everywhere is a vector field with a value of zero. Therefore, the indicator function is equal to the inner normal of the surface. The core idea of the algorithm is as follows: for an unknown 3D entity M, to solve an indicator function χ after its surface ∂M is smoothed, so that its gradient field is equal to the divergence of the surface ∂M vector field V⟶ [28]:(6)Δχ=∇⋅V⟶,∇χM∗F˜qo=∫∂MF˜PqoN⟶∂Mpdp≈∑s∈SpsF˜s.pqs.N⟶,where χM is the indicator function of M, F˜ shows the smoothing filter function, N⟶ denotes the inward normal of the point, and ps is the area of the small patch.The approximate steps of the Poisson reconstruction algorithm are as follows [35]: (1) discretization function space through Octree, (2) estimating the vector field by using principal component analysis, (3) solving the Poisson equation, and (4) extracting the isosurface. The flowchart of the algorithm is shown in Figure 5.Figure 5
Flowchart of the Poisson reconstruction algorithm.


#### 2.4.2. Screened Poisson Reconstruction Algorithm

Although in the process of solving Poisson’s equation, an approximate solution of the indicator function can be obtained, this approximate solution may be very different from the real indicator function. In order to avoid this shortcoming, Kazhdan and Hoppe [29] proposed the screened Poisson surface reconstruction algorithm, which introduces the constraints of the point set to turn the problem solving into the process of solving the screened Poisson equation to make the solved indicator function more accurate. Figure 6 shows the flowchart of the screened Poisson reconstruction algorithm. The detailed steps of the screened Poisson reconstruction algorithm are as follows: (1) incorporating point constraints, (2) scale-independent screening, (3) discretizing the function space with an Octree, (4) estimating the vector field, and (5) solving the screened Poisson equation as follows:(7)Δ−αI⟶χ=∇⋅V⟶.Figure 6
Flowchart of the screened Poisson reconstruction algorithm.


#### 2.4.3. Greedy Projection Triangulation Algorithm

The greedy projection triangulation algorithm is a surface reconstruction technology based on triangulation and the greedy algorithm. The idea of the greedy algorithm is to simplify complex problems without considering the overall situation, but only seeking local optimal solutions. And the greedy algorithm follows three criteria, namely, the nearest greedy criterion, the nearest neighbor greedy criterion, and the directed greedy criterion. The basic steps of the algorithm are as follows [32]:Step 1: at a certain point, the local tangent plane perpendicular to the normal vector of the point should be determined first.Step 2: in the three-dimensional point cloud set, an initial triangle is determined, and thek nearest neighbors of the three points constituting the triangle are searched. These three points and their k neighboring points are projected on the tangent plane of the point along the normal direction.Step 3: the two-dimensional triangulation of the projection point on the projection plane is performed.Step 4: the optimal expansion point on the two-dimensional plane is mapped back to the three-dimensional space to form a spatial triangle grid.Step 5: steps 1–4 are looped until a complete mesh surface is formed, and then the algorithm is stopped.


#### 2.4.4. Delaunay Triangulation Algorithm

Delaunay triangulation is a classic triangle mesh reconstruction algorithm, which determines the scattered point cloud space topology by constructing a triangle mesh. In the triangulation algorithm, the Delaunay triangulation algorithm can obtain the optimal triangulation grid. According to the different implementation processes, Delaunay triangulation can be divided into point-by-point insertion method [36], region growth method, divide-and-conquer method [37], and random Delaunay filtering method [38]. In this paper, the Delaunay triangulation algorithm based on region growth is adopted. The basic steps of the algorithm are as follows [33]:Step 1: any point in the point set is selected, and the nearest neighbor point to that point is found.Step 2: the line connecting these two points is used as the initial edge to expand outward, and the third point that can form the best Delaunay triangle with the initial edge is searched.Step 3: the initial side and the third point form a new triangle, and the other two sides of the new triangle except for the initial side are added to the edge queue, but the existing sides cannot be added repeatedly.Step 4: steps 1–3 are repeated until the surface growth is completed.


## 2.1. Structure and Principle of the Measurement System

The schematic diagram of obtaining point cloud data ofRosa roxburghii fruit is shown in Figure 1. Figure 1 shows that Rosa roxburghii fruit has sharp thorns and an uneven surface. The noncontact 3D laser scanner (Laser-RE600111) was used to obtain the surface of Rosa roxburghii in this experiment. And its collection frequency, scanning accuracy, scanning distance, and measurement range are 1000–15000/s, 0.02 mm, 150 mm, and 600 mm (length) × 500 mm (width) × 400 mm (height), respectively. The operation process of collecting data was divided into 3 steps. Firstly, a white developer was sprayed on the fruit surface to obtain a good diffuse reflection shape, and then the laser scanner was employed to measure the horizontal and vertical point cloud data of the fruit in the rotating state. Secondly, the point cloud data from different angles were manually registered through three preset marker points, and then the point cloud processing software (Geomagic studio 2017) was used for secondary fine registration. Finally, the final point cloud format was saved as a PCD file to facilitate the subsequent running of algorithms. The point cloud data collection experiment of Rosa roxburghii was completed in the reverse engineering laboratory.Figure 1
Schematic diagram of point cloud data acquisition.In the paper, the point cloud images were all visualized by MATLAB R2018b. The 3D reconstruction flowchart ofRosa roxburghii fruit is shown in Figure 2.Figure 2
Flowchart of 3D reconstruction ofRosa roxburghii fruit.


## 2.2. Registration of the Point Cloud of Fruit

Since the pedicle end of the fruit is concave and the stalk end is approximately flat, the point cloud data of the top and bottom of the fruit cannot be obtained for the vertical position. Therefore, it is necessary to rotate the fruit to obtain the top and bottom point cloud data. In the experiment, the fruit was placed vertically along thez-axis (Figure 1), and the platform was rotated 360° to collect point cloud data around the fruit. In order to make the point cloud on the top and bottom of the fruit and the point cloud on the side of the fruit in the same coordinate system, the fruit must be rotated 90° and −90° (rotate counterclockwise as positive direction) around the y-axis (Figure 1), respectively. Through the rotation matrix (equation (1)), the point cloud data on the top and bottom of the fruit and the point cloud data on the side of the fruit can be unified into the same coordinate system by iterative closest point (ICP) [22] algorithm. The registration process of fruit point cloud data is shown in Figure 3. The relationship between point cloud data before and after rotation is shown in equation (2):(1)Ryα=cosα0sinα010−sinα0cosα,(2)pointcloud′mxn,yn,zn=pointcloudmxn,yn,zn×Ryα,where pointcloudm is the mth point cloud data before rotation adjustment; (xn, yn, zn) are the coordinates of the point cloud; n is the number of point clouds; pointcloud′m is the mth point cloud data after rotation adjustment; Ry(α) is rotation matrix of the fruit rotating around the y-axis; and α is the rotation angle of the point cloud.Figure 3
Registering the entire model of fruit through point cloud data from different coordinate systems.In Figure3, the point cloud data of the side, top, and bottom of the Rosa roxburghii fruit were scanned by a platform that can rotate at a uniform speed, and they were registered together through the corresponding rotation matrix. After the point cloud registration process, the complete point cloud of Rosa roxburghii fruit was obtained for fruit thorns segmentation and point cloud simplification.


## 2.3. Segmentation Algorithm of Fruit Thorns

Generally, it is inevitable to be affected by the accuracy of the instrument, the operation of personnel, and external environmental factors, so that the collected point cloud data contains noise, which have adverse effects on the subsequent operation and 3D reconstruction of the point cloud data [23]. Besides, the analysis of mechanical properties of Rosa roxburghii fruit is affected by the fruit thorns on the fruit surface, which need to be removed when building the geometric model. The segmentation algorithm combining the statistical outlier removal [24, 25] and radius outlier removal [26] was proposed to remove noise and fruit thorns. A flowchart of a fruit thorn segmentation algorithm was proposed, as shown in Figure 4. The steps of the segmentation algorithm can be summarized as follows:Step 1: the point cloud dataset is assumed to beP=p1,p2,…,pn, and the three-dimensional space coordinates of any point pi is xi,yi,zi. The size k value of the neighborhood is input, and then the 3D space coordinates of the k neighbors of pi are expressed as xj,yj,zj. The formula for calculating the average distance di from each point to its k neighbors is as follows:(3)di=1k∑j=1kxi−xj2+yi−yj2+zi−zj2.Step 2: the meanμ and standard deviation σ of the average distance between each point’s neighborhoods are calculated. Their calculation formulas are as follows:(4)μ=∑i=1ndin,(5)σ=1n∑i=1ndi−μ2,wheren is the original point cloud number of Rosa roxburghii fruit.Step 3: each point of the dataset is judged on whether it is an outlier. The standard deviation multipleα is set as a constant; if d > μ + ασ, the point is judged as an outlier, and it is deleted; and if d < μ + ασ, the point is judged to be a normal point, and it is retained.Step 4: steps 1–3 are repeated until all points are calculated and judged.Step 5: the remaining outliers are removed by radius outlier removal. The thresholdN of the number of k nearest neighbors and the radius r of the search sphere are, respectively, determined. If the number of neighbors of a point within the radius r of the sphere is less than the threshold N, the point is determined to be an outlier and can be deleted. Otherwise, the point is a normal point and retained.Step 6: until all the points are traversed, the segmentation algorithm is ended.Figure 4
Flowchart of the segmentation algorithm of fruit thorns.


## 2.4. Point Cloud 3D Reconstruction

Nowadays, some well-known reconstruction algorithms based on point cloud have been proven to have good reconstruction effects on solid surfaces, such as ball pivoting [27], Poisson reconstruction [28], screened Poisson reconstruction [29], marching cubes [30], alpha shapes [31], greedy projection triangulation [32], and Delaunay triangulation [33]. This paper uses the Poisson reconstruction algorithm, screened Poisson reconstruction algorithm, greedy projection triangulation algorithm, and Delaunay triangulation algorithm to reconstruct the 3D model of Rosa roxburghii fruit.


### 2.4.1. Poisson Reconstruction Algorithm

The Poisson reconstruction algorithm belongs to the implicit function of the triangle mesh reconstruction algorithm, in which the advantages of local fitting and global fitting are taken into account [34]. While the global smoothness of the reconstructed surface is realized, the local detailed features are preserved, and the reconstruction effect for closed surfaces is better. Except for the point samples around the surface, the gradient of the indicator function everywhere is a vector field with a value of zero. Therefore, the indicator function is equal to the inner normal of the surface. The core idea of the algorithm is as follows: for an unknown 3D entity M, to solve an indicator function χ after its surface ∂M is smoothed, so that its gradient field is equal to the divergence of the surface ∂M vector field V⟶ [28]:(6)Δχ=∇⋅V⟶,∇χM∗F˜qo=∫∂MF˜PqoN⟶∂Mpdp≈∑s∈SpsF˜s.pqs.N⟶,where χM is the indicator function of M, F˜ shows the smoothing filter function, N⟶ denotes the inward normal of the point, and ps is the area of the small patch.The approximate steps of the Poisson reconstruction algorithm are as follows [35]: (1) discretization function space through Octree, (2) estimating the vector field by using principal component analysis, (3) solving the Poisson equation, and (4) extracting the isosurface. The flowchart of the algorithm is shown in Figure 5.Figure 5
Flowchart of the Poisson reconstruction algorithm.


### 2.4.2. Screened Poisson Reconstruction Algorithm

Although in the process of solving Poisson’s equation, an approximate solution of the indicator function can be obtained, this approximate solution may be very different from the real indicator function. In order to avoid this shortcoming, Kazhdan and Hoppe [29] proposed the screened Poisson surface reconstruction algorithm, which introduces the constraints of the point set to turn the problem solving into the process of solving the screened Poisson equation to make the solved indicator function more accurate. Figure 6 shows the flowchart of the screened Poisson reconstruction algorithm. The detailed steps of the screened Poisson reconstruction algorithm are as follows: (1) incorporating point constraints, (2) scale-independent screening, (3) discretizing the function space with an Octree, (4) estimating the vector field, and (5) solving the screened Poisson equation as follows:(7)Δ−αI⟶χ=∇⋅V⟶.Figure 6
Flowchart of the screened Poisson reconstruction algorithm.


### 2.4.3. Greedy Projection Triangulation Algorithm

The greedy projection triangulation algorithm is a surface reconstruction technology based on triangulation and the greedy algorithm. The idea of the greedy algorithm is to simplify complex problems without considering the overall situation, but only seeking local optimal solutions. And the greedy algorithm follows three criteria, namely, the nearest greedy criterion, the nearest neighbor greedy criterion, and the directed greedy criterion. The basic steps of the algorithm are as follows [32]:Step 1: at a certain point, the local tangent plane perpendicular to the normal vector of the point should be determined first.Step 2: in the three-dimensional point cloud set, an initial triangle is determined, and thek nearest neighbors of the three points constituting the triangle are searched. These three points and their k neighboring points are projected on the tangent plane of the point along the normal direction.Step 3: the two-dimensional triangulation of the projection point on the projection plane is performed.Step 4: the optimal expansion point on the two-dimensional plane is mapped back to the three-dimensional space to form a spatial triangle grid.Step 5: steps 1–4 are looped until a complete mesh surface is formed, and then the algorithm is stopped.


### 2.4.4. Delaunay Triangulation Algorithm

Delaunay triangulation is a classic triangle mesh reconstruction algorithm, which determines the scattered point cloud space topology by constructing a triangle mesh. In the triangulation algorithm, the Delaunay triangulation algorithm can obtain the optimal triangulation grid. According to the different implementation processes, Delaunay triangulation can be divided into point-by-point insertion method [36], region growth method, divide-and-conquer method [37], and random Delaunay filtering method [38]. In this paper, the Delaunay triangulation algorithm based on region growth is adopted. The basic steps of the algorithm are as follows [33]:Step 1: any point in the point set is selected, and the nearest neighbor point to that point is found.Step 2: the line connecting these two points is used as the initial edge to expand outward, and the third point that can form the best Delaunay triangle with the initial edge is searched.Step 3: the initial side and the third point form a new triangle, and the other two sides of the new triangle except for the initial side are added to the edge queue, but the existing sides cannot be added repeatedly.Step 4: steps 1–3 are repeated until the surface growth is completed.


## 2.4.1. Poisson Reconstruction Algorithm

The Poisson reconstruction algorithm belongs to the implicit function of the triangle mesh reconstruction algorithm, in which the advantages of local fitting and global fitting are taken into account [34]. While the global smoothness of the reconstructed surface is realized, the local detailed features are preserved, and the reconstruction effect for closed surfaces is better. Except for the point samples around the surface, the gradient of the indicator function everywhere is a vector field with a value of zero. Therefore, the indicator function is equal to the inner normal of the surface. The core idea of the algorithm is as follows: for an unknown 3D entity M, to solve an indicator function χ after its surface ∂M is smoothed, so that its gradient field is equal to the divergence of the surface ∂M vector field V⟶ [28]:(6)Δχ=∇⋅V⟶,∇χM∗F˜qo=∫∂MF˜PqoN⟶∂Mpdp≈∑s∈SpsF˜s.pqs.N⟶,where χM is the indicator function of M, F˜ shows the smoothing filter function, N⟶ denotes the inward normal of the point, and ps is the area of the small patch.The approximate steps of the Poisson reconstruction algorithm are as follows [35]: (1) discretization function space through Octree, (2) estimating the vector field by using principal component analysis, (3) solving the Poisson equation, and (4) extracting the isosurface. The flowchart of the algorithm is shown in Figure 5.Figure 5
Flowchart of the Poisson reconstruction algorithm.


## 2.4.2. Screened Poisson Reconstruction Algorithm

Although in the process of solving Poisson’s equation, an approximate solution of the indicator function can be obtained, this approximate solution may be very different from the real indicator function. In order to avoid this shortcoming, Kazhdan and Hoppe [29] proposed the screened Poisson surface reconstruction algorithm, which introduces the constraints of the point set to turn the problem solving into the process of solving the screened Poisson equation to make the solved indicator function more accurate. Figure 6 shows the flowchart of the screened Poisson reconstruction algorithm. The detailed steps of the screened Poisson reconstruction algorithm are as follows: (1) incorporating point constraints, (2) scale-independent screening, (3) discretizing the function space with an Octree, (4) estimating the vector field, and (5) solving the screened Poisson equation as follows:(7)Δ−αI⟶χ=∇⋅V⟶.Figure 6
Flowchart of the screened Poisson reconstruction algorithm.


## 2.4.3. Greedy Projection Triangulation Algorithm

The greedy projection triangulation algorithm is a surface reconstruction technology based on triangulation and the greedy algorithm. The idea of the greedy algorithm is to simplify complex problems without considering the overall situation, but only seeking local optimal solutions. And the greedy algorithm follows three criteria, namely, the nearest greedy criterion, the nearest neighbor greedy criterion, and the directed greedy criterion. The basic steps of the algorithm are as follows [32]:Step 1: at a certain point, the local tangent plane perpendicular to the normal vector of the point should be determined first.Step 2: in the three-dimensional point cloud set, an initial triangle is determined, and thek nearest neighbors of the three points constituting the triangle are searched. These three points and their k neighboring points are projected on the tangent plane of the point along the normal direction.Step 3: the two-dimensional triangulation of the projection point on the projection plane is performed.Step 4: the optimal expansion point on the two-dimensional plane is mapped back to the three-dimensional space to form a spatial triangle grid.Step 5: steps 1–4 are looped until a complete mesh surface is formed, and then the algorithm is stopped.


## 2.4.4. Delaunay Triangulation Algorithm

Delaunay triangulation is a classic triangle mesh reconstruction algorithm, which determines the scattered point cloud space topology by constructing a triangle mesh. In the triangulation algorithm, the Delaunay triangulation algorithm can obtain the optimal triangulation grid. According to the different implementation processes, Delaunay triangulation can be divided into point-by-point insertion method [36], region growth method, divide-and-conquer method [37], and random Delaunay filtering method [38]. In this paper, the Delaunay triangulation algorithm based on region growth is adopted. The basic steps of the algorithm are as follows [33]:Step 1: any point in the point set is selected, and the nearest neighbor point to that point is found.Step 2: the line connecting these two points is used as the initial edge to expand outward, and the third point that can form the best Delaunay triangle with the initial edge is searched.Step 3: the initial side and the third point form a new triangle, and the other two sides of the new triangle except for the initial side are added to the edge queue, but the existing sides cannot be added repeatedly.Step 4: steps 1–3 are repeated until the surface growth is completed.


## 3. Results and Discussion

### 3.1. Result of Point Cloud Segmentation

The original 3D point cloud of theRosa roxburghii obtained by the 3D laser scanner is shown in Figure 7(a), and the total number of point clouds contained 230674 points. The 3D point cloud after segmentation using the statistical outlier removal algorithm [24, 25] is shown in Figure 7(b), and the number of neighbor points k and the standard deviation multiple were set to 35 and 1.3, respectively. The 3D point cloud after segmentation using the radius outlier removal algorithm [26] is shown in Figure 7(c), and the threshold N of the number of neighbor points and the radius r of the sphere were taken as 60 and 0.8, respectively. The 3D point cloud after segmentation using the bilateral filtering algorithm [39] is shown in Figure 7(d). It can effectively remove the noise points, but it cannot effectively remove the thorns. The 3D point cloud after segmentation using the proposed separation algorithm is shown in Figure 7(e), and the number of point cloud data after segmentation retains 206031 points. It can be seen from Figure 7(e) that the thorns and noise points on the surface of Rosa roxburghii fruit were basically removed, indicating that the segmentation effect was particularly obvious. Figures 7(a)–7(e) show that the four segmentation algorithms can effectively remove noise, and the proposed segmentation algorithm can remove fruit thorns better than the other three segmentation algorithms.Figure 7
Original 3D point cloud and result of point cloud segmentation. (a) Original point cloud; (b) statistical outlier removal; (c) radius outlier removal; (d) bilateral filtering; (e) proposed algorithm.
(a)(b)(c)(d)(e)


### 3.2. Comparison of Different Simplification Methods

Owing to the high accuracy of the 3D laser scanner, the amount of point cloud data collected is greatly large, which not only contains the geometric information of theRosa roxburghii fruit but also has redundant data points that need to be eliminated [40]. Plenty of time is consumed, and a large amount of computer memory is occupied in the data processing process. Furthermore, all points need not be calculated at the stage of 3D reconstruction, as long as the feature points are retained. In order to balance the contradiction between time and efficiency, it is necessary to streamline the point cloud data for the grid reconstruction process [41]. The 3D voxel grid filter method [42, 43], the curvature sampling method [44], the random sampling method, the uniform sampling method, and the distance sampling method are common simplification methods.In the point cloud streamlining processing stage, the 3D voxel grid filter method, the curvature sampling method, the random sampling method, the uniform sampling method, and the distance sampling method were compared and analyzed, and the best sampling method was determined as the simplification algorithm. In order to assess the point cloud simplification effect of different sampling methods, the simplification rateη and average error ε were introduced to evaluate the simplification effect. The simplification rate η was defined as follows:(8)η=n1−n2n1×100%,where n1 represents the number of point clouds before simplification and n2 represents the number of point clouds before simplification.The average errorε is defined as follows [45]:(9)ε=1S∑u∈Sdu,v,where du,v represents the Euclidean distance between the sampling point u of the original surface S of the fruit and the projection point v of the simplified surface.Generally, when the simplification rate is constant, the greater the average error is, the greater the deviation between the surface and the sampled data is and vice versa. Table1 shows the simplification rate and average error of the point cloud reconstruction model with different sampling methods. The effect of different sampling methods on the point cloud is shown in Figure 8. It can be seen from Table 1 that when simplification rate η was approximately 90%, the average error of the 3D voxel grid filter method is the smallest in the five sampling methods, and the average error of the random sampling method is the largest. Moreover, it can be seen from Figure 8 that the random sampling method did not consider the detailed feature points to randomly sample and streamline, which resulted in uneven point cloud sampling. From the effect point of view, although the uniform sampling method and the distance sampling method were more uniform, the detail feature of the point cloud was not obvious. Although the curvature sampling method can retain feature points well, the standard deviation of the reconstructed model is higher than that of the 3D voxel grid filter method. Considering the average error of the reconstruction model and the advantages and disadvantages of the point cloud sampling methods, the 3D voxel grid filter can retain the features better and the error was small, so this method was selected to simplify the point cloud of the Rosa roxburghii fruit.Table 1
Average errors of different point cloud simplification methods.
Simplification methodsPoints after segmentationPoints after simplifyingSimplification rateηAverage errorε (mm)3D voxel grid filter2060312097889.820.1941Curvature sampling2060312101389.800.2233Random sampling2060312060390.000.2317Uniform sampling2060312064389.980.2205Distance sampling2060312031190.140.2278Figure 8
Simplification effect of different sampling methods. (a) 3D voxel grid filter; (b) curvature sampling; (c) random sampling; (d) uniform sampling; (e) distance sampling.
(a)(b)(c)(d)(e)


### 3.3. Comparison of Different Reconstruction Algorithms

The above four reconstruction algorithms were used in the 3D reconstruction ofRosa roxburghii fruit for experimental comparison, and the effect of the fruit reconstruction model is shown in Figure 9. Based on the number of vertices (NMV), the number of facets (NMF), and the relative volume error (RVE) of the fruit reconstruction model, the reconstruction accuracies of the four reconstruction algorithm models were analyzed, which are shown in Table 2. The three evaluation indicators selected in this article are described in detail as follows.Figure 9
Effect ofRosa roxburghii fruit reconstruction with different reconstruction algorithms. (a) Poisson reconstruction; (b) screened Poisson reconstruction; (c) greedy projection; (d) Delaunay triangulation.
(a)(b)(c)(d)Table 2
Comparison of reconstruction models of different reconstruction algorithms.
Reconstruction algorithmNMVNMFVolume (cm3)RVE (%)Poisson493509869214.391.33Screened Poisson5178110115214.351.06Greedy projection223414171314.471.90Delaunay triangulation230594258414.441.69


#### 3.3.1. Number of Model Vertices (NMV)

For the triangular mesh reconstruction algorithm, the reconstructed mesh model is composed of a large number of triangular facets, and the number of vertices of the triangular facets represents the degree of fineness of the facets. The finer the patch, the higher the realism of the model.


#### 3.3.2. Number of Model Facets (NMF)

The larger the number of triangles is, the more obvious the details of the reconstructed model are, and the higher the accuracy of the model is.


#### 3.3.3. Relative Volume Error (RVE)

The actual volume of theRosa roxburghii fruit is 14.2 cm3 by calculating the volume of water discharged from the container, and the reconstructed model volume was calculated by Geomagic Studio. RVE is given by the following equation:(10)RVE=V2−V1V1×100%,where V1 represents the area of the actual volume and V2 represents the area of the reconstructed model volume.As can be seen from Table2, the NMV and NMF of the Poisson reconstruction and those of the screened Poisson reconstruction algorithm are very close, and the NMV and NMF of the greedy projection triangulation algorithm and those of the Delaunay triangulation algorithm are also similar. From the point of view of the number of model vertices and the number of faces, the reconstruction effects of Poisson reconstruction and screened Poisson reconstruction algorithm were better than other algorithms. From the perspective of the RVE of the model, the screened Poisson reconstruction algorithm has the smallest volume error (1.06%), which showed that its reconstruction accuracy is better than other algorithms. It can be seen from Figure 9 that not only does the reconstruction model reconstructed by the screened Poisson reconstruction algorithm have obvious fruit details but also the model is smooth and complete without redundant facets on the surface. So, the screened Poisson reconstruction algorithm has the best reconstruction effect. The surface details of the model reconstructed by the greedy projection reconstruction and triangulation reconstruction algorithms are not prominent. So, the reconstruction effect was relatively poor. Therefore, the screened Poisson reconstruction algorithm was considered to be the most suitable algorithm to reconstruct the 3D model of the Rosa roxburghii fruit.


### 3.4. Effects of Octree Depth Value on Reconstruction Results

In order to obtain a high-precision 3D model, the effect of the Octree depth value on the accuracy of the model reconstructed by the screened Poisson reconstruction algorithm was studied in this section. In the screened Poisson reconstruction algorithm, the function space needed to be discretized, the bounding box of the rectangular parallelepiped containing all the point clouds was subdivided through the Octree, and then the Poisson equation was solved. Generally, the greater the Octree depth value is, the richer the retained details are and the higher the accuracy of the surface reconstruction is. However, the reconstruction time is also affected by the Octree depth value. With the increase of the Octree depth value, the reconstruction time was longer and the efficiency showed a downward trend. In order to evaluate the accuracy of the 3D reconstruction algorithm ofRosa roxburghii fruit in this paper, the REV (equation (10)) was used to evaluate the effect of this reconstruction method. Table 3 shows the relationship between the Octree depth value and the reconstruction effect, reconstruction time, and volume relative error.Table 3
Relationship between the Octree depth value and the volume error.
Octree depthNMVNMFVolume (cm3)T (s)REV (%)6128912577814.5312.3275178110115214.3521.06811524523048214.4451.69933075066149214.45231.76101020029204005214.45961.76As is shown in Table3, as the Octree depth value increases, the NMV, NMF, and T all increase, and the REV first decreases and then increases. When the Octree depth value is 10, the NMV, NMF, and T all increase, but the REV at this time is still 1.76%. When the Octree depth value is 7, the REV of the reconstruction model is the smallest. Therefore, the Octree depth value of the screened Poisson reconstruction algorithm is selected as 7.


### 3.5. Verification of 3D Reconstruction

In order to verify the consistency between the reconstructed model and the actual fruit shape, the peripheral area, the length in thex-axis direction, and the length in the y-axis direction of the corresponding section were calculated step by step. Along the z-axis, the Rosa roxburghii fruit was sliced with a thickness of 2 mm. In this article, the internal structure of Rosa roxburghii fruit was ignored, and only the external shape was verified. The schematic diagram of calculating the peripheral sectional area, the length in the x-axis direction, and the length in the y-axis direction is shown in Figure 10. The sectional area Aj was integrated as follows [46]:(11)Aj=∑i=0nΔθiπrij2360,where Δθi is the stepping angle, rij is the radius of the stepping angle, and n is the number of stepping angles.Figure 10
Schematic diagram of calculation of sectional area.The slice peripheral sectional area and length of the reconstructed model were calculated in the 3D modeling software UG. The actual peripheral sectional area and length were manually measured using equation (11). The relative error of sectional area and length between actual measurement and 3D reconstruction model is shown in Figure 11. The mean absolute percentage error is calculated as MAPE=1/n∑0nxm−xr/xm (xm is measured values, xr is model values). The MAPE of the peripheral sectional area is 1.01%, the MAPE of the length in the x-axis direction is 1.30%, and the MAPE of the length in the y-axis direction is 1.06%. The results illustrated this model can better reconstruct the actual curved surface of Rosa roxburghii fruit, and the method provides a reference for the development of the related application.Figure 11
Relative error of sectional area and length.


## 3.1. Result of Point Cloud Segmentation

The original 3D point cloud of theRosa roxburghii obtained by the 3D laser scanner is shown in Figure 7(a), and the total number of point clouds contained 230674 points. The 3D point cloud after segmentation using the statistical outlier removal algorithm [24, 25] is shown in Figure 7(b), and the number of neighbor points k and the standard deviation multiple were set to 35 and 1.3, respectively. The 3D point cloud after segmentation using the radius outlier removal algorithm [26] is shown in Figure 7(c), and the threshold N of the number of neighbor points and the radius r of the sphere were taken as 60 and 0.8, respectively. The 3D point cloud after segmentation using the bilateral filtering algorithm [39] is shown in Figure 7(d). It can effectively remove the noise points, but it cannot effectively remove the thorns. The 3D point cloud after segmentation using the proposed separation algorithm is shown in Figure 7(e), and the number of point cloud data after segmentation retains 206031 points. It can be seen from Figure 7(e) that the thorns and noise points on the surface of Rosa roxburghii fruit were basically removed, indicating that the segmentation effect was particularly obvious. Figures 7(a)–7(e) show that the four segmentation algorithms can effectively remove noise, and the proposed segmentation algorithm can remove fruit thorns better than the other three segmentation algorithms.Figure 7
Original 3D point cloud and result of point cloud segmentation. (a) Original point cloud; (b) statistical outlier removal; (c) radius outlier removal; (d) bilateral filtering; (e) proposed algorithm.
(a)(b)(c)(d)(e)


## 3.2. Comparison of Different Simplification Methods

Owing to the high accuracy of the 3D laser scanner, the amount of point cloud data collected is greatly large, which not only contains the geometric information of theRosa roxburghii fruit but also has redundant data points that need to be eliminated [40]. Plenty of time is consumed, and a large amount of computer memory is occupied in the data processing process. Furthermore, all points need not be calculated at the stage of 3D reconstruction, as long as the feature points are retained. In order to balance the contradiction between time and efficiency, it is necessary to streamline the point cloud data for the grid reconstruction process [41]. The 3D voxel grid filter method [42, 43], the curvature sampling method [44], the random sampling method, the uniform sampling method, and the distance sampling method are common simplification methods.In the point cloud streamlining processing stage, the 3D voxel grid filter method, the curvature sampling method, the random sampling method, the uniform sampling method, and the distance sampling method were compared and analyzed, and the best sampling method was determined as the simplification algorithm. In order to assess the point cloud simplification effect of different sampling methods, the simplification rateη and average error ε were introduced to evaluate the simplification effect. The simplification rate η was defined as follows:(8)η=n1−n2n1×100%,where n1 represents the number of point clouds before simplification and n2 represents the number of point clouds before simplification.The average errorε is defined as follows [45]:(9)ε=1S∑u∈Sdu,v,where du,v represents the Euclidean distance between the sampling point u of the original surface S of the fruit and the projection point v of the simplified surface.Generally, when the simplification rate is constant, the greater the average error is, the greater the deviation between the surface and the sampled data is and vice versa. Table1 shows the simplification rate and average error of the point cloud reconstruction model with different sampling methods. The effect of different sampling methods on the point cloud is shown in Figure 8. It can be seen from Table 1 that when simplification rate η was approximately 90%, the average error of the 3D voxel grid filter method is the smallest in the five sampling methods, and the average error of the random sampling method is the largest. Moreover, it can be seen from Figure 8 that the random sampling method did not consider the detailed feature points to randomly sample and streamline, which resulted in uneven point cloud sampling. From the effect point of view, although the uniform sampling method and the distance sampling method were more uniform, the detail feature of the point cloud was not obvious. Although the curvature sampling method can retain feature points well, the standard deviation of the reconstructed model is higher than that of the 3D voxel grid filter method. Considering the average error of the reconstruction model and the advantages and disadvantages of the point cloud sampling methods, the 3D voxel grid filter can retain the features better and the error was small, so this method was selected to simplify the point cloud of the Rosa roxburghii fruit.Table 1
Average errors of different point cloud simplification methods.
Simplification methodsPoints after segmentationPoints after simplifyingSimplification rateηAverage errorε (mm)3D voxel grid filter2060312097889.820.1941Curvature sampling2060312101389.800.2233Random sampling2060312060390.000.2317Uniform sampling2060312064389.980.2205Distance sampling2060312031190.140.2278Figure 8
Simplification effect of different sampling methods. (a) 3D voxel grid filter; (b) curvature sampling; (c) random sampling; (d) uniform sampling; (e) distance sampling.
(a)(b)(c)(d)(e)


## 3.3. Comparison of Different Reconstruction Algorithms

The above four reconstruction algorithms were used in the 3D reconstruction ofRosa roxburghii fruit for experimental comparison, and the effect of the fruit reconstruction model is shown in Figure 9. Based on the number of vertices (NMV), the number of facets (NMF), and the relative volume error (RVE) of the fruit reconstruction model, the reconstruction accuracies of the four reconstruction algorithm models were analyzed, which are shown in Table 2. The three evaluation indicators selected in this article are described in detail as follows.Figure 9
Effect ofRosa roxburghii fruit reconstruction with different reconstruction algorithms. (a) Poisson reconstruction; (b) screened Poisson reconstruction; (c) greedy projection; (d) Delaunay triangulation.
(a)(b)(c)(d)Table 2
Comparison of reconstruction models of different reconstruction algorithms.
Reconstruction algorithmNMVNMFVolume (cm3)RVE (%)Poisson493509869214.391.33Screened Poisson5178110115214.351.06Greedy projection223414171314.471.90Delaunay triangulation230594258414.441.69


### 3.3.1. Number of Model Vertices (NMV)

For the triangular mesh reconstruction algorithm, the reconstructed mesh model is composed of a large number of triangular facets, and the number of vertices of the triangular facets represents the degree of fineness of the facets. The finer the patch, the higher the realism of the model.


### 3.3.2. Number of Model Facets (NMF)

The larger the number of triangles is, the more obvious the details of the reconstructed model are, and the higher the accuracy of the model is.


### 3.3.3. Relative Volume Error (RVE)

The actual volume of theRosa roxburghii fruit is 14.2 cm3 by calculating the volume of water discharged from the container, and the reconstructed model volume was calculated by Geomagic Studio. RVE is given by the following equation:(10)RVE=V2−V1V1×100%,where V1 represents the area of the actual volume and V2 represents the area of the reconstructed model volume.As can be seen from Table2, the NMV and NMF of the Poisson reconstruction and those of the screened Poisson reconstruction algorithm are very close, and the NMV and NMF of the greedy projection triangulation algorithm and those of the Delaunay triangulation algorithm are also similar. From the point of view of the number of model vertices and the number of faces, the reconstruction effects of Poisson reconstruction and screened Poisson reconstruction algorithm were better than other algorithms. From the perspective of the RVE of the model, the screened Poisson reconstruction algorithm has the smallest volume error (1.06%), which showed that its reconstruction accuracy is better than other algorithms. It can be seen from Figure 9 that not only does the reconstruction model reconstructed by the screened Poisson reconstruction algorithm have obvious fruit details but also the model is smooth and complete without redundant facets on the surface. So, the screened Poisson reconstruction algorithm has the best reconstruction effect. The surface details of the model reconstructed by the greedy projection reconstruction and triangulation reconstruction algorithms are not prominent. So, the reconstruction effect was relatively poor. Therefore, the screened Poisson reconstruction algorithm was considered to be the most suitable algorithm to reconstruct the 3D model of the Rosa roxburghii fruit.


## 3.3.1. Number of Model Vertices (NMV)

For the triangular mesh reconstruction algorithm, the reconstructed mesh model is composed of a large number of triangular facets, and the number of vertices of the triangular facets represents the degree of fineness of the facets. The finer the patch, the higher the realism of the model.


## 3.3.2. Number of Model Facets (NMF)

The larger the number of triangles is, the more obvious the details of the reconstructed model are, and the higher the accuracy of the model is.


## 3.3.3. Relative Volume Error (RVE)

The actual volume of theRosa roxburghii fruit is 14.2 cm3 by calculating the volume of water discharged from the container, and the reconstructed model volume was calculated by Geomagic Studio. RVE is given by the following equation:(10)RVE=V2−V1V1×100%,where V1 represents the area of the actual volume and V2 represents the area of the reconstructed model volume.As can be seen from Table2, the NMV and NMF of the Poisson reconstruction and those of the screened Poisson reconstruction algorithm are very close, and the NMV and NMF of the greedy projection triangulation algorithm and those of the Delaunay triangulation algorithm are also similar. From the point of view of the number of model vertices and the number of faces, the reconstruction effects of Poisson reconstruction and screened Poisson reconstruction algorithm were better than other algorithms. From the perspective of the RVE of the model, the screened Poisson reconstruction algorithm has the smallest volume error (1.06%), which showed that its reconstruction accuracy is better than other algorithms. It can be seen from Figure 9 that not only does the reconstruction model reconstructed by the screened Poisson reconstruction algorithm have obvious fruit details but also the model is smooth and complete without redundant facets on the surface. So, the screened Poisson reconstruction algorithm has the best reconstruction effect. The surface details of the model reconstructed by the greedy projection reconstruction and triangulation reconstruction algorithms are not prominent. So, the reconstruction effect was relatively poor. Therefore, the screened Poisson reconstruction algorithm was considered to be the most suitable algorithm to reconstruct the 3D model of the Rosa roxburghii fruit.


## 3.4. Effects of Octree Depth Value on Reconstruction Results

In order to obtain a high-precision 3D model, the effect of the Octree depth value on the accuracy of the model reconstructed by the screened Poisson reconstruction algorithm was studied in this section. In the screened Poisson reconstruction algorithm, the function space needed to be discretized, the bounding box of the rectangular parallelepiped containing all the point clouds was subdivided through the Octree, and then the Poisson equation was solved. Generally, the greater the Octree depth value is, the richer the retained details are and the higher the accuracy of the surface reconstruction is. However, the reconstruction time is also affected by the Octree depth value. With the increase of the Octree depth value, the reconstruction time was longer and the efficiency showed a downward trend. In order to evaluate the accuracy of the 3D reconstruction algorithm ofRosa roxburghii fruit in this paper, the REV (equation (10)) was used to evaluate the effect of this reconstruction method. Table 3 shows the relationship between the Octree depth value and the reconstruction effect, reconstruction time, and volume relative error.Table 3
Relationship between the Octree depth value and the volume error.
Octree depthNMVNMFVolume (cm3)T (s)REV (%)6128912577814.5312.3275178110115214.3521.06811524523048214.4451.69933075066149214.45231.76101020029204005214.45961.76As is shown in Table3, as the Octree depth value increases, the NMV, NMF, and T all increase, and the REV first decreases and then increases. When the Octree depth value is 10, the NMV, NMF, and T all increase, but the REV at this time is still 1.76%. When the Octree depth value is 7, the REV of the reconstruction model is the smallest. Therefore, the Octree depth value of the screened Poisson reconstruction algorithm is selected as 7.


## 3.5. Verification of 3D Reconstruction

In order to verify the consistency between the reconstructed model and the actual fruit shape, the peripheral area, the length in thex-axis direction, and the length in the y-axis direction of the corresponding section were calculated step by step. Along the z-axis, the Rosa roxburghii fruit was sliced with a thickness of 2 mm. In this article, the internal structure of Rosa roxburghii fruit was ignored, and only the external shape was verified. The schematic diagram of calculating the peripheral sectional area, the length in the x-axis direction, and the length in the y-axis direction is shown in Figure 10. The sectional area Aj was integrated as follows [46]:(11)Aj=∑i=0nΔθiπrij2360,where Δθi is the stepping angle, rij is the radius of the stepping angle, and n is the number of stepping angles.Figure 10
Schematic diagram of calculation of sectional area.The slice peripheral sectional area and length of the reconstructed model were calculated in the 3D modeling software UG. The actual peripheral sectional area and length were manually measured using equation (11). The relative error of sectional area and length between actual measurement and 3D reconstruction model is shown in Figure 11. The mean absolute percentage error is calculated as MAPE=1/n∑0nxm−xr/xm (xm is measured values, xr is model values). The MAPE of the peripheral sectional area is 1.01%, the MAPE of the length in the x-axis direction is 1.30%, and the MAPE of the length in the y-axis direction is 1.06%. The results illustrated this model can better reconstruct the actual curved surface of Rosa roxburghii fruit, and the method provides a reference for the development of the related application.Figure 11
Relative error of sectional area and length.


## 4. Conclusions

In this paper, a 3D laser scanner was used to acquire point cloud data on the surface of aRosa roxburghii fruit. The segmentation algorithm and the simplification algorithm were implemented to obtain the point cloud data which is conducive to model reconstruction. The Poisson reconstruction algorithm, the screened Poisson reconstruction algorithm, the greedy projection triangulation algorithm, and the Delaunay triangulation algorithm were used to reconstruct the fruit model. In order to verify the accuracy of the reconstruction model, the volume of the reconstructed model obtained using the point cloud was compared with the volume measured manually. The main findings can be summarized as follows:(1)
A segmentation algorithm combining statistical outlier removal and radius outlier removal is proposed, and the fruit thorns on theRosa roxburghii fruit model can be effectively removed by the segmentation algorithm.(2)
Compared with the curvature sampling method, random sampling method, uniform sampling method, and distance sampling method, the average error of the reconstruction model using the 3D voxel grid filter method is the smallest, and the detailed features are obviously retained.(3)
Compared with the greedy projection triangulation algorithm, Delaunay triangulation algorithm, and Poisson reconstruction algorithm, the reconstruction model using the screened Poisson reconstruction algorithm has the most vertices and facets, and no holes are generated. When the Octree depth value is set to 7, the REV of the reconstruction model is the smallest.(4)
The MAPE of the peripheral sectional area is 1.01%, which shows that this model can better reconstruct the actual curved surface of theRosa roxburghii fruit.



---

*Source: 9990499-2021-09-29.xml*