A 3D point cloud reduction method for 3D printing

Through the methods of global sharpness and octree division, the geometric feature loss and hollowing problems in the existing algorithm are solved, and efficient point cloud streamlining effect is achieved.

CN115648631BActive Publication Date: 2025-07-08BEIJING BEIKE ADDITIVE MFG TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211414064.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-11
Publication Date
2025-07-08
Estimated Expiration
2042-11-11

AI Technical Summary

Technical Problem

The existing 3D point cloud streamlining algorithm cannot take into account the significance of geometric features and overall uniformity, resulting in the loss of geometric features in the edge area of the model after streamlined data encapsulation or the hollowing of the flat area.

Method used

The global sharpness function is used to divide the point cloud model into steep change zones and dilute zones. The octree algorithm is used to divide the dilute zones into subspace, and the quadratic classification is performed through the feature evaluation function of sharpness and uniformity tradeoffs. The point clouds in the dilute zone are streamlined in combination with subspace hierarchical sampling and far-near-point cyclic sampling.

Benefits of technology

The geometric distinctive features of the point cloud are effectively retained, the encapsulation void of the point cloud is reduced, the maximum distance error and average distance error are reduced, and the time complexity of the algorithm is controlled.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115648631B_ABST
    Figure CN115648631B_ABST
Patent Text Reader

Abstract

The present invention proposes a 3D point cloud reduction method for 3D printing, belonging to the technical field of 3D printing. It solves the problem that the existing point cloud reduction algorithms focus on the feature retention of the geometric significant regions of 3D models, resulting in holes in the flat regions after data encapsulation. By establishing a feature evaluation function that compromises sharpness and uniformity in the point cloud slow-varying region, secondary classification of the slow-varying region is achieved according to the feature threshold. When reducing the points with high feature values in the slow-varying region, a subspace hierarchical sampling algorithm based on octree partitioning is proposed, which can effectively control the reduction rate while improving the reduction speed. When reducing the points with low feature values in the slow-varying region, a near-far point cyclic sampling algorithm is proposed to ensure the uniformity of points under high data sampling rates. Experiments verify the effectiveness of the proposed algorithm: the holes in the 3D point cloud reduced by this algorithm are significantly fewer after encapsulation; in the quantitative evaluation results, both the maximum distance error and the average distance error of the point cloud reduced by this algorithm are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of 3D printing, and particularly relates to a 3D point cloud reduction method for 3D printing. Background Art

[0002] In recent years, 3D point clouds have been widely used in fields such as autonomous driving, virtual reality, 3D printing, etc., and have become a relatively popular data representation form at present. With the rapid development of 3D reconstruction technology, the accuracy and density of 3D point clouds have been continuously improved. However, the dense 3D point clouds increase the burden of subsequent data storage, processing, and visualization. In order to speed up the data processing speed, it is of great significance to study effective point cloud reduction algorithms for different application requirements.

[0003] The acquisition of dense 3D point clouds can effectively improve the accuracy of 3D printing, but the sharp increase in data volume will also affect the printing efficiency. In order to balance printing accuracy and speed, it is crucial to design a reasonable data reduction algorithm. Existing 3D point cloud reduction algorithms can be divided into uniform reduction and non-uniform reduction according to the distribution of the reduced 3D point clouds. The uniform reduction algorithm realizes data downsampling by establishing a grid, a tree structure, etc. to control the distance between points. Specifically, Shao Zhengwei et al. proposed a uniform reduction method based on octree encoding, which realizes the reduction of point clouds from an overall perspective of space. Nie Lekui et al. proposed an algorithm that takes the point closest to the mean point in the target node layer as the reduction result to improve the reduction efficiency of a large number of scattered point clouds. Li Renzhong et al. proposed an algorithm that uniformly reduces point clouds in combination with a bounding box, which realizes uniform reduction without destroying the global feature information of the point clouds. These uniform reduction algorithms can achieve the purpose of quickly reducing point clouds, but they will cause the loss of local geometric features of the reduced point clouds, which limits their application in 3D printing tasks.

[0004] Non-uniform reduction generally first evaluates the geometric features of the point cloud model and retains the points with significant features according to the evaluation results. For example, Gao et al. proposed an algorithm for reducing the point cloud of T-shaped steel plates by using the surface curvature feature threshold. This algorithm effectively improves the speed of data downsampling by using the octree encoding method. Zhang et al. proposed a reduction algorithm that measures the surface features of the point cloud by simplified entropy, and designs reduction rules according to geometric features to achieve adaptive adjustment of the reduction rate. Ji et al. proposed an algorithm for establishing a multi-angle feature evaluation function, which effectively identifies and retains "important points" during the reduction process. Li et al. proposed a method for generating a compact building model from a dense triangular mesh to maintain a piecewise smooth structure and clear contour features. Cheng et al. proposed an algorithm for evaluating the reduction of points in the point cloud by using local conditional information, which realizes the retention of the feature information of the reduced point cloud. These algorithms focus on retaining the significantly geometric feature regions of the point cloud model. When the reduced data is used for 3D printing, non-uniform data reduction will cause a large number of voids to appear after the flat areas are encapsulated at a high sampling rate. Summary of the Invention

[0005] Aiming at the problem that the general 3D point cloud reduction algorithm cannot balance the geometric feature significance and overall uniformity, resulting in the loss of geometric features in the edge area of the model or the appearance of voids in the flat area after the reduced data is encapsulated, the present invention provides a 3D point cloud reduction method for 3D printing. This algorithm uses a global sharpness function to extract the steep change area and realizes the retention of the significant geometric features of the point cloud; a feature evaluation function that compromises sharpness and uniformity is established in the slow change area to avoid data voids while retaining local features; a reasonable and efficient data downsampling algorithm is established for the distribution of point cloud feature values in the slow change area.

[0006] To solve the above technical problems, the technical solution adopted by the present invention is: a 3D point cloud reduction method for 3D printing, which is carried out according to the following steps:

[0007] Step 1) Calculate the point cloud curvature according to the global sharpness and set a threshold T1 to macroscopically divide the original 3D point cloud model into a steep change area and a slow change area;

[0008] Step 2) Use the octree algorithm to divide the point cloud in the slow change area into subspaces, and then set a threshold T2 according to the local sharp sparsity S(p) of the point cloud in the slow change area. Divide the points with S(p) value greater than T2 into the slow change area A, and the points less than or equal to T2 into the slow change area B to complete the secondary classification of the slow change area. The calculation formula of the feature evaluation function that compromises sharpness and uniformity is as follows:

[0009]

[0010] Among them, S(p) is called the local sharp sparsity of the point cloud in the slow change area, and the parameters α and β are fixed values. is the sharpness of the fitted surface for point p and its k neighborhood points, d e (p) is the sparsity of point p, and d e (p) are calculated as follows:

[0011]

[0012] where p i (i = 1, 2... k) are the k neighborhood points of the current point p, c(p) and c(p i ) represent the curvatures at point p and p i ;

[0013]

[0014] where, ||p - p i || is the Euclidean distance between point p and its neighborhood point p i ;

[0015] Step 3) Downsample the point cloud in the slow - varying region A by subspace hierarchical sampling, and the specific method is as follows:

[0016] Let the maximum recursive depth of the octree encoding in the slow - varying region be L, then the side length of the deepest layer, i.e., the L - layer subspace, of the octree division is:

[0017]

[0018] where, x(p) max is the maximum value of the x - coordinate of the point cloud, x(p) min is the minimum value of the x - coordinate of the point cloud;

[0019] The number Q(p) of the deepest - layer subspace corresponding to point p in the point cloud is calculated by the following formula:

[0020]

[0021] where y(p) min , z(p) min are the minimum values of the y - and z - coordinates of the point cloud, x(p), y(p), z(p) are the three - dimensional coordinates of point p, represents the floor operation;

[0022] If Q(p) contains U different values, it means that there are U subspaces in the L - layer of the octree. The average sharp - sparsity of the u - th (u ∈ {1, 2, 3,..., U}) subspace is denoted by ;

[0023] The number of levels of hierarchical random downsampling is N (N < 6), and the downsampling rate of each level is determined by the following relationship:

[0024]

[0025] Among them, n is the level number of the nth level of the gradual change area A, represents the maximum value of, represents the minimum value of, η1 < η2 < … < η n <... < η N , the values of η1 to η N are set according to the final thinning target of the point cloud;

[0026] Step 4) Thinning is performed on the point cloud in the gradual change area B by means of near and far point cyclic sampling. The specific method is as follows:

[0027] First, input the gradual change area B. Let M be the point set after thinning the gradual change area, v be the number of cycles of the subspace, M u is the point set of the subspace u. Let u = 1, v = 1; secondly, calculate the centroid point of the subspace u Find the point closest to the centroid Judge the number of points in the subspace u Is it less than or equal to k′? If not, search for the k′ neighborhood of the nearest point and find the farthest neighborhood point Put into M and delete the remaining neighborhood points of, and update M u , At this time, let v = v + 1 and continue the above operations in the subspace until If only put the nearest point to the centroid into M; then let u = u + 1, traverse U subspaces until u > U; finally, output the point set M of the thinned gradual change area B;

[0028] Step 5) Combine the points in the steep change area with the points in the thinned gradual change areas A and B to obtain the final thinned 3D point cloud.

[0029] Furthermore, the value of T2 is calculated according to the following formula:

[0030]

[0031] Among them, S(p) max is the maximum value of S(p), S(p) min is the minimum value of S(p), μ is a constant, and μ ∈ [0.5, 1).

[0032] The advantages and positive effects of the present invention are as follows: The algorithm of the present invention establishes a feature evaluation function that compromises sharpness and uniformity in the slow-varying region of the point cloud, and realizes the secondary classification of the slow-varying region according to the feature threshold. When thinning the points with high feature values in the slow-varying region, a subspace hierarchical sampling algorithm based on octree partitioning is proposed, which can effectively control the thinning rate while improving the thinning speed. When thinning the points with low feature values in the slow-varying region, a near-far point cyclic sampling algorithm is proposed to ensure the uniformity of points under high data sampling rates. Experiments verify the effectiveness of the algorithm proposed in the present invention: In terms of visual effects, the number of holes in the 3D point cloud thinned by the algorithm of the present invention is significantly reduced after encapsulation; in the quantitative evaluation results, both the maximum distance error and the average distance error of the point cloud after thinning by the algorithm of the present invention are reduced. Description of the Drawings

[0033] Figure 1 It is a data processing flow chart of the algorithm of the present invention.

[0034] Figure 2 It is the verification of the rationality of sharpness.

[0035] Figure 3 It is a flow chart of subspace hierarchical sampling.

[0036] Figure 4 It is a flow chart of near-far point cyclic sampling in the subspace (k′ = 5, u = 1).

[0037] Figure 5 It is a data thinning flow chart of slow-varying region B.

[0038] Figure 6 It is the simplification result of the "bunny" point cloud: (a1)-(a2) Original point cloud distribution and encapsulation effect; (b1)-(b3) Distribution, encapsulation effect and deviation distribution of the point cloud after thinning by DFPSA; (c1)-(c3) Distribution, encapsulation effect and deviation distribution of the point cloud after thinning by USSPC; (d1)-(d3) Distribution, encapsulation effect and deviation distribution of the point cloud after thinning by IENVA; (e1)-(e3) Distribution, encapsulation effect and deviation distribution of the point cloud after thinning by OCTCF; (f1)-(f3) Distribution, encapsulation effect and deviation distribution of the point cloud after thinning by the algorithm of the present invention.

[0039] Figure 7Simplification results of the "elephant" point cloud: (a1)-(a2) Original point cloud distribution and encapsulation effect; (b1)-(b3) Distribution, encapsulation effect and deviation distribution of the point cloud after DFPSA simplification; (c1)-(c3) Distribution, encapsulation effect and deviation distribution of the point cloud after USSPC algorithm simplification; (d1)-(d3) Distribution, encapsulation effect and deviation distribution of the point cloud after IENVA simplification; (e1)-(e3) Distribution, encapsulation effect and deviation distribution of the point cloud after OCTCF simplification; (f1)-(f3) Distribution, encapsulation effect and deviation distribution of the point cloud after the algorithm of the present invention is simplified.

[0040] Figure 8 Geometric errors of "gargoyle" at different simplification rates: (a) Maximum distance error; (b) Average distance error.

[0041] Figure 9 Comparison of average geometric errors of each model under different simplification algorithms: (a) Distribution of average values of maximum distance errors; (b) Distribution of average values of average distance errors. Specific implementation manners

[0042] To make the objectives, features and advantages of the present invention more obvious and understandable, the specific implementation manners of the present invention will be described in detail below.

[0043] The data processing flow of the algorithm of the present invention is as Figure 1 shown. This algorithm divides the point cloud simplification process into point classification and point simplification. When classifying points, first, the point cloud model is divided into a steep change area and a gentle change area according to the global sharpness, and then the octree algorithm is used to divide the point cloud in the gentle change area, and an evaluation function that compromises sharpness and uniformity is established to divide the gentle change area into gentle change area A and gentle change area B; when performing point simplification, all points in the steep change area are retained, and the points in gentle change area A and gentle change area B are simplified by subspace hierarchical sampling and near-far point cyclic sampling methods respectively. Finally, the points in the steep change area and the points in gentle change area A and gentle change area B after simplification are combined to obtain the final simplified 3D point cloud.

[0044] Establishment of the evaluation function that compromises sharpness and uniformity and secondary classification of point cloud

[0045] Calculate the point cloud curvature and set a threshold T1 to macroscopically distinguish the steep change area and the gentle change area of the point cloud. For the local gentle change area, the distribution of curvature values of the internal points is less different, and the position where the local curvature value distribution jumps in the gentle change area can be regarded as the geometric sharp point of this area. Taking the p point in the gentle change area as an example, define its local area as the surface fitted by the p point and its k neighborhood points. The sharpness of this area can be calculated by the following formula:

[0046]

[0047] Among them, p i (i = 1, 2, …, k) are the k-neighborhood points of the current point p, and c(p) and c(p i ) represent the curvatures at point p and p i . The larger it is, the higher the geometric significance of the current local area, and the more important the current point is.

[0048] The rationality of formula (1) can be verified by Figure 2 . Taking k = 2 as an example, when the distributions of point p, point q and their k-neighborhood points are as Figure 2 shown, where the radius of the circle where the fitting surface of point p and its two neighborhood points p1, p2 is r1, and the radius of the circle where the fitting surface of point q and its two neighborhood points q1, q2 is also r1. Therefore, the curvatures of point p and point q are . The curvatures of point p and point q are the same, but in terms of visual effect, the sharpness of point p is greater than that of point q. The curvatures of points p1, p2, q2 are all . The curvature of point q1 is . Substituting the curvature values of point p, point q and their neighborhood points into formula (1), we get . Since r2 > r1 > r3, so it shows that based on formula (1), it can be judged that the sharpness of point p is greater than that of point q.

[0049] When maintaining the uniformity of the point cloud distribution in the smooth change area, it is necessary to retain the points in the sparse area as much as possible to avoid data holes. The sparsity of point p can be judged by the following formula (2):

[0050]

[0051] Among them, ||p - p i || is the Euclidean distance between point p and its neighborhood point p i . The smaller d e (p) is, the sparser the current local area is, and the more important the current point is.

[0052] In order to balance the sharpness and uniformity of the point cloud, it is necessary to make a compromise between formula (1) and formula (2). The present invention realizes the compromise between sharpness and uniformity by establishing the following non-linear relationship:

[0053]

[0054] Among them, S(p) is called the local sharpness sparsity of the point cloud in the smooth change area. The parameters α and β are fixed values, and their function is to compress the geometric significance feature and the overall uniformity feature to the same scale. According to experience, the present invention sets α = 1.5 and β = 2.0.

[0055] Set a threshold T2 for the local sharp sparsity S(p) of the points in the slow-varying region, divide the points with S(p) values greater than T2 into the slow-varying region A, and divide the points with S(p) values less than or equal to T2 into the slow-varying region B to complete the secondary classification of the slow-varying region. The value of T2 can be calculated according to the following formula:

[0056]

[0057] where S(p) max is the maximum value of S(p), S(p) min is the minimum value of S(p), and μ is a constant, μ ∈ [0.5, 1). To speed up the data processing speed, the octree algorithm is used to divide the slow-varying region into subspaces before the secondary classification of the slow-varying region.

[0058] Downsampling algorithm for the data in the slow-varying region A

[0059] After the points in the slow-varying region are classified twice, the points with large local sharp sparsity S(p) values are more important for expressing the point cloud features. A hierarchical sampling method is used to streamline them, and the feature retention of the points is achieved by setting different levels of streamlining rates. The points with small local sharp sparsity S(p) values have a high redundancy, and a near-far point cyclic sampling method is proposed for streamlining to ensure data uniformity under the premise of a high sampling rate.

[0060] Subspace hierarchical sampling

[0061] Since the octree is used to divide the slow-varying region into subspaces before the secondary classification of the slow-varying region, the streamlining of the slow-varying region A is based on the subspaces after division and uses a hierarchical sampling method. Let the maximum recursive depth of the octree encoding of the slow-varying region be L, then the side length of the deepest layer (layer L) subspace divided by the octree is:

[0062]

[0063] where x(p) max is the maximum value of the x coordinate of the point cloud, and x(p) min is the minimum value of the x coordinate of the point cloud.

[0064] The number Q(p) of the deepest layer subspace corresponding to the p point in the point cloud is calculated by the following formula:

[0065]

