A method for performing Boolean operations on three-dimensional point cloud models
Through the technology of octree model and shared information linked list, the problem of low Boolean operation efficiency of three-dimensional point cloud model is solved, and efficient model reconstruction and application of various operation results are realized.
Patent Information
- Application Number
- CN202111242501.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-25
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2041-10-25
AI Technical Summary
The Boolean operation efficiency of existing 3D point cloud models is low and requires model conversion or point cloud point traversal, resulting in large calculation amounts and low efficiency.
Using the octree model and shared information linked list, through the registration of the 3D point cloud model and the generation of the octree structure, Boolean operations are implemented in leaf nodes, avoiding reconstruction and traversal, and improving efficiency.
It improves the Boolean operation efficiency of the three-dimensional point cloud model, improves the efficiency and effect of model reconstruction, and is suitable for a variety of Boolean operation scenarios.
Smart Images

Figure CN113971718B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of geometric modeling, and in particular to a method for performing Boolean operations on a three-dimensional point cloud model. Background Art
[0002] With the development of virtual reality technology, the application fields of three-dimensional geometric models are becoming more and more extensive, such as the design and modification of parts, 3D games and animations, digital cities, geological modeling, etc. The existing three-dimensional model representations include three-dimensional solid models, three-dimensional mesh models, and three-dimensional point cloud models. With the widespread application of three-dimensional geometric modeling technology, the processing technology of three-dimensional models needs to be strengthened. In three-dimensional model processing technology, Boolean operations reconstruct the model by performing operations such as union, intersection, and difference on the spatial information of two models to obtain a new model. When reconstructing the model (i.e., establishing and processing complex models), Boolean operations can be used to flexibly process and modify the model.
[0003] At present, the Boolean operation technology of three-dimensional solid model and three-dimensional mesh model is relatively mature. However, with the rapid development of high-precision sensors such as LiDAR and Kinect, three-dimensional point cloud model has become the main data format for characterizing the three-dimensional world. Therefore, the Boolean operation of three-dimensional point cloud model has become equally important. To this end, the Chinese patent with publication number CN107545602B discloses "A method for building modeling based on spatial topological relationship constraints of LiDAR point cloud", including: obtaining the precise two-dimensional outer contour of the building and the mathematical expression of the geometric primitives of the building roof; constructing the spatial topological relationship diagram of the geometric primitives of the building roof; defining the three-dimensional Boolean operation rules between the geometric primitives of the building roof; performing three-dimensional Boolean operation on each building roof geometric primitive polyhedron to obtain the primitive top surface half space, according to the precise two-dimensional outer contour and elevation information of the building, obtain the wall and ground half space that completely contains the building entity model, and perform three-dimensional Boolean operation on the primitive top surface half space and the wall and ground half space to obtain the building entity model.
[0004] The building modeling method in the above-mentioned existing scheme is a method for performing Boolean operations on a three-dimensional point cloud model. On the basis of obtaining the geometric primitives of the building, the modeling materials are combined to form a building model, thereby realizing the intersection operation of the three-dimensional Boolean operation. However, the applicant found that in the existing scheme, when performing Boolean operations on the three-dimensional point cloud model, most of the three-dimensional point cloud models need to be converted into three-dimensional solid models or three-dimensional mesh models. However, the conversion of the model will greatly increase the amount of calculation, resulting in low efficiency of Boolean operations, thereby affecting the efficiency of model reconstruction. At the same time, the existing method of directly performing Boolean operations on the three-dimensional point cloud model requires first aligning the three-dimensional point cloud model, then calculating the distance for each pair of points after alignment, and finally performing Boolean operations based on the distance size. This method requires traversing the points in the point cloud, and the amount of calculation will increase exponentially with the increase in the number of point clouds, which also leads to low efficiency of Boolean operations. Therefore, how to design a three-dimensional point cloud model reconstruction method that can improve the efficiency of Boolean operations on three-dimensional point cloud models is a technical problem that needs to be solved urgently. Summary of the invention
[0005] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is: how to provide a method that can improve the efficiency of Boolean operations of three-dimensional point cloud models, thereby improving the efficiency of three-dimensional point cloud model reconstruction.
[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0007] A method for performing Boolean operations on a three-dimensional point cloud model comprises the following steps:
[0008] S1: Obtain three-dimensional point cloud models A and B for Boolean operation, and then align the three-dimensional point cloud models A and B;
[0009] S2: Establish an octree model of the three-dimensional point cloud model A and obtain the corresponding octree structure;
[0010] S3: applying the octree structure corresponding to the three-dimensional point cloud model A to the three-dimensional point cloud model B, and generating a number of corresponding shared information linked lists according to the overlapping relationship and adjacency relationship between the leaf nodes in the octree structure and the midpoints of the three-dimensional point cloud model B;
[0011] S4: Select the corresponding shared information linked list according to the type of Boolean operation to perform Boolean operation on the three-dimensional point cloud models A and B.
[0012] Preferably, in step S1, the three-dimensional point cloud models A and B are first roughly aligned based on FPFH to obtain corresponding point cloud models A′ and B′; and then the point cloud models A′ and B′ are precisely aligned based on ICP.
[0013] Preferably, the coarse registration comprises the following steps:
[0014] S101: performing Delaunay triangulation on the three-dimensional point cloud model A according to the FPFH feature descriptor set for each sample point to obtain a corresponding tetrahedron;
[0015] S102: selecting n sampling points from the three-dimensional point cloud model B, and making the distance between any two of the sampling points greater than a preset minimum distance threshold d;
[0016] S103: For the sampling points in the three-dimensional point cloud model B, calculate the FPFH eigenvalue of each sampling point;
[0017] S104: searching for feature points in the three-dimensional point cloud model A that are close to the FPFH feature values of the sampling points, then performing feature matching based on the feature points to locate a tetrahedron with a large correlation, and finally searching for corresponding points of the sampling points in the three-dimensional point cloud model B in the three-dimensional point cloud model A;
[0018] S105: Calculate the transformation matrix [R0, T0] between each set of corresponding points, and perform registration transformation based on the transformation matrix [R0, T0];
[0019] S106: Evaluate the effect of the current registration transformation by using the set distance error function, and use the transformation matrix [R0, T0] with the smallest distance error function value as the transformation matrix for coarse registration to perform registration transformation.
[0020] Preferably, the FPFH characteristic value is calculated by the following formula:
[0021]
[0022] Among them, SPFH is expressed by the relationship between point pairs in the k-neighborhood (α, β, θ):
[0023]
[0024] The distance error function is expressed by the following formula:
[0025]
[0026] In the above formula: i Indicates that in a known metric space, the sample point p and the neighboring point p i The distance between s 、p t represents the point pair in the K neighborhood of the sample point P; p ts Represents the vector between the point pairs; n s 、n t Represents the estimated normal corresponding to the point pair; u, v, w represent the UVW coordinate system; m i is a pre-given value;i Represents the distance difference after the transformation of the i-th group of corresponding points.
[0027] Preferably, the precise registration comprises the following steps:
[0028] S111: Select point a in point cloud models A′ and B′ respectively i ∈A′ and b i ∈B′, and satisfy min||b i -a i ||;
[0029] S112: Then calculate the rotation matrix R and translation matrix T respectively, and satisfy
[0030] S113: Bring the points of the point cloud model A′ into a i =Rb i +T, and obtain the corresponding cloud point model A″;
[0031] S114: Determine whether the set number of iterations is reached or the error value is less than the set threshold: if so, stop the iteration and use the cloud point model A″ as the cloud point model after registration based on the three-dimensional point cloud model B; otherwise, return to step S111.
[0032] Preferably, the rotation matrix R and the translation matrix T are respectively expressed by the following formulas:
[0033]
[0034] In the above formula: α, β, γ represent the rotation angles along the x, y, and z axes respectively, t x ,t y ,t z Represents the displacement along the x, y, and z axes respectively.
[0035] Preferably, in step S2, an octree model is established by the following steps:
[0036] S201: Setting the maximum number of iterations of the octree model or the minimum size of a leaf node as a stop rule of the octree model;
[0037] S202: Identify the maximum boundary of the three-dimensional point cloud model A, and set the corresponding maximum boundary as the initial node;
[0038] S203: Split each initial node into eight child nodes along each dimension, and ignore the child nodes that do not contain points;
[0039] S204: Take all child nodes as nodes and repeat step S203: When the size of the child node is smaller than the set minimum size of the leaf node or reaches the maximum number of iterations, take all child nodes as leaf nodes to generate an octree model of the three-dimensional point cloud model A.
[0040] Preferably, in step S3, the shared information linked list is generated by the following steps:
[0041] S301: Apply the octree structure of the three-dimensional point cloud model A to the three-dimensional point cloud model B, then filter the points from the three-dimensional point cloud model B in the octree structure, and store the corresponding points in the shared information linked list B_out_A;
[0042] S302: Determine whether each leaf node in the octree structure contains a point in the three-dimensional point cloud model B: if so, store the corresponding leaf node in Inter(A, B); otherwise, store the corresponding leaf node in nonInter(A, B);
[0043] S303: Extract leaf nodes of Inter(A,B): filter out points from the three-dimensional point cloud model A in the corresponding leaf nodes, and store the corresponding points in the shared information linked list A_in_B; filter out points from the three-dimensional point cloud model B in the corresponding leaf nodes, and store the corresponding points in the shared information linked list B_in_A;
[0044] S304: extracting leaf nodes of nonInter(A,B): filtering out points from the three-dimensional point cloud model A in the corresponding leaf nodes, and storing the corresponding points in the shared information linked list A_out_B;
[0045] S305: Generate four corresponding shared information linked lists: A_out_B, A_in_B, B_out_A, B_in_A.
[0046] Preferably, in step S4, types of Boolean operations of the three-dimensional point cloud models A and B include A∩B, A∪B, AB and BA.
[0047] Preferably, the Boolean operation of the three-dimensional point cloud models A and B is expressed by the following formula:
[0048]
[0049] Compared with the prior art, the three-dimensional point cloud model reconstruction method in the present invention has the following beneficial effects:
[0050] In the present invention, a shared information linked list is generated through the overlapping relationship and adjacency relationship between the leaf nodes of the octree model and its octree structure and the three-dimensional point cloud model, so that Boolean operations can be implemented with leaf nodes as the smallest unit, without the need to reconstruct or convert the point cloud model, and without the need to traverse the points in the point cloud, thereby improving the Boolean operation efficiency of the three-dimensional point cloud model, so as to improve the efficiency of the reconstruction of the three-dimensional point cloud model. At the same time, the present invention performs a rigid body transformation on two three-dimensional point cloud models in different coordinate systems by alignment before the Boolean operation, so that the two can completely overlap in the same coordinate system, thereby improving the effect of the reconstruction of the three-dimensional point cloud model. Finally, the present invention selects the corresponding shared information linked list for Boolean operation according to the type of Boolean operation, and then obtains a variety of operation results by simply combining shared information, so that it can be better applied to application scenarios that require a variety of Boolean operation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to make the purpose, technical solution and advantages of the invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:
[0052] Figure 1 It is a logic block diagram of the three-dimensional point cloud model reconstruction method;
[0053] Figure 2 A flowchart of a method for reconstructing a three-dimensional point cloud model;
[0054] Figure 3 It is a schematic diagram of a three-layer octree structure, where: Figure 3 (a) is the initial node, Figure 3 (b) is a two-layer octree structure. Figure 3 (c) is a three-layer octree structure, and the black parts are leaf nodes;
[0055] Figure 4 The schematic diagram of the process of forming a five-layer octree structure is shown in Figure 1. Figure 4 (a) represents the entity model, Figure 4 (b) represents the point cloud model of the entity model, Figure 4 (c) represents the octree structure of one layer of the point cloud. Figure 4 (d) represents the octree structure of the two-layer point cloud. Figure 4 (e) represents the octree structure of the three-layer point cloud. Figure 4 (f) Octree structure representing five-layer point cloud;
[0056] Figure 5 Scanned point cloud of the Stanford bunny model;
[0057] Figure 6 This is the registration result of the rabbit model;
[0058] Figure 7Point cloud model A and point cloud model B after registration;
[0059] Figure 8 is the octree model of point cloud model A;
[0060] Fig. 9 The octree framework of point cloud model A and point cloud B;
[0061] Fig.10 is the union of point cloud model A and point cloud model B;
[0062] Fig.11 is the intersection of point cloud model A and point cloud model B;
[0063] Fig.12 Schematic diagram of the reconstruction process of the rabbit model;
[0064] Fig.13 It is a structural diagram of the standard gear model N;
[0065] Fig.14 It is a structural schematic diagram of the damaged gear model D;
[0066] Fig.15 The standard model and the damaged model before registration;
[0067] Fig.16 is the point cloud model after registration;
[0068] Fig.17 is the ND result of the Boolean operation;
[0069] Fig.18 is the DN result of the Boolean operation;
[0070] Fig.19 is the defect area of the gear model. DETAILED DESCRIPTION
[0071] The following is a further detailed description through specific implementation methods:
[0072] Example:
[0073] This embodiment discloses a method for performing Boolean operations on a three-dimensional point cloud model.
[0074] like Figure 1 and Figure 2 As shown, a method for performing Boolean operations on a three-dimensional point cloud model comprises the following steps:
[0075] S1: Obtain three-dimensional point cloud models A and B for Boolean operation, and then align the three-dimensional point cloud models A and B;
[0076] S2: Establish an octree model of the three-dimensional point cloud model A and obtain the corresponding octree structure;
[0077] S3: applying the octree structure corresponding to the three-dimensional point cloud model A to the three-dimensional point cloud model B, and generating a number of corresponding shared information linked lists according to the overlapping relationship and adjacency relationship between the leaf nodes in the octree structure and the midpoints of the three-dimensional point cloud model B;
[0078] S4: Select the corresponding shared information linked list according to the type of Boolean operation to perform Boolean operation on the three-dimensional point cloud models A and B.
[0079] In the present invention, a shared information linked list is generated through the overlapping relationship and adjacency relationship between the leaf nodes of the octree model and its octree structure and the three-dimensional point cloud model, so that Boolean operations can be implemented with leaf nodes as the smallest unit, without the need to reconstruct or convert the point cloud model, and without the need to traverse the points in the point cloud, thereby improving the Boolean operation efficiency of the three-dimensional point cloud model, so as to improve the efficiency of the reconstruction of the three-dimensional point cloud model. At the same time, the present invention performs a rigid body transformation on two three-dimensional point cloud models in different coordinate systems by alignment before the Boolean operation, so that the two can completely overlap in the same coordinate system, thereby improving the effect of the reconstruction of the three-dimensional point cloud model. Finally, the present invention selects the corresponding shared information linked list for Boolean operation according to the type of Boolean operation, and then obtains a variety of operation results by simply combining shared information, so that it can be better applied to application scenarios that require a variety of Boolean operation results.
[0080] In the specific implementation process, the three-dimensional point cloud models A and B are first roughly aligned based on FPFH (Fast Point Feature Histogram) to obtain the corresponding point cloud models A′ and B′; then the point cloud models A′ and B′ are finely aligned based on ICP (Iterative Closest Point).
[0081] Specifically, the coarse registration includes the following steps:
[0082] S101: Delaunay triangulation is performed on the three-dimensional point cloud model A according to the FPFH feature descriptor set for each sample point to obtain corresponding tetrahedrons, so as to establish local associations using scattered point cloud data. A set of tetrahedrons can be obtained by performing Delaunay triangulation on the point cloud data. Delaunay triangulation refers to establishing associations for scattered point clouds (because the points in the point cloud are themselves scattered and disordered, triangulation is used to connect the scattered point clouds in space into a spatial triangular mesh, reflecting the topological connection relationship between the point and the adjacent points), and establishing the topological structure of the starting point cloud.
[0083] S102: Select n sampling points from the 3D point cloud model B, and make the distance between the sampling points greater than the preset minimum distance threshold d. The minimum distance threshold will affect the accuracy and time of the registration. The smaller the threshold, the higher the accuracy and the longer the time. The threshold is determined according to the needs when using it.
[0084] S103: For the sampling points in the three-dimensional point cloud model B, calculate the FPFH eigenvalue of each sampling point;
[0085] S104: searching for feature points in the three-dimensional point cloud model A that are close to the FPFH feature values of the sampling points, then performing feature matching based on the feature points to locate a tetrahedron with a large correlation, and finally searching for corresponding points of the sampling points in the three-dimensional point cloud model B in the three-dimensional point cloud model A;
[0086] S105: Calculate the transformation matrix [R0, T0] between each set of corresponding points, and perform registration transformation based on the transformation matrix [R0, T0];
[0087] S106: Evaluate the effect of the current registration transformation by using the set distance error function, and use the transformation matrix [R0, T0] with the smallest distance error function value as the transformation matrix for coarse registration to perform registration transformation.
[0088] The FPFH eigenvalue is calculated using the following formula:
[0089]
[0090] Among them, SPFH is expressed by the relationship between point pairs in the k-neighborhood (α, β, θ):
[0091]
[0092] The distance error function is expressed by the following formula:
[0093]
[0094] In the above formula: i Indicates that in a known metric space, the sample point p and the neighboring point p i The distance between s 、p t represents the point pair in the K neighborhood of the sample point P; p ts Represents the vector between the point pairs; n s 、n t Represents the estimated normal corresponding to the point pair; u, v, w represent the UVW coordinate system; m i is a pre-given value; i Represents the distance difference after the transformation of the i-th group of corresponding points.
[0095] Specifically, the precise registration includes the following steps:
[0096] S111: Select point a in point cloud models A′ and B′ respectively i ∈A′ and b i ∈B′, and satisfy min||b i -a i ||. Because the point clouds have been roughly aligned, the points that are closer to each other in the two point clouds are selected as sampling point pairs.
[0097] S112: Then calculate the rotation matrix R and translation matrix T respectively, and satisfy This formula indicates that the distance between the point clouds of multiple sampling points after rotation and translation is the minimum.
[0098] S113: Bring the points of the point cloud model A′ into a i =Rb i +T, and obtain the corresponding cloud point model A″;
[0099] S114: Determine whether the set number of iterations is reached or the error value is less than the set threshold: if so, stop the iteration and use the cloud point model A″ as the cloud point model after registration based on the three-dimensional point cloud model B; otherwise, return to step S111.
[0100] The rotation matrix R and translation matrix T are expressed by the following formulas:
[0101]
[0102] In the above formula: α, β, γ represent the rotation angles along the x, y, and z axes respectively, t x ,t y ,t z Represents the displacement along the x, y, and z axes respectively.
[0103] In the present invention, the rotation and translation misalignment between point clouds are first reduced through coarse registration to improve the efficiency and trend of precise registration, and then the registration error between the two point clouds is minimized through precise registration, so that the two three-dimensional point cloud models in different coordinate systems can be better rigidly transformed so that the two can completely overlap in the same coordinate system, thereby better improving the effect of Boolean operations.
[0104] In the specific implementation process, Figure 3 and Figure 4 As shown, the octree model is established through the following steps:
[0105] S201: Setting the maximum number of iterations of the octree model or the minimum size of a leaf node as a stop rule of the octree model;
[0106] S202: Identify the maximum boundary of the three-dimensional point cloud model A, and set the corresponding maximum boundary as the initial node;
[0107] S203: Split each initial node into eight child nodes along each dimension, and ignore the child nodes that do not contain points;
[0108] S204: Take all child nodes as nodes and repeat step S203: When the size of the child node is smaller than the set minimum size of the leaf node or reaches the maximum number of iterations, take all child nodes as leaf nodes to generate an octree model of the three-dimensional point cloud model A.
[0109] In the present invention, the above steps can effectively establish an octree model, so that a shared information linked list can be generated through the overlapping relationship and adjacency relationship between the leaf nodes of the octree structure and the three-dimensional point cloud model, and Boolean operations can be implemented with leaf nodes as the smallest unit. There is no need to reconstruct or convert the point cloud model, nor is there any need to traverse the points in the point cloud, thereby improving the Boolean operation efficiency of the three-dimensional point cloud model.
[0110] In the specific implementation process, Figure 2 As shown, the shared information list is generated through the following steps:
[0111] S301: Apply the octree structure of the three-dimensional point cloud model A to the three-dimensional point cloud model B, then filter the points from the three-dimensional point cloud model B in the octree structure, and store the corresponding points in the shared information linked list B_out_A;
[0112] S302: Determine whether each leaf node in the octree structure contains a point in the three-dimensional point cloud model B: if so, store the corresponding leaf node in Inter(A, B); otherwise, store the corresponding leaf node in nonInter(A, B);
[0113] S303: Extract leaf nodes of Inter(A,B): filter out points from the three-dimensional point cloud model A in the corresponding leaf nodes, and store the corresponding points in the shared information linked list A_in_B; filter out points from the three-dimensional point cloud model B in the corresponding leaf nodes, and store the corresponding points in the shared information linked list B_in_A;
[0114] S304: extracting leaf nodes of nonInter(A,B): filtering out points from the three-dimensional point cloud model A in the corresponding leaf nodes, and storing the corresponding points in the shared information linked list A_out_B;
[0115] S305: Generate four corresponding shared information linked lists: A_out_B, A_in_B, B_out_A, B_in_A.
[0116] Specifically, the types of Boolean operations of the three-dimensional point cloud models A and B include A∩B, A∪B, AB and BA.
[0117] In the specific implementation process, the Boolean operation of the three-dimensional point cloud models A and B is expressed by the following formula:
[0118]
[0119] In the present invention, the corresponding shared information linked list is selected according to the type of Boolean operation to perform Boolean operation, and then multiple operation results such as union, intersection, and difference are obtained by simply combining the shared information, so that it can be better applied to application scenarios that require multiple Boolean operation results.
[0120] In order to better illustrate the advantages of the three-dimensional point cloud model reconstruction method of the present invention, this embodiment also discloses the following experiment.
[0121] It includes two experiments: 1) model reconstruction using Boolean operations; 2) defect detection on damaged gear models.
[0122] Experiment 1: Model reconstruction using Boolean operations
[0123] Figure 5 This is a rabbit model from Stanford University. The model is scanned from ten different angles to obtain ten point clouds. In order to reconstruct the rabbit model, the ten point clouds need to be registered. The results after registration are as follows: Figure 6 As shown in the figure. If the rabbit model is directly merged to obtain a point cloud model with 361869 points, there will be problems such as overlapping points, uneven distribution of point clouds, and a large number of point clouds, which will lead to low processing efficiency and low processing accuracy in the subsequent processing. Therefore, this experiment performs Boolean operations on the point clouds to find the union to avoid the problem of overlapping points during point cloud reconstruction.
[0124] This experiment takes the registered side 0° point cloud (point cloud A) and the side 45° point cloud (point cloud B) as an example. Figure 7 As shown in , in the process of finding the union of point clouds, firstly, an octree structure is established for point cloud A, such as Figure 8 As shown; secondly, the point cloud B is applied to the octree structure, as Fig. 9 As shown. Find the result of BA, and then merge the point clouds of A and BA to get a uniform point cloud, as shown Fig.10 In the process of finding the union of Boolean operations, the overlapping points B∩A from the B point cloud will be ignored, as shown in Fig.11 In the same way, the ten point clouds are Boolean-operated and unioned to reconstruct the rabbit model. The reconstruction process is as follows: Fig.12As shown in the figure, the side 0° point cloud, side 45° point cloud, side 90° point cloud, side 180° point cloud, side 270° point cloud, side 315° point cloud, top 1 point cloud, top 2 point cloud, ear part point cloud, and bottom point cloud are merged to reconstruct the rabbit model.
[0125] In order to verify the effectiveness and superiority of the 3D point cloud model reconstruction method of the present invention, the present invention uses the same data set to compare the following methods:
[0126] Method 1: Convert the point cloud model into a triangular mesh model and perform Boolean operations on the triangular mesh model.
[0127] Method 2: Calculate the distance for each point pair in the registered point cloud model and perform Boolean operations based on the distance.
[0128] Table 1 Comparison of Boolean operations of different methods
[0129]
[0130] It can be seen from Table 1 that compared with the other two methods, the present invention takes less time and has higher accuracy, indicating that the three-dimensional point cloud model reconstruction method of the present invention can quickly perform Boolean operations on the point cloud model.
[0131] Experiment 2: Defect Detection of Damaged Gear Model
[0132] In order to prove the practicability of the method proposed in this invention, this experiment performs defect detection on a damaged gear model. The undamaged gear model N is used as a standard part, such as Fig.13 As shown in FIG. 1 , the damaged gear D with broken teeth is used as the damaged part. Fig.14 As shown in Figure 1, the corresponding point cloud models are extracted for the two gears. The standard point cloud and the damaged part point cloud are registered (before registration, Fig.15 As shown), the image after registration is as follows Fig.16 shown.
[0133] Since the point cloud obtained by 3D vision technology is a surface point cloud, in order to accurately extract the defect area and calculate the defect volume, it is necessary to obtain the point cloud of ND and DN. The detected results are combined into a closed point cloud to obtain the complete defect area, so as to calculate the defect volume. The result of ND obtained by Boolean operation is as follows: Fig.17 As shown, the results of DN are as follows Fig.18 As shown. By combining the two, a closed point cloud model can be obtained, and the area and volume of the defect can be calculated (such as Fig.19 The volume of the gear is measured in order to calculate the extent of gear damage.
[0134] Experimental conclusion:
[0135] Experiment 1 verifies the effectiveness and superiority of the method of the present invention by performing Boolean operations on a public point cloud data set (Stanford rabbit model) to obtain the union. Experiment 2 verifies the practicality of the method of the present invention by applying it to the specific defect detection of damaged gears.
[0136] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit them. Although the present invention has been described with reference to the preferred embodiments of the present invention, it should be understood by those skilled in the art that various changes can be made to it in form and detail without departing from the spirit and scope of the present invention as defined in the appended claims. At the same time, common sense such as the well-known specific structures and characteristics in the embodiments are not described in detail here. Finally, the scope of protection claimed by the present invention shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. A method for performing Boolean operations on a three-dimensional point cloud model. It is characterized in that The following steps are involved: S1: Obtain three-dimensional point cloud models A and B for Boolean operation, and then align the three-dimensional point cloud models A and B; S2: Establish an octree model of the three-dimensional point cloud model A and obtain the corresponding octree structure; S3: applying the octree structure corresponding to the three-dimensional point cloud model A to the three-dimensional point cloud model B, and generating a number of corresponding shared information linked lists according to the overlapping relationship and adjacency relationship between the leaf nodes in the octree structure and the midpoints of the three-dimensional point cloud model B; In step S3, a shared information linked list is generated through the following steps: S301: Apply the octree structure of the three-dimensional point cloud model A to the three-dimensional point cloud model B, then filter the points from the three-dimensional point cloud model B in the octree structure, and store the corresponding points in the shared information linked list B_out_A; S302: Determine whether each leaf node in the octree structure contains a point in the three-dimensional point cloud model B: if so, store the corresponding leaf node in Inter(A, B); otherwise, store the corresponding leaf node in nonInter(A, B); S303: Extract leaf nodes of Inter(A,B): filter out points from the three-dimensional point cloud model A in the corresponding leaf nodes, and store the corresponding points in the shared information linked list A_in_B; filter out points from the three-dimensional point cloud model B in the corresponding leaf nodes, and store the corresponding points in the shared information linked list B_in_A; S304: extracting leaf nodes of nonInter(A,B): filtering out points from the three-dimensional point cloud model A in the corresponding leaf nodes, and storing the corresponding points in the shared information linked list A_out_B; S305: Generate four corresponding shared information linked lists: A_out_B, A_in_B, B_out_A, B_in_A; S4: Select the corresponding shared information linked list according to the type of Boolean operation to perform Boolean operation on the three-dimensional point cloud models A and B.
2. The method for performing Boolean operations on a three-dimensional point cloud model according to claim 1, Features: In step S1, the three-dimensional point cloud models A and B are first roughly aligned based on FPFH to obtain corresponding point cloud models A′ and B′; then the point cloud models A′ and B′ are finely aligned based on ICP.
3. The method for performing Boolean operations on a three-dimensional point cloud model as claimed in claim 2, It is characterized in that The coarse registration comprises the following steps: S101: performing Delaunay triangulation on the three-dimensional point cloud model A according to the FPFH feature descriptor set for each sample point to obtain a corresponding tetrahedron; S102: selecting n sampling points from the three-dimensional point cloud model B, and making the distance between any two of the sampling points greater than a preset minimum distance threshold d; S103: For the sampling points in the three-dimensional point cloud model B, calculate the FPFH eigenvalue of each sampling point; S104: searching for feature points close to the FPFH feature values of the sampling points in the three-dimensional point cloud model A, then performing feature matching based on the feature points to locate a tetrahedron with a large correlation, and finally searching for corresponding points of the sampling points in the three-dimensional point cloud model B in the three-dimensional point cloud model A; S105: Calculate the transformation matrix [R 0 ,T 0 ], and based on the transformation matrix [R 0 ,T 0 ] to perform registration transformation; S106: Evaluate the effect of the current registration transformation by using the set distance error function, and convert the transformation matrix [R 0 ,T 0 ] is used as the transformation matrix for coarse registration to perform registration transformation.
4. The method for performing Boolean operations on a three-dimensional point cloud model as claimed in claim 3, Features: The FPFH eigenvalue is calculated using the following formula: Among them, SPFH is expressed by the relationship between point pairs in the k-neighborhood (α, β, θ): The distance error function is expressed by the following formula: In the above formula: i Indicates that in a known metric space, the sample point p and the neighboring point p i The distance between s 、p t represents the point pair in the K neighborhood of the sample point P; p ts Represents the vector between point pairs; n s 、n t Represents the estimated normal corresponding to the point pair; u, v, w represent the UVW coordinate system; m i is a pre-given value; i Represents the distance difference after the transformation of the i-th group of corresponding points.
5. The method for performing Boolean operations on a three-dimensional point cloud model as claimed in claim 2, It is characterized in that The precise registration comprises the following steps: S111: Select point a in point cloud models A′ and B′ respectively i ∈A′ and b i ∈B′, and satisfy min||b i -a i ||; S112: Then calculate the rotation matrix R and translation matrix T respectively, and satisfy S113: Bring the points of the point cloud model A′ into a i =Rb i +T, and obtain the corresponding cloud point model A″; S114: Determine whether the set number of iterations is reached or the error value is less than the set threshold: if so, stop the iteration and use the cloud point model A″ as the cloud point model after registration based on the three-dimensional point cloud model B; otherwise, return to step S111.
6. The method for performing Boolean operations on a three-dimensional point cloud model as claimed in claim 5, It is characterized in that The rotation matrix R and the translation matrix T are respectively expressed by the following formulas: In the above formula: α, β, γ represent the rotation angles along the x, y, and z axes respectively, t x ,t y ,t z Represent the displacement along the x, y, and z axes respectively.
7. The method for performing Boolean operations on a three-dimensional point cloud model according to claim 1, It is characterized in that In step S2, an octree model is established by the following steps: S201: Setting the maximum number of iterations of the octree model or the minimum size of a leaf node as a stop rule of the octree model; S202: Identify the maximum boundary of the three-dimensional point cloud model A, and set the corresponding maximum boundary as the initial node; S203: Split each initial node into eight child nodes along each dimension, and ignore the child nodes that do not contain points; S204: Take all child nodes as nodes and repeat step S203: When the size of the child node is smaller than the set minimum size of the leaf node or reaches the maximum number of iterations, take all child nodes as leaf nodes to generate an octree model of the three-dimensional point cloud model A.
8. The method for performing Boolean operations on a three-dimensional point cloud model according to claim 1, Features: In step S4, the types of Boolean operations of the three-dimensional point cloud models A and B include A∩B, A∪B, AB and BA.
9. The method for performing Boolean operations on a three-dimensional point cloud model as claimed in claim 8, Features: The Boolean operation of the 3D point cloud models A and B is expressed by the following formula:
