A three-dimensional mesh model difference finding method, device, equipment and storage medium

By registering and voxel division of the benchmark model and extraction model, finding and combining the difference points, the accuracy degradation problem of Boolean operations on non-closed models in the prior art is solved, and efficient differentiation operation for three-dimensional models is realized.

CN114820985BActive Publication Date: 2025-02-21HANSF (HANGZHOU) MEDICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210483477.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-06
Publication Date
2025-02-21
Estimated Expiration
2042-05-06

AI Technical Summary

Technical Problem

In the prior art, when performing Boolean operations, the processing of non-closed models has the problem of accuracy degradation, especially during triangulation, which will change the mesh structure, resulting in the accuracy of the difference parts being affected.

Method used

By registering benchmark model A and extraction model B, the point cloud density and bounding box are calculated, the area ROI to be extracted is determined, and the difference points are found in the voxel division of the benchmark model, and the difference points are merged to obtain the difference result Diff.

Benefits of technology

Differentiation operations are implemented for non-closed models or three-dimensional models with different point cloud sampling densities, without changing the original grid structure, avoiding accuracy degradation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114820985B_ABST
    Figure CN114820985B_ABST
Patent Text Reader

Abstract

The present invention relates to computer graphics processing technology, and discloses a method, device, equipment and storage medium for finding differences in a three-dimensional mesh model; a method for finding differences in a three-dimensional mesh model, registering a reference model A and an extracted model B; calculating the point cloud density and the bounding box of the registered models respectively, and obtaining the point cloud density avg of the reference model A A And the bounding box ABox and the point cloud density avg of the extracted model B B and bounding box BBox; divide the benchmark model into voxels to obtain A grid ; Determine the ROI of the area to be extracted based on the bounding box of the reference model A and the bounding box of the extracted model B; Place the point of the ROI of the area to be extracted in the voxel A of the reference model A grid The method can search for the difference points in the non-closed model or the three-dimensional model with different point cloud sampling density or different number of facets without loss of accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to computer graphics processing technology, and in particular to a three-dimensional grid model difference finding method, device, equipment and storage medium. Background Art

[0002] A three-dimensional model can represent surface information by point cloud data and triangular facets formed by connecting these three-dimensional points. The three-dimensional model of the object can be obtained by scanning the object with a sensor. There are various types of sensors, such as visual sensors, computer tomography, etc. The three-dimensional models of the same object obtained by different devices may be non-closed models (such as 3D scanned dental models), or have different point cloud densities and numbers of facets.

[0003] For example, in the prior art, the article "Accurate, robust and efficient regularized Boolean values ​​for general 3D meshes" in Computer and Mathematical Applications 70 (2015) 1235-1254 discloses that in three-dimensional model processing, in order to obtain the difference between two models, Boolean operations are used. Boolean operations require that the mesh is closed and orientable (has a normal), which is not applicable to the non-closed model mentioned in the above. When executing Boolean operations in closed models, the boundary mesh often needs to be triangulated to determine the intersection boundaries, which will change the existing mesh structure and cause accuracy degradation. Summary of the invention

[0004] The present invention is not applicable to non-closed models in the prior art. In the process of executing Boolean operations, the boundary grid often needs to be triangulated to determine the intersection boundaries, which will change the existing grid structure and cause accuracy degradation. A three-dimensional grid model difference method, device, equipment and storage medium are provided.

[0005] In order to solve the above technical problems, the present invention is solved by the following technical solutions:

[0006] A method for finding differences in a three-dimensional mesh model, the model includes a reference model A and an extracted model B, and the method includes:

[0007] Model registration: register the reference model A and the extracted model B so that the reference model A and the extracted model B are aligned and the same areas of the reference model A and the extracted model B overlap;

[0008] Calculation of point cloud density and bounding box: Calculate the point cloud density and bounding box of the registered benchmark model A and the extracted model B respectively to obtain the point cloud density avg of the benchmark model A. A And the bounding box ABox and the point cloud density avg of the extracted model B B And bounding box BBox;