[0066] where y(p) min and z(p) min are the minimum values of the y and z coordinates of the point cloud, and x(p), y(p), and z(p) are the three-dimensional coordinates of the p point. Denotes the floor operation. There are U different values in Q(p), indicating that there are U subspaces on the L-th layer of the octree. The average sharp sparsity of the u-th (u ∈ {1, 2, 3, …, U}) subspace is represented by Let the number of levels of hierarchical random reduction be N (N < 6). The reduction rate of each level is determined by the following relational expression:

[0067]

[0068] where n is the number of levels of the n-th level in the slow-varying region A, represents the maximum value of, represents the minimum value of, η1 < η2 < … < η n < … < η N , η1 to η N The magnitudes of the values are set according to the final reduction target of the point cloud.

[0069] The process of hierarchical sampling for the subspaces in the slow-varying region A is as shown in Figure 3 . This algorithm uses the deepest-layer subspaces divided by the octree as data processing units. By judging the average sharp sparsity of each subspace, different reduction rates are set, effectively controlling the reduction rate while improving the sampling speed. Among them,

[0070] L = 3, M = 40,

[0071] The process of the near-far point cyclic sampling algorithm

[0072] The slow-varying region B corresponds to the flat region of the point cloud model, with a large amount of data redundancy. It is necessary to complete the reduction of points at a high sampling rate. In this section, a near-far point cyclic sampling method is designed to reduce the data in the slow-varying region B. To ensure the uniformity of the point cloud distribution after sampling, taking the deepest-layer subspaces as units, one point is retained for the subspaces containing relatively "sparse" point clouds, and this point is the closest to the centroid of all the point clouds in the subspace; for the subspaces containing relatively "dense" point clouds, multiple points are retained, and the retention of multiple points follows the near-far point cyclic sampling principle. The specific process is as shown in Figure 4 . Taking the subspace number u = 1 as an example, let the number of subspace cycles be v, and the number of points in subspace u be The centroid of subspace u is First, calculate the centroid of subspace numbered 1 Search for the closest point to Secondly, search for k′ (k′ = 5) neighborhood points of Search for the neighborhood point that is the farthest from in this neighborhood Reserve Point and points, delete the remaining neighborhood points Then repeat the above steps among the remaining points in this subspace until the number of remaining points in the subspace is less than k′. At this time, only reserve the point closest to the centroid That's it.

[0073] For the determination of "sparse" and "dense" of the deepest subspace, it is achieved by setting the value of k′. When the subspace contains a point cloud number less than or equal to k′, the point cloud in this space is considered "sparse", otherwise the point cloud in this space is considered "dense". Given that the subspace number u ∈ {1, 2, 3, …, U}, the subspace loop count is v, and the number of points in subspace u is The centroid of subspace u is Let the set of points in subspace u be Distance The closest point to The k′ neighborhood points of the point are Is The farthest nearest neighbor point of, after reduction, the set of points in the gradual change area B is M, and the overall data reduction process of the gradual change area B is as Figure 5 shown. First, input the gradual change area B after octree division, and let u = 1, v = 1; secondly, calculate the centroid point of subspace u Find the point closest to the centroid Judge the number of points in this subspace u Whether it is less than or equal to k′. If not, then search for the k′ neighborhood of the nearest point to find The farthest neighborhood point Put into M, delete the remaining neighborhood points of and update M u , At this time, let v = v + 1, and continue the above operations in the subspace until If Only put the nearest point of the centroid into M; then let u = u + 1, traverse U subspaces until u > U; finally, output the point set M of the reduced gradual change area B.

[0074] The key steps of the algorithm of the present invention are analyzed in detail above. Next, in order to verify the robustness and effectiveness of the proposed method, a series of experiments are carried out from two aspects: the visual effect of the algorithm and the quantitative evaluation of the algorithm performance. The experiments are carried out on a computer equipped with a 3.2GHz AMD R7-5800H processor and 16GB RAM with Windows 10 as its operating system. The proposed method is implemented in Matlab2016 (64-bit), and Geomagic Studio 2012 (64-bit) is used to analyze the encapsulation effect and deviation distribution of the point cloud model. The specific experimental results and data analysis are as follows in detail.

[0075] Comparison of Visual Effects of Different Simplification Algorithms

