# An Advanced Vehicle Body Part Inspection Scheme Based on Scattered Point Cloud Data
## 3 Materials and Methods
### Methods
#### 3.2.2 Denoising of PCD Based on a Hybrid Filtering Algorithm
** Input the non-feature area point cloud and the minimum and maximum values for \(x,y\) and \(z\) in each direction. **Step (2). ** For the data in **Step (1)**, obtain the bounding box edge length and split the bounding box at a simplified scale. **Step (3). ** Reserved the center point of each bounding box and output it. **Step 6. ** Point cloud feature area simplification. For feature areas, the curvature sampling principle is used to calculate the average curvature \(MC_{i}\) of the points. as shown in the Equation (20). \[\left|MC_{i}-\overline{MC}\right|>\varepsilon, \tag{20}\]

where a set of point cloud data is retained by value \(\varepsilon\). **Step 7. ** Calculating complete. Output simplified point cloud. The Algorithm 2 is pseudocode of the proposed simplification algorithm. ```
Begin  Input \(P_{i}(p_{1},p_{2},\ldots,p_{n})\); Define parameter \(k\), C, \(m\), \(\varepsilon\), \(T\); For\(i=1\) to \(n\)  Calculated the normal vector \(l_{i}\) by PCA as Equations (7) and (8);  Correction point cloud normal vector as Equation (9);  Build the new point cloud \(p_{i}(x_{i},y_{i},z_{i},i,j,k)\) ; For\(i=1\) to \(n\)  Calculated the Mean curvature \(MC_{i}\) and point density \(\rho_{i}\) as Equations (10)-(12), respectively;  Build the new point cloud \(p_{i}(x_{i},y_{i},z_{i},i,j,k,MC_{i},\rho_{i})\) ; End  Segment the point cloud data \(p_{i}(x_{i},y_{i},z_{i},i,j,k,MC_{i},\rho_{i})\) by FCM as Equations (13) to (19);  Simplify point cloud data as bounding box algorithm and Equation (20);  Output the simplified point cloud data. End End
```

**Algorithm 2** Pseudocode of Simplification Algorithm

This set of point cloud experimental data is derived from the actual measurements of vehicle body parts. The total number of vehicle body parts contained in this file is 227,970 in tkt format. The experiment provided a 90% point cloud simplification rate, which means that only 10% of the original point cloud data were retained. The simplified results are shown in Figure 6.

Figure 6 illustrates the calculation results of the vehicle body part point cloud under different simplified algorithms. In Figure 6, from (b) to (f), the number of remaining data after the point cloud was simplified were 22797. In Figure 6, a is the original point cloud data for the vehicle part, b is the simplified result of random sampling [43], c is the simplified result of curvature sampling [44], d is the simplified result of grid sampling [45], e is the simplified result of octree-based sampling [46] and f is the simplified result of our sampling algorithm. As can be seen from Figure 6, the points clouds simplified by random sampling (Figure 6b) and the curvature method (Figure 6c) are not evenly distributed, while the grid sampling (Figure 6d) and octree-based sampling (Figure 6e) results are too evenly distributed and cannot accurately reflect the feature area. Compared to the above algorithm, our algorithm (Figure 6f) can fully reflect the feature areas and non-feature regions. To further improve the effectiveness of the FCM algorithm in simplifying point clouds, we again adopt the application of curvature information and curvature information entropy commonly used by other scholars [46] to study the computational effects of different simplified algorithms. Curvature information entropy is used to quantitatively express the features of point clouds and its entropy function \(En_{i}\) is calculated by Formulas (21) and (22) [47]. \[ \begin{split} En_{i}=-\frac{MC_{i}}{MC_{i}+\sum_{j=1}^{k}MC_{j}} \log_{2}\frac{MC_{j}}{MC_{i}+\sum_{j=1}^{k}MC_{j}}\\ -\sum\limits_{j=1}^{k}\frac{MC_{j}}{MC_{i}+\sum_{j=1}^{k}MC_{j}} \log_{2}\frac{MC_{j}}{MC_{i}+\sum_{j=1}^{k}MC_{j}}\end{split}