[0009] Voxel acquisition A of the baseline model Agrid , divide the benchmark model into voxels to obtain A grid ;

[0010] Determine the ROI of the area to be extracted, and determine the ROI of the area to be extracted according to the bounding box of the reference model A and the bounding box of the extraction model B;

[0011] To obtain the difference result Diff, place the point of the ROI to be extracted in voxel A of the reference model A grid Search in, extract the difference points, and merge the difference points to obtain the difference result Diff.

[0012] Preferably, the registration of the model includes fine registration and coarse registration; the fine registration is performed by an ICP method.

[0013] Preferably, the method for calculating the bounding box includes:

[0014] Get all the points in the benchmark model A to form a point set P A , where each point contains three coordinate components: X, Y, and Z;

[0015] In P A Randomly select a point P a1 and point P a2 , calculate the initial external bounding box minP of model A ABox 、maxP ABox ;

[0016] minP ABox =min(P a1 , P a2 )

[0017] maxP ABox =max(P a1 , P a2 )

[0018] Among them, max means that the XYZ coordinate value with the largest value between the two points is the return value; min means that the XYZ coordinate value with the smallest value between the two points is the return value;

[0019] Traverse the point set P A Every point P a , update minP ABox and maxP ABox coordinate;

[0020] minP ABox =min(minP ABox , P a );

[0021] maxP ABox =max(maxPABox , P a );

[0022] Thus, the bounding box ABox of the reference model A is obtained;

[0023] Get all the points in the extracted model B to form a point set P B , where each point contains three coordinate components: X, Y, and Z;

[0024] In P B Randomly select a point P b1 and point P b2 , calculate the initial external bounding box minP of model B BBox 、maxP BBox ;

[0025] minP BBox =min(P b1 , P b2 )

[0026] maxP BBox =max(P b1 , P b2 )

[0027] Among them, max means that the XYZ coordinate value with the largest value between the two points is the return value; min means that the XYZ coordinate value with the smallest value between the two points is the return value;

[0028] Traverse the point set P B Every point P b , update minP BBox and maxP BBox coordinate;

[0029] minP BBox =min(minP BBox , P b );

[0030] maxP BBox =max(maxP BBox , P b );

[0031] Thus, the bounding box BBox of the reference model B is obtained.

[0032] As a preference, the point cloud density avg of the benchmark model A A And extract the point cloud density avg of model B B The calculation method is,

[0033] avg A =∑A_edge_len / A_edge_num;

[0034] avg B =∑B_edge_len / B_edge_num;

[0035] Among them, A_edge_len is the length of one side in the benchmark model A, and A_edge_num is the total number of edges in the benchmark model A; B_edge_len is the length of one side in the extracted model B, and B_edge_num is the total number of edges in the extracted model B.

[0036] As a preference, the voxel A of the reference model A is obtained grid include;

[0037] Determination of voxel resolution Resolution, point cloud density avg of benchmark model A A And extract the point cloud density avg of model B B The larger value is multiplied by the first threshold value th;

[0038] Resolution = th * max (avg A ,avg B );

[0039] Bounding box A Box The length in the X, Y, and Z directions is divided by the voxel resolution Resolution and rounded to get the number of voxel grids. The voxel resolutions are (n x , n y , n z );n x is the voxel resolution in the X direction, n y is the voxel resolution in the Y direction, n z is the voxel resolution in the Z direction; voxel A grid Acquisition of A grid =n x *n y *n z .

[0040] Preferably, determine the ROI of the area to be extracted, determine the difference direction, the difference direction of the bounding box of the reference model A and the bounding box of the extraction model B, extract the difference model Diff according to the difference direction; expand the difference model according to the difference direction, and thus mark the ROI of the area to be extracted.