[0076] To qualitatively evaluate the performance of the 3D point cloud simplification algorithm proposed in the present invention and verify the visual effect of the simplification algorithm, the detail feature points simplified algorithm (DFPSA), the uniform simplification for scattered point cloud (USSPC), the information entropy of normal vector angle (IENVA), the octree coding and the threshold of the surface curvature feature (OCTCF) and the algorithm proposed in the present invention are compared. The "bunny" point cloud is used as the test object, and the original point cloud distribution and its encapsulation effect are as Figure 6 (a1) and 6(a2) show. With the simplification rate controlled at 80%, the simplified point cloud distributions obtained by different algorithms are as Figure 6 (b1)-6(f1) show, the encapsulation effects are as Figure 6 (b2)-6(f2) show, and the deviation distributions are as Figure 6 (b3)-6(f3) show. By comparing Figure 6 (a1)-(f1), it is found that all five algorithms can effectively simplify the point cloud. Among them, USSPC focuses on describing the overall uniformity of the point cloud model, while the other algorithms focus on retaining the edge features and local detail features of the point cloud. By comparing Figure 6 (b2)-6(f2) and 6(b3)-6(f3), from the overall encapsulation effect of the simplified point cloud, Figure 6 (b2), Figure 6 (c2), Figure 6The encapsulation effect at the "bunny" ears or tail (dashed box) of (e2) has varying degrees of deformation. Relatively speaking, Figure 6 (d2), Figure 6 (f2) has a better overall encapsulation effect; looking at the locally enlarged area of the encapsulation diagram Figure 6 there are holes at the "bunny" ears in (d2), while Figure 6 in (f2), it can be seen from both the overall and locally enlarged areas that there are no encapsulation holes or deformations in the encapsulated point cloud model, and the geometric features of the point cloud are better preserved; looking at the deviation distribution of the thinned point cloud, Figure 6 (b3)-6(f3) all have varying degrees of deviation, but from Figure 6 the overall and enlarged views of (b3)-6(f3), it can be seen that Figure 6 (f3) has the smallest deviation. The experiment verifies that the algorithm proposed in the present invention takes into account both geometric saliency features and overall uniformity, and significantly reduces the holes in the thinned point cloud after encapsulation while retaining the detailed feature information of the point cloud.

[0077] To ensure the universality of the thinning effect of the algorithm of the present invention, another "elephant" point cloud with more features is taken as the test object, and the original point cloud distribution and its encapsulation effect are as Figure 7 (a1), 7(a2) shown. Controlling the thinning rate to be 50%, the thinned point cloud distributions obtained by different algorithms are as Figure 7 (b1)-7(f1) shown, the encapsulation effects are as Figure 7 (b2)-7(f2) shown, and the deviation distributions are as Figure 7 (b3)-7(f3) shown. Comparing Figure 7 (b2)-7(f2), 7(b3)-7(f3), it can be seen from the overall encapsulation effect of the point cloud model that Figure 7 there are holes or deformations in the hind feet of "elephant" in (b2)-7(f2), and there are also holes or deformations in the nose, ears and back (dashed box) of "elephant" in (b2), (c2), corresponding to larger deviations in this area in (b3), (c3); it can be seen from the locally enlarged area (solid box) of the encapsulation diagram that there are obvious holes in the nose of "elephant" in (d2), (e2), corresponding to larger deviations in the enlarged area in (d3), (e3), while the information at the nose of "elephant" in (f2) is relatively completely retained, corresponding to the smallest deviation in this area in (f3). This further shows that the thinning algorithm proposed in the present invention can not only achieve a better encapsulation effect, but also achieve a better thinning effect for different point clouds.

[0078] Quantitative evaluation of the performance of different thinning algorithms

[0079] In order to objectively evaluate the performance of each simplification algorithm, the maximum distance error and the average distance error are used to analyze the geometric error of the simplified point cloud. The maximum distance error refers to the maximum distance from the points in the original point cloud to the fitting plane of the simplified point cloud, and the average distance error refers to the average distance from the points in the original point cloud to the fitting plane of the simplified point cloud.

[0080] The expression for the maximum distance error is:

[0081]

[0082] where P is the original point cloud, P′ is the simplified point cloud, and d(p, P′) is the Euclidean distance from a point p in P to the nearest triangular facet on P′ after meshing P′.

[0083] The expression for the average distance error is:

[0084]

[0085] where D is the number of points in the original point cloud.

[0086] Table 1 Maximum distance error of five simplification algorithms with a simplification rate of 50%

[0087]

[0088] Table 2 Average distance error of five simplification algorithms with a simplification rate of 50%

[0089]