[0041] As a preferred method, obtain the difference result Diff and calculate the coordinates of the grid xyz;

[0042] For a point P1 in the ROI area and any point P2 in the grid a,

[0043] dist(P1,P2)>dist_th&&P1N*P2N <normal_th,

[0044] Among them, dist represents the Euclidean distance between two input points, P1N and P2N are the normal three-dimensional vectors of points P1 and P2; dist_th and normal_th are thresholds.

[0045] In order to solve the above technical problems, the present application also provides a three-dimensional mesh model difference finding device, which includes:

[0046] The model registration module is used to register the reference model A and the extracted model B, so that the reference model A and the extracted model B are aligned and the same areas of the reference model A and the extracted model B overlap;

[0047] The calculation module of point cloud density and bounding box is used to calculate the point cloud density and bounding box of the registered benchmark model A and the extracted model B respectively, and obtain the point cloud density avg of the benchmark model A. A And the bounding box ABox and the point cloud density avg of the extracted model B B And bounding box BBox;

[0048] Voxel acquisition A of the baseline model A grid Module, voxel acquisition A of the benchmark model A grid The module is used to perform voxel division on the benchmark model to obtain A grid ;

[0049] A module for determining a region ROI to be extracted, wherein the module for determining a region ROI to be extracted determines the region ROI to be extracted based on a bounding box of the reference model A and a bounding box of the extraction model B;

[0050] The module for obtaining the difference result Diff locates the point of the ROI to be extracted in the voxel A of the reference model A. grid Search in, extract the difference points, and merge the difference points to obtain the difference result Diff.

[0051] In order to solve the above technical problems, the present application also provides a three-dimensional mesh model difference finding device, which is a three-dimensional mesh model difference finding device implemented by a three-dimensional mesh model difference finding method.

[0052] In order to solve the above technical problems, the present application also provides a storage medium, which is a storage medium implemented by a three-dimensional mesh model difference finding method.

[0053] The present invention has significant technical effects due to the adoption of the above technical solution: the present invention can find differences in non-closed models or three-dimensional models with different point cloud sampling densities or different numbers of facets without loss of accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 is a system schematic diagram of the present invention;

[0055] Figure 2 is the voxel acquisition A of the reference model A of the present invention grid flow chart;

[0056] Figure 3 It is a calculation flow chart of the bounding box of the present invention;

[0057] Figure 4 is the benchmark model A image 1 of the present invention;

[0058] Figure 5 It is the extraction model B image 1 of the present invention;

[0059] Figure 6 It is the DIFF model diagram of the present invention;

[0060] Figure 7 It is the DIFF model diagram of the present invention;

[0061] Figure 8 is the second image of the benchmark model A of the present invention;

[0062] Fig. 9 This is the second image of the extraction model B of the present invention. DETAILED DESCRIPTION

[0063] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0064] Example 1

[0065] A method for finding differences in a three-dimensional mesh model, the model includes a reference model A and an extracted model B, and the method includes:

[0066] Model registration: register the reference model A and the extracted model B so that the reference model A and the extracted model B are aligned and the same areas of the reference model A and the extracted model B overlap;

[0067] Calculation of point cloud density and bounding box: Calculate the point cloud density and bounding box of the registered benchmark model A and the extracted model B respectively to obtain the point cloud density avg of the benchmark model A. A And the bounding box ABox and the point cloud density avg of the extracted model B B And bounding box BBox;

[0068] Voxel acquisition A of the baseline model A grid , divide the benchmark model into voxels to obtain A grid ;

[0069] Determine the ROI of the area to be extracted, and determine the ROI of the area to be extracted according to the bounding box of the reference model A and the bounding box of the extraction model B;

[0070] To obtain the difference result Diff, place the point of the ROI to be extracted in voxel A of the reference model A grid Search in, extract the difference points, and merge the difference points to obtain the difference result Diff.

[0071] Model registration includes fine registration and coarse registration; fine registration is performed through the ICP method.

[0072] The calculation method of the bounding box includes:

[0073] Get all the points in the benchmark model A to form a point set P A , where each point contains three coordinate components: X, Y, and Z;

[0074] In P A Randomly select a point P a1 and point P a2 , calculate the initial external bounding box minP of model A ABox 、maxP ABox ;

[0075] minP ABox =min(P a1 , P a2 )

[0076] maxP ABox =max(P a1 , P a2 )

[0077] Among them, max means that the XYZ coordinate value with the largest value between the two points is the return value; min means that the XYZ coordinate value with the smallest value between the two points is the return value;

[0078] Traverse the point set P A Every point P a , update minP ABox and maxP ABox coordinate;

[0079] minP ABox =min(minP ABox , P a );

[0080] maxP ABox =max(maxP ABox , P a );

[0081] Thus, the bounding box ABox of the reference model A is obtained;

[0082] Get all the points in the extracted model B to form a point set P B , where each point contains three coordinate components: X, Y, and Z;

[0083] In P B Randomly select a point P b1 and point P b2 , calculate the initial external bounding box minP of model B BBox 、maxP BBox ;

[0084] minP BBox =min(P b1 , P b2 )

[0085] maxP BBox =max(P b1 , P b2 )

[0086] Among them, max means that the XYZ coordinate value with the largest value between the two points is the return value; min means that the XYZ coordinate value with the smallest value between the two points is the return value;

[0087] Traverse the point set P B Every point P b , update minP BBox and maxP BBox coordinate;

[0088] minP BBox =min(minP BBox , P b );

[0089] maxP BBox =max(maxP BBox , P b );

[0090] Thus, the bounding box BBox of the reference model B is obtained.

[0091] Point cloud density avg of baseline model A A And extract the point cloud density avg of model B B The calculation method is,

[0092] avg A =∑A_edge_len / A_edge_num;

[0093] avg B =∑B_edge_len / B_edge_num;

[0094] Among them, A_edge_len is the length of one side in the benchmark model A, and A_edge_num is the total number of edges in the benchmark model A; B_edge_len is the length of one side in the extracted model B, and B_edge_num is the total number of edges in the extracted model B.

[0095] Voxel acquisition A of the baseline model A grid include;

[0096] Determination of voxel resolution Resolution, point cloud density avg of benchmark model A A And extract the point cloud density avg of model B B The larger value is multiplied by the first threshold value th;

[0097] Resolution = th * max (avg A ,avg B );

[0098] Bounding box A Box The length in the X, Y, and Z directions is divided by the voxel resolution Resolution and rounded to get the number of voxel grids. The voxel resolutions are (n x , n y , n z );n x is the voxel resolution in the X direction, n y is the voxel resolution in the Y direction, n z is the voxel resolution in the Z direction; voxel A grid Acquisition of A grid =n x *n y *n z .

[0099] Determine the ROI of the area to be extracted, determine the difference direction, the difference direction of the bounding box of the reference model A and the bounding box of the extracted model B, and extract the difference model Diff based on the difference direction; expand the difference model based on the difference direction to mark the ROI of the area to be extracted.

[0100] Obtain the difference result Diff and calculate the coordinates of the grid xyz;

[0101] For a point P1 in the ROI area and any point P2 in the grid a,

[0102] dist(P1,P2)>dist_th&&P1N*P2N <normal_th,

[0103] Among them, dist represents the Euclidean distance between two input points, P1N and P2N are the normal three-dimensional vectors of points P1 and P2; dist_th and normal_th are thresholds.

[0104] Example 2

[0105] Based on Embodiment 1, this embodiment provides a three-dimensional grid model electronic device, which includes:

[0106] The model registration module is used to register the reference model A and the extracted model B, so that the reference model A and the extracted model B are aligned and the same areas of the reference model A and the extracted model B overlap;