[0090] Under the condition that the simplification rates (50%) are approximately equal, the maximum distance error and the average distance error of different point cloud models under each simplification algorithm are shown in Table 1 and Table 2. The bold fonts in the table represent the minimum values of the maximum distance error and the average distance error of each model under different simplification algorithms, and the distribution of the minimum values reflects the performance of different simplification algorithms. It can be seen from Table 1 and Table 2 that the maximum distance error and the average distance error of the algorithm of the present invention are lower than those of other algorithms under each point cloud model. The reason is that the algorithm of the present invention uses a sharpness evaluation function to evaluate the point cloud to extract the points in the steep change area, thus fully retaining the detailed contour information of the point cloud, establishing a local sharpness sparsity evaluation function to realize the secondary classification of the gentle change area, and proposing subspace hierarchical sampling and near-far point cyclic sampling to simplify the classified gentle change area, so that it can well retain the local detailed information of the point cloud on the basis of avoiding the generation of point cloud holes, thereby reducing the maximum distance error and the average distance error of the simplified point cloud.

[0091] In order to evaluate the advantages of the algorithm of the present invention at different simplification rates, taking the "gargoyle" point cloud as an example, a curve graph of the maximum distance error and the average distance error varying with the simplification rate is plotted, asFigure 8 As shown. Analysis Figure 8 (a), Figure 8 (b) From the overall distribution of the curves, it can be seen that as the simplification rate increases, the geometric errors of each algorithm gradually increase. However, for the algorithm proposed in the present invention, both the maximum distance error and the average distance error are the smallest at the same simplification rate. In addition, the curve formed by connecting the dots representing the error of the algorithm of the present invention grows most gently, indicating that the performance of the algorithm proposed in the present invention is the most stable as the simplification rate increases.

[0092] To further prove the universality and robustness of the algorithm of the present invention, the geometric errors of the algorithm of the present invention and other algorithms at the same simplification rate (70%) are analyzed. The average values of the maximum distance error and the average distance error of 50 point cloud models under different algorithms are taken, and their data distributions are as Figure 9 shown. It can be seen from the figure that the average value of the geometric error of each model after simplification by the algorithm of the present invention is the lowest, and the average value of the geometric error of each model of the USSPC algorithm is the second. Through calculation, it can be obtained that the average values of the maximum distance error and the average distance error of each model of the algorithm of the present invention are reduced by 11.9% and 3.5% respectively compared with the average values of the maximum distance error and the average distance error of each model of the USSPC algorithm. Therefore, the experiment verifies that the performance of the algorithm proposed in the present invention is superior to the other four algorithms.

[0093] The simplification times of different models for the five simplification algorithms are shown in Table 3 (the total number of points in the point cloud after simplification is 10,000). It can be seen from the table that the USSPC algorithm has the shortest running time, and the DFPSA algorithm has the longest running time. The reason is that the USSPC algorithm only uses the distance between points as the criterion to remove redundant points, and its time complexity is low. In the DFPSA algorithm, not only a relatively complex multi-index evaluation function is constructed, but also the secondary simplification algorithm for the point cloud is relatively complex, so the time complexity of this algorithm is increased. Since the complexity of the later data simplification method of IENVA and OCTCF is high, the algorithm of the present invention uses the octree algorithm to divide the point cloud space, which speeds up the later data downsampling to a certain extent. Therefore, the running time of the algorithm of the present invention is lower than that of IENVA and OCTCF. However, the construction of the octree will increase the running time of the algorithm of the present invention. If the octree algorithm is used as an independent data preprocessing module from the simplification algorithm, the running time of the algorithm of the present invention can be reduced. Generally speaking, the algorithm of the present invention is in the middle position among the running times of the five simplification algorithms. Therefore, it shows that the algorithm of the present invention can not only ensure the simplification accuracy of the point cloud, but also reduce the time complexity of the algorithm.

[0094] Table 3 Running time (s) of the five algorithms when the number of points in the point cloud remaining 10,000 after simplification

[0095]

[0096] In order to improve the 3D printing efficiency of dense point clouds, the present invention proposes a 3D point cloud simplification algorithm that compromises between the sharpness and uniformity of the gradual change region. During the point cloud simplification process, the points are classified twice according to the surface characteristics of the point cloud model, and different data downsampling rules are established for the classified points. The first classification starts from the global contour saliency, and a global sharpness evaluation function is used to extract the steep change region of the point cloud model, so as to retain the geometric edges of the point cloud model; the second classification comprehensively considers the geometric saliency and data uniformity of the gradual change region. First, a local sharpness and sparsity evaluation function is established to complete the importance evaluation and classification of points, and then subspace hierarchical sampling and near-far point cyclic sampling are respectively used to simplify the classified points, which more effectively realizes the data downsampling of the gradual change region. Experiments from multiple angles have verified the effectiveness and superiority of the proposed algorithm: in terms of visual effects, compared with the existing simplification algorithms, the algorithm of the present invention effectively reduces the encapsulation holes of the simplified point cloud while retaining the geometric significant information of the point cloud model; in the simplification error analysis, compared with the point cloud simplified by the USSPC algorithm with higher performance, the maximum distance error and the average distance error of the point cloud simplified by the algorithm of the present invention are reduced by 11.9% and 3.5% on average; in the comparison of the algorithm running time, the present invention effectively controls the time complexity on the premise of improving the simplification accuracy.