[0107] The calculation module of point cloud density and bounding box is used to calculate the point cloud density and bounding box of the registered benchmark model A and the extracted model B respectively, and obtain the point cloud density avg of the benchmark model A. A And the bounding box ABox and the point cloud density avg of the extracted model B B And bounding box BBox;

[0108] Voxel acquisition A of the baseline model A grid Module, voxel acquisition A of the benchmark model A grid The module is used to perform voxel division on the benchmark model to obtain A grid ;

[0109] A module for determining a region ROI to be extracted, wherein the module for determining a region ROI to be extracted determines the region ROI to be extracted based on a bounding box of the reference model A and a bounding box of the extraction model B;

[0110] The module for obtaining the difference result Diff locates the point of the ROI to be extracted in the voxel A of the reference model A. grid Search in, extract the difference points, and merge the difference points to obtain the difference result Diff.

[0111] Example 3

[0112] Based on Example 1, this embodiment provides a three-dimensional mesh model electronic device, which is a three-dimensional mesh model electronic device implemented by a three-dimensional mesh model difference finding method.

[0113] Example 4

[0114] Based on Example 1, this embodiment provides a storage medium, which is implemented by a three-dimensional mesh model difference method.

[0115] Example 5

[0116] Based on the above embodiments, this embodiment Figure 4 The number of points of the baseline model A is 50922. Figure 5 The number of points in the extracted model B is 210099; by finding the difference between them, we can get the diff model graph, such as Figure 6 and Figure 7 .

[0117] Example 6

[0118] Based on the above embodiments, this embodiment Figure 8 The number of points of the baseline model A is 50922. Fig. 9 The number of points in the extracted model B is 210099; the diff model graph is obtained by performing difference calculation on it.

Claims

1. A method for finding differences in a three-dimensional mesh model, the model comprising a reference model A and an extracted model B, the method comprising: Model registration: register the reference model A and the extracted model B so that the reference model A and the extracted model B are aligned and the same areas of the reference model A and the extracted model B overlap; Calculation of point cloud density and bounding box: Calculate the point cloud density and bounding box of the registered benchmark model A and the extracted model B respectively to obtain the point cloud density avg of the benchmark model A. A And the bounding box ABox and the point cloud density avg of the extracted model B B And bounding box BBox; Voxel A of baseline model A grid The benchmark model is divided into voxels to obtain A grid ; Determine the ROI of the area to be extracted, and determine the ROI of the area to be extracted according to the bounding box of the reference model A and the bounding box of the extraction model B; To obtain the difference result Diff, place the point of the ROI to be extracted in voxel A of the reference model A grid Search in, extract the difference points, and merge the difference points to obtain the difference result Diff.

2. A three-dimensional mesh model difference determination method according to claim 1, characterized in that: Model registration includes fine registration and coarse registration; fine registration is performed through the ICP method.

3. A three-dimensional mesh model difference determination method according to claim 1, characterized in that: The calculation method of the bounding box includes: Get all the points in the benchmark model A to form a point set P A , where each point contains three coordinate components: X, Y, and Z; In P A Randomly select a point P a1 and point P a2 , calculate the initial external bounding box minP of model A ABox 、maxP ABox ; minP ABox =min(P a1 ,P a2 ) maxP ABox =max(P a1 ,P a2 ) Among them, max means that the XYZ coordinate value with the largest value between the two points is the return value; min means that the XYZ coordinate value with the smallest value between the two points is the return value; Traverse the point set P A Every point P a , update minP ABox and maxP ABox coordinate; minP ABox =min(minP ABox ,P a ); maxP ABox =max(maxP ABox ,P a ); Thus, the bounding box ABox of the reference model A is obtained; Get all the points in the extracted model B to form a point set P B , where each point contains three coordinate components: X, Y, and Z; In P B Randomly select a point P b1 and point P b2 , calculate the initial external bounding box minP of model B BBox 、maxP BBox ; minP BBox =min(P b1 ,P b2 ) maxP BBox =max(P b1 ,P b2 ) Among them, max means that the XYZ coordinate value with the largest value between the two points is the return value; min means that the XYZ coordinate value with the smallest value between the two points is the return value; Traverse the point set P B Every point P b , update minP BBox and maxP BBox coordinate; minP BBox =min(minP BBox ,P b ); maxP BBox =max(maxP BBox ,P b ); Thus, the bounding box BBox of the extracted model B is obtained.

4. A three-dimensional mesh model difference determination method according to claim 1, characterized in that: Point cloud density avg of baseline model A A And extract the point cloud density avg of model B B The calculation method is, avg A =∑A_edge_len / A_edge_num; avg B =∑B_edge_len / B_edge_num; Among them, A_edge_len is the length of one side in the benchmark model A, and A_edge_num is the total number of edges in the benchmark model A; B_edge_len is the length of one side in the extracted model B, and B_edge_num is the total number of edges in the extracted model B.

5. A three-dimensional mesh model difference determination method according to claim 1, characterized in that: Voxel A of baseline model A grid The acquisition includes: Determination of voxel resolution Resolution, point cloud density avg of benchmark model A A And extract the point cloud density avg of model B B The larger value is multiplied by the first threshold value th; Resolution=th*max(avg A ,avg B ); Bounding box A Box The length in the X, Y, and Z directions is divided by the voxel resolution Resolution and rounded to get the number of voxel grids. The voxel resolutions are (n x , n y , n z );n x is the voxel resolution in the X direction, n y is the voxel resolution in the Y direction, n z is the voxel resolution in the Z direction; voxel A grid Acquisition of A grid =n x *n y *n z .

6. A three-dimensional mesh model difference determination method according to claim 1, characterized in that: Determining the area ROI to be extracted specifically includes: Determine the difference direction between the bounding box of the reference model A and the bounding box of the extracted model B, and extract the difference model Diff according to the difference direction; The difference model is expanded according to the difference direction to mark the region ROI to be extracted. If the difference direction does not exist, the extraction model B is marked as the region ROI to be extracted.

7. A three-dimensional mesh model difference determination method according to claim 1, characterized in that: The acquisition of the difference result Diff includes: Calculate the xyz coordinates of the grid; For a point P1 and voxel A in the ROI area grid Any point P2 in the middle grid a, dist(P1,P2)>dist_th&&P1N*P2N <normal_th, Among them, dist represents the Euclidean distance between two input points, P1N and P2N are the three-dimensional vectors of points P1 and P2; dist_th and normal_th are thresholds.

8. A three-dimensional mesh model difference finding device, characterized in that: It includes: The model registration module is used to register the reference model A and the extracted model B, so that the reference model A and the extracted model B are aligned and the same areas of the reference model A and the extracted model B overlap; The calculation module of point cloud density and bounding box is used to calculate the point cloud density and bounding box of the registered benchmark model A and the extracted model B respectively, and obtain the point cloud density avg of the benchmark model A. A And the bounding box ABox and the point cloud density avg of the extracted model B B And bounding box BBox; Voxel A of baseline model A grid The acquisition module of the benchmark model A acquires the voxel A grid The module is used to perform voxel division on the benchmark model to obtain A grid ; A module for determining a region ROI to be extracted, wherein the module for determining a region ROI to be extracted determines the region ROI to be extracted based on a bounding box of the reference model A and a bounding box of the extraction model B; The module for obtaining the difference result Diff locates the point of the ROI to be extracted in the voxel A of the reference model A. grid Search in, extract the difference points, and merge the difference points to obtain the difference result Diff.

Citation Information

Patent Citations

  • Building three-dimensional change information extraction and semantic recognition method and terminal

    CN112381947A

  • Computer readable recording medium storing difference emphasizing program, difference emphasizing method, and difference emphasizing apparatus

    US20090110297A1