[0097] The above has described the embodiments of the present invention in detail, but the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those of ordinary skill in the art, various changes can be made without departing from the gist of the present invention.

Claims

1. A 3D point cloud reduction method for 3D printing, characterized in that, Proceed as follows: Step 1) Calculate the point cloud curvature according to the global sharpness and set the threshold T1, and macroscopically divide the original 3D point cloud model into a steep change area and a gentle change area; Step 2) Use the octree algorithm to perform subspace division on the point cloud in the gentle change area, and then set the threshold T2 according to the local sharpness sparsity S(p) of the point cloud in the gentle change area. Divide the points with S(p) value greater than T2 into the gentle change area A, and divide the points less than or equal to T2 into the gentle change area B to complete the secondary classification of the gentle change area. The calculation formula of the feature evaluation function that compromises sharpness and uniformity is as follows: Among them, S(p) is called the local sharp sparsity of the point cloud in the slow-varying region, the parameters α and β are fixed values, and θ c (p) is the sharpness of the surface fitted by the point p and its k-neighborhood points, d e (p) is the sparsity of the point p, and θ c (p) and d e (p) are calculated as follows: where p i (i = 1, 2…k) are the k neighborhood points of the current point p, and c(p) and c(p i ) represent the curvature at point p and p i respectively; Among them, ||p - p i || is the Euclidean distance between point p and its neighboring point p i ; Step 3) Downsample the point cloud in the gentle change area A by means of subspace hierarchical sampling. The specific method is as follows: Let the maximum recursive depth of the octree encoding in the gentle change area be L, then the side length of the deepest layer, that is, the L-layer subspace, divided by the octree is: where x(p) max is the maximum value of the x - coordinate of the point cloud, and x(p) min is the minimum value of the x - coordinate of the point cloud; In the point cloud p The number Q( p ) of the deepest subspace corresponding to the point is calculated by the following formula: where y(p) min and z(p) min are the minimum values of the point cloud y and z coordinates, and x(p), y(p), and z(p) are p the three-dimensional coordinates of the point, indicating the floor operation; There are U different values in Q(p), indicating that there are U subspaces in the L-th layer of the octree. The average sharp sparsity of the u-th (u ∈ {1, 2, 3, …, U}) subspace is represented by ; The number of levels of hierarchical random downsampling is N (N < 6), and the downsampling rate of each level is determined by the following relational formula: where n is the number of the nth level in the slow-varying region A, represents the maximum value of, represents the minimum value of, η1 < η2 < … < η n < … < η N , and the magnitudes of the values from η1 to η N are set according to the final point cloud thinning target. Step 4) Downsample the point cloud in the gentle change area B by means of near and far point cyclic sampling. The specific method is as follows: First, input the slow-varying region B. Let M be the set of points after thinning the slow-varying region, v be the number of cycles of the subspace, and M u is the set of points in the subspace u. Let u = 1, v = 1; Secondly, calculate the centroid point of the subspace u Find the point closest to the centroid Judge the number of points in the subspace u whether it is less than or equal to k'. If not, search for the k' neighborhood of the nearest point and find the farthest neighborhood point Put it into M and delete the remaining neighborhood points of it, and update M u , At this time, let v = v + 1, and continue the above operations in the subspace until If only put the nearest point to the centroid into M; Then let u = u + 1, traverse U subspaces until u > U; Finally, output the set of points M of the thinned slow-varying region B; Step 5) Merge the points in the steep change area with the points in the downsampled gentle change area A and gentle change area B to obtain the finally downsampled 3D point cloud.

2. The 3D point cloud reduction method for 3D printing according to claim 1, wherein: The value of T2 is calculated according to the following formula: where S(p) max is the maximum value of S(p), and S(p) min is the minimum value of S(p), μ is a constant, and μ ∈ [0.5, 1).

Citation Information

Patent Citations

  • Complex building three-dimensional modeling method based on point cloud data

    CN106600690A

  • 3D printing part machining method

    CN114102274A