[go: up one dir, main page]

CN114820985A - A three-dimensional mesh model differentiation method, device, equipment and storage medium - Google Patents

A three-dimensional mesh model differentiation method, device, equipment and storage medium Download PDF

Info

Publication number
CN114820985A
CN114820985A CN202210483477.4A CN202210483477A CN114820985A CN 114820985 A CN114820985 A CN 114820985A CN 202210483477 A CN202210483477 A CN 202210483477A CN 114820985 A CN114820985 A CN 114820985A
Authority
CN
China
Prior art keywords
model
bounding box
difference
grid
voxel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210483477.4A
Other languages
Chinese (zh)
Other versions
CN114820985B (en
Inventor
林小平
李森林
庞晨
林伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hansf Hangzhou Medical Technology Co ltd
Original Assignee
Hansf Hangzhou Medical Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hansf Hangzhou Medical Technology Co ltd filed Critical Hansf Hangzhou Medical Technology Co ltd
Priority to CN202210483477.4A priority Critical patent/CN114820985B/en
Publication of CN114820985A publication Critical patent/CN114820985A/en
Application granted granted Critical
Publication of CN114820985B publication Critical patent/CN114820985B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Generation (AREA)

Abstract

The invention relates to the computer graphic processing technology, and discloses a method, a device, equipment and a storage medium for solving the difference of a three-dimensional grid model; a three-dimensional grid model difference solving method is characterized in that a reference model A and an extraction model B are registered; respectively calculating the point cloud density and the bounding box of the registered model to obtain the point cloud density avg of the reference model A A And the point cloud density avg of bounding box ABox and extraction model B B And a bounding box BBox, and dividing the voxels of the reference model to obtain A grid (ii) a Determining a region ROI to be extracted according to the bounding box of the reference model A and the bounding box of the extraction model B; the point of the ROI of the region to be extracted is positioned at the voxel A of the reference model A grid The difference points are searched and combined to obtain a difference result Diff. The invention can be used for the non-closed modelOr different point cloud sampling densities, or three-dimensional models with different patch numbers are differentiated without precision loss.

Description

一种三维网格模型求异方法、装置、设备和存储介质A three-dimensional mesh model differentiation method, device, equipment and storage medium

技术领域technical field

本发明涉及计算机图形处理技术,尤其涉及了一种三维网格模型求异方法、装置、设备和存储介质。The invention relates to computer graphics processing technology, in particular to a method, device, equipment and storage medium for differentiating a three-dimensional mesh model.

背景技术Background technique

三维模型可以由点云数据以及连接这些三维点形成的三角面片来表示表面信息,通过传感器对物体进行扫描可以得到物体的三维模型,传感器种类多样,如视觉传感器,计算机断层扫描等,通过不同设备所获取的相同物体的三维模型其可能是非闭合模型(如3D扫描牙颌模型),或具有不同的点云密度以及面片数量。The 3D model can represent surface information by point cloud data and triangular patches formed by connecting these 3D points. The 3D model of the object can be obtained by scanning the object with sensors. There are various types of sensors, such as vision sensors, computed tomography, etc. The 3D model of the same object acquired by the device may be a non-closed model (such as a 3D scanned tooth and jaw model), or have different point cloud densities and number of patches.

如现有技术,计算机和数学应用技术70(2015)1235-1254中的文章“一般3d网格的精确、稳健、高效的正则化布尔值”其公开了在三维模型处理中,为了获取两个模型间的差异部分,采用布尔运算实现,布尔运算要求网格闭合并且可定向(有法向),对于上述一中提到的非闭合模型并不适用,闭合模型在执行布尔运算过程中,对边界网格往往需要进行三角剖分来确定相交边界,会改变现有网格结构,导致精度退化。As in the prior art, the article "Accurate, Robust, Efficient Regularization of Boolean Values for General 3D Grids" in Computer and Mathematical Applications Technology 70 (2015) 1235-1254 discloses that in 3D model processing, in order to obtain two The difference between the models is realized by Boolean operation. The Boolean operation requires the grid to be closed and oriented (with normal direction). It is not applicable to the non-closed model mentioned in the above one. During the Boolean operation of the closed model, the Boundary meshes often require triangulation to determine intersecting boundaries, which can change the existing mesh structure and cause accuracy degradation.

发明内容SUMMARY OF THE INVENTION

本发明针对现有技术中非闭合模型并不适用,在执行布尔运算过程中,对边界网格往往需要进行三角剖分来确定相交边界,会改变现有网格结构,导致精度退化的问题,提供了一种三维网格模型求异方法、装置、设备和存储介质。The present invention is not applicable to the non-closed model in the prior art. In the process of executing the Boolean operation, the boundary grid often needs to be triangulated to determine the intersecting boundary, which will change the existing grid structure and cause the problem of precision degradation. Provided are a method, apparatus, device and storage medium for differentiating a three-dimensional mesh model.

为了解决上述技术问题,本发明通过下述技术方案得以解决:In order to solve the above-mentioned technical problems, the present invention is solved by the following technical solutions:

一种三维网格模型求异方法,模型包括基准模型A和提取模型B,其方法包括:A method for differentiating a three-dimensional mesh model, the model includes a reference model A and an extraction model B, and the method includes:

模型的配准,对基准模型A和提取模型B进行配准,使得基准模型A和提取模型B对齐,基准模型A和提取模型B相同区域重叠;For model registration, the reference model A and the extraction model B are registered, so that the reference model A and the extraction model B are aligned, and the same area of the reference model A and the extraction model B overlaps;

点云密度及包围盒的计算,对于配准后的基准模型A和提取模型B分别进行点云密度及包围盒的计算,获得基准模型A的点云密度avgA及包围盒ABox和提取模型B的点云密度avgB及包围盒BBox;Calculation of point cloud density and bounding box, the point cloud density and bounding box are calculated for the registered reference model A and extraction model B, respectively, to obtain the point cloud density avg A of the reference model A, the bounding box ABox and the extraction model B The point cloud density avg B and the bounding box BBox;

基准模型A的体素获取Agrid,对基准模型进行体素划分获得AgridThe voxels of the benchmark model A are obtained A grid , and the voxels of the benchmark model are divided to obtain A grid ;

确定待提取区域ROI,依据基准模型A的包围盒和提取模型B的包围盒,确定待提取区域ROI;Determine the ROI of the region to be extracted, and determine the ROI of the region to be extracted according to the bounding box of the benchmark model A and the bounding box of the extraction model B;

求异结果Diff的获取,将待提取区域ROI的点在基准模型A的体素Agrid中进行查找,提取差异点,并对差异点进行合并从而获得求异结果Diff。To obtain the difference result Diff, the points of the ROI of the region to be extracted are searched in the voxel A grid of the benchmark model A, the difference points are extracted, and the difference points are merged to obtain the difference result Diff.

作为优选,模型的配准包括精细配准和粗配准;精配准通过ICP方法进行精配准。Preferably, the registration of the model includes fine registration and coarse registration; the fine registration is performed by the ICP method.

作为优选,包围盒的计算方法包括:Preferably, the calculation method of the bounding box includes:

获取基准模型A中的所有点组成点集PA,其中每一个点均包含X,Y,Z三个坐标分量;Obtain all points in the benchmark model A to form a point set P A , each of which contains three coordinate components of X, Y, and Z;

在PA中随机选取点Pa1和点Pa2,计算模型A的初始外部包围盒minPABox、maxPABoxRandomly select points P a1 and P a2 in P A , and calculate the initial outer bounding boxes minP ABox and maxP ABox of model A;

minPABox = min(Pa1,Pa2minP ABox = min(P a1 , P a2 )

maxPABox = max(Pa1,Pa2maxP ABox = max(P a1 , P a2 )

其中,max表示两点中数值最大的XYZ坐标值为返回值; min表示两点中数值最小的XYZ坐标值为返回值;Among them, max represents the XYZ coordinate value with the largest value among the two points as the return value; min represents the XYZ coordinate value with the smallest value among the two points as the return value;

遍历点集PA中每一点Pa, 更新minPABox和maxPABox坐标;Traverse each point P a in the point set P A , and update the minP ABox and maxP ABox coordinates;

minPABox = min(minPABox,Pa);minP ABox = min(minP ABox , P a );

maxPABox = max(maxPABox,Pa);maxP ABox = max(maxP ABox , P a );

从而获取基准模型A包围盒ABox;Thereby, the bounding box ABox of the benchmark model A is obtained;

获取提取模型B中的所有点组成点集PB,其中每一个点均包含X,Y,Z三个坐标分量;Obtain all points in the extraction model B to form a point set P B , each of which contains three coordinate components of X, Y, and Z;

在PB中随机选取点Pb1和点Pb2,计算模型A的初始外部包围盒minPBBox、maxPBBoxRandomly select points P b1 and P b2 in P B , and calculate the initial outer bounding boxes minP BBox and maxP BBox of model A;

minPBBox = min(Pb1,Pb2minP BBox = min(P b1 , P b2 )

maxPBBox = max(Pb1,Pb2maxP BBox = max(P b1 , P b2 )

其中,max表示两点中数值最大的XYZ坐标值为返回值; min表示两点中数值最小的XYZ坐标值为返回值;Among them, max represents the XYZ coordinate value with the largest value among the two points as the return value; min represents the XYZ coordinate value with the smallest value among the two points as the return value;

遍历点集PB中每一点Pb, 更新minPBBox和maxPBBox坐标;Traverse each point P b in the point set P B , update the minP BBox and maxP BBox coordinates;

minPBBox = min(minPBBox,Pb);minP BBox = min(minP BBox , P b );

maxPBBox = max(maxPBBox,Pb);maxP BBox = max(maxP BBox , P b );

从而获取基准模型B包围盒BBox。Thereby, the bounding box BBox of the benchmark model B is obtained.

作为优选,基准模型A的点云密度avgA和提取模型B的点云密度avgB的计算方法为,Preferably, the calculation method of the point cloud density avg A of the reference model A and the point cloud density avg B of the extraction model B is,

avgA= ∑A_edge_len/A_edge_num;avg A = ∑A_edge_len/A_edge_num;

avgB=∑B_edge_len/B_edge_num;avg B =∑B_edge_len/B_edge_num;

其中,A_edge_len为基准模型A中一边的边长,A_edge_num为基准模型A中边的总数量; B_edge_len为提取模型B中一边的边长,B_edge_num为提取模型B中边的总数量。Among them, A_edge_len is the edge length of one side in benchmark model A, A_edge_num is the total number of edges in benchmark model A; B_edge_len is the edge length of one side in extraction model B, and B_edge_num is the total number of edges in extraction model B.

作为优选,基准模型A的体素获取Agrid包括;Preferably, the voxel acquisition A grid of the reference model A includes;

体素分辨率Resolution的确定,基准模型A的点云密度avgA和提取模型B的点云密度avgB中较大的值乘以第一阈值th;For the determination of the voxel resolution, the larger value of the point cloud density avg A of the reference model A and the point cloud density avg B of the extraction model B is multiplied by the first threshold th;

Resolution=th*max(avgA,avgB);Resolution=th*max(avg A , avg B );

包围盒ABox在X、Y、Z三个方向上长度与体素分辨率Resolution做除法并取整,从而得到体素栅格数量,体素分辨率分别为(nx,ny,nz);nx为X方向上的体素分辨率,ny为Y方向上的体素分辨率,nz为Z方向上的体素分辨率;体素AgridD的获取,AgridD=nx*ny*nzThe length of the bounding box A Box and the voxel resolution Resolution in the three directions of X, Y, and Z are divided and rounded to obtain the number of voxel grids. The voxel resolutions are (n x , ny , 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; acquisition of voxel A gridD , A gridD =n x *n y *n z .

作为优选,确定待提取区域ROI,确定差异方向,基准模型A包围盒和提取模型B包围盒的差异方向,依据差异方向提取差异模型Diff;对差异模型依据差异方向进行扩展,从而标记处待提取区域ROI。Preferably, the ROI of the region to be extracted is determined, the difference direction is determined, the difference direction between the bounding box of the reference model A and the bounding box of the extraction model B, and the difference model Diff is extracted according to the difference direction; the difference model is expanded according to the difference direction, so as to mark the place to be extracted Regional ROI.

作为优选,求异结果Diff的获取,计算栅格xyz的坐标;As a preference, obtain the difference result Diff, and calculate the coordinates of the grid xyz;

对ROI区域中一点P1和栅格a中任意一点P2,For a point P1 in the ROI area and any point P2 in the grid a,

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

其中,dist表示两输入点间欧氏距离,P1N和P2N为P1和P2点的法三维向量;dist_th和normal_th为阈值。Among them, dist represents the Euclidean distance between two input points, P1N and P2N are the normal three-dimensional vectors of P1 and P2 points; dist_th and normal_th are the thresholds.

为了解决上述技术问题,本申请还提供了一种三维网格模型求异装置,其包括:In order to solve the above-mentioned technical problems, the present application also provides a three-dimensional mesh model differentiating device, which includes:

模型的配准模块,模型的配准模块用于对基准模型A和提取模型B进行配准,使得基准模型A和提取模型B对齐,基准模型A和提取模型B相同区域重叠;The registration module of the model, the registration module of the model is used to register the reference model A and the extraction model B, so that the reference model A and the extraction model B are aligned, and the same area of the reference model A and the extraction model B overlap;

点云密度及包围盒的计算模块,点云密度及包围盒的计算模块用于对于配准后的基准模型A和提取模型B分别进行点云密度及包围盒的计算,获得基准模型A的点云密度avgA及包围盒ABox和提取模型B的点云密度avgB及包围盒BBox;The calculation module of point cloud density and bounding box, the calculation module of point cloud density and bounding box is used to calculate the point cloud density and bounding box for the registered reference model A and extraction model B respectively, and obtain the point of reference model A. Cloud density avg A and bounding box ABox and point cloud density avg B and bounding box BBox of extraction model B;

基准模型A的体素获取Agrid模块,基准模型A的体素获取Agrid模块用于对基准模型进行体素划分获得AgridThe voxel of the benchmark model A obtains the A grid module, and the voxel of the benchmark model A obtains the A grid module for performing voxel division on the benchmark model to obtain the A grid ;

确定待提取区域ROI模块,确定待提取区域ROI模块依据基准模型A的包围盒和提取模型B的包围盒,确定待提取区域ROI;Determine the ROI module of the region to be extracted, and determine the ROI module of the region to be extracted according to the bounding box of the benchmark model A and the bounding box of the extraction model B, to determine the ROI of the region to be extracted;

求异结果Diff的获取模块,求异结果Diff的获取模块将待提取区域ROI的点在基准模型A的体素Agrid中进行查找,提取差异点,并对差异点进行合并从而获得求异结果Diff。The acquisition module of the difference result Diff, the acquisition module of the difference result Diff searches the point of the ROI of the region to be extracted in the voxel A grid of the benchmark model A, extracts the difference point, and merges the difference point to obtain the difference result diff.

为了解决上述技术问题,本申请还提供了一种三维网格模型求异设备,其通过三维网格模型求异方法实现的三维网格模型求异设备。In order to solve the above technical problems, the present application also provides a device for differentiating a three-dimensional mesh model, which is a device for obtaining a three-dimensional mesh model that is realized by a method for differentiating a three-dimensional mesh model.

为了解决上述技术问题,本申请还提供了一种存储介质,其通过三维网格模型求异方法实现的存储介质。In order to solve the above technical problems, the present application also provides a storage medium, which is a storage medium realized by a three-dimensional mesh model differentiation method.

本发明由于采用了以上技术方案,具有显著的技术效果:本发明能够对在非闭合模型或不同点云采样密度,或具有不同面片数量的三维模型求异并且无精度损失。Due to the adoption of the above technical solutions, the present invention has significant technical effects: the present invention can differentiate between non-closed models or different point cloud sampling densities, or three-dimensional models with different numbers of patches without loss of precision.

附图说明Description of drawings

图1是本发明的系统示意图;Fig. 1 is the system schematic diagram of the present invention;

图2是本发明的基准模型A的体素获取Agrid流程图;Fig. 2 is the voxel acquisition A grid flow chart of the benchmark model A of the present invention;

图3是本发明的包围盒的计算流程图;Fig. 3 is the calculation flow chart of the bounding box of the present invention;

图4是本发明的基准模型A图像一;Fig. 4 is the benchmark model A image one of the present invention;

图5是本发明的提取模型B图像一;Fig. 5 is the extraction model B image one of the present invention;

图6是本发明的diff模型图;Fig. 6 is the diff model figure of the present invention;

图7是本发明的diff模型图;Fig. 7 is the diff model figure of the present invention;

图8是本发明的基准模型A图像二;Fig. 8 is the benchmark model A image two of the present invention;

图9是本发明的提取模型B图像二。Fig. 9 is the second image of the extraction model B of the present invention.

具体实施方式Detailed ways

下面结合附图与实施例对本发明作进一步详细描述。The present invention will be described in further detail below with reference to the accompanying drawings and embodiments.

实施例1Example 1

一种三维网格模型求异方法,模型包括基准模型A和提取模型B,其方法包括:A method for differentiating a three-dimensional mesh model, the model includes a reference model A and an extraction model B, and the method includes:

模型的配准,对基准模型A和提取模型B进行配准,使得基准模型A和提取模型B对齐,基准模型A和提取模型B相同区域重叠;For model registration, the reference model A and the extraction model B are registered, so that the reference model A and the extraction model B are aligned, and the same area of the reference model A and the extraction model B overlaps;

点云密度及包围盒的计算,对于配准后的基准模型A和提取模型B分别进行点云密度及包围盒的计算,获得基准模型A的点云密度avgA及包围盒ABox和提取模型B的点云密度avgB及包围盒BBox;Calculation of point cloud density and bounding box, the point cloud density and bounding box are calculated for the registered reference model A and extraction model B, respectively, to obtain the point cloud density avg A of the reference model A, the bounding box ABox and the extraction model B The point cloud density avg B and the bounding box BBox;

基准模型A的体素获取Agrid,对基准模型进行体素划分获得AgridThe voxels of the benchmark model A are obtained A grid , and the voxels of the benchmark model are divided to obtain A grid ;

确定待提取区域ROI,依据基准模型A的包围盒和提取模型B的包围盒,确定待提取区域ROI;Determine the ROI of the region to be extracted, and determine the ROI of the region to be extracted according to the bounding box of the benchmark model A and the bounding box of the extraction model B;

求异结果Diff的获取,将待提取区域ROI的点在基准模型A的体素Agrid中进行查找,提取差异点,并对差异点进行合并从而获得求异结果Diff。To obtain the difference result Diff, the points of the ROI of the region to be extracted are searched in the voxel A grid of the benchmark model A, the difference points are extracted, and the difference points are merged to obtain the difference result Diff.

模型的配准包括精细配准和粗配准;精配准通过ICP方法进行精配准。The registration of the model includes fine registration and coarse registration; fine registration is performed by the ICP method.

包围盒的计算方法包括:The calculation methods of the bounding box include:

获取基准模型A中的所有点组成点集PA,其中每一个点均包含X,Y,Z三个坐标分量;Obtain all points in the benchmark model A to form a point set P A , each of which contains three coordinate components of X, Y, and Z;

在PA中随机选取点Pa1和点Pa2,计算模型A的初始外部包围盒minPABox、maxPABoxRandomly select points P a1 and P a2 in P A , and calculate the initial outer bounding boxes minP ABox and maxP ABox of model A;

minPABox = min(Pa1,Pa2minP ABox = min(P a1 , P a2 )

maxPABox = max(Pa1,Pa2maxP ABox = max(P a1 , P a2 )

其中,max表示两点中数值最大的XYZ坐标值为返回值; min表示两点中数值最小的XYZ坐标值为返回值;Among them, max represents the XYZ coordinate value with the largest value among the two points as the return value; min represents the XYZ coordinate value with the smallest value among the two points as the return value;

遍历点集PA中每一点Pa, 更新minPABox和maxPABox坐标;Traverse each point P a in the point set P A , and update the minP ABox and maxP ABox coordinates;

minPABox = min(minPABox,Pa);minP ABox = min(minP ABox , P a );

maxPABox = max(maxPABox,Pa);maxP ABox = max(maxP ABox , P a );

从而获取基准模型A包围盒ABox;Thereby, the bounding box ABox of the benchmark model A is obtained;

获取提取模型B中的所有点组成点集PB,其中每一个点均包含X,Y,Z三个坐标分量;Obtain all points in the extraction model B to form a point set P B , each of which contains three coordinate components of X, Y, and Z;

在PB中随机选取点Pb1和点Pb2,计算模型A的初始外部包围盒minPBBox、maxPBBoxRandomly select points P b1 and P b2 in P B , and calculate the initial outer bounding boxes minP BBox and maxP BBox of model A;

minPBBox = min(Pb1,Pb2minP BBox = min(P b1 , P b2 )

maxPBBox = max(Pb1,Pb2maxP BBox = max(P b1 , P b2 )

其中,max表示两点中数值最大的XYZ坐标值为返回值; min表示两点中数值最小的XYZ坐标值为返回值;Among them, max represents the XYZ coordinate value with the largest value among the two points as the return value; min represents the XYZ coordinate value with the smallest value among the two points as the return value;

遍历点集PB中每一点Pb, 更新minPBBox和maxPBBox坐标;Traverse each point P b in the point set P B , update the minP BBox and maxP BBox coordinates;

minPBBox = min(minPBBox,Pb);minP BBox = min(minP BBox , P b );

maxPBBox = max(maxPBBox,Pb);maxP BBox = max(maxP BBox , P b );

从而获取基准模型B包围盒BBox。Thereby, the bounding box BBox of the benchmark model B is obtained.

基准模型A的点云密度avgA和提取模型B的点云密度avgB的计算方法为,The calculation method of the point cloud density avg A of the benchmark model A and the point cloud density avg B of the extraction model B is,

avgA= ∑A_edge_len/A_edge_num;avg A = ∑A_edge_len/A_edge_num;

avgB=∑B_edge_len/B_edge_num;avg B =∑B_edge_len/B_edge_num;

其中,A_edge_len为基准模型A中一边的边长,A_edge_num为基准模型A中边的总数量; B_edge_len为提取模型B中一边的边长,B_edge_num为提取模型B中边的总数量。Among them, A_edge_len is the edge length of one side in benchmark model A, A_edge_num is the total number of edges in benchmark model A; B_edge_len is the edge length of one side in extraction model B, and B_edge_num is the total number of edges in extraction model B.

基准模型A的体素获取Agrid包括;The voxel acquisition A grid of the benchmark model A includes;

体素分辨率Resolution的确定,基准模型A的点云密度avgA和提取模型B的点云密度avgB中较大的值乘以第一阈值th;For the determination of the voxel resolution, the larger value of the point cloud density avg A of the reference model A and the point cloud density avg B of the extraction model B is multiplied by the first threshold th;

Resolution=th*max(avgA,avgB);Resolution=th*max(avg A , avg B );

包围盒ABox在X、Y、Z三个方向上长度与体素分辨率Resolution做除法并取整,从而得到体素栅格数量,体素分辨率分别为(nx,ny,nz);nx为X方向上的体素分辨率,ny为Y方向上的体素分辨率,nz为Z方向上的体素分辨率;体素AgridD的获取,AgridD=nx*ny*nzThe length of the bounding box A Box and the voxel resolution Resolution in the three directions of X, Y, and Z are divided and rounded to obtain the number of voxel grids. The voxel resolutions are (n x , ny , 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; acquisition of voxel A gridD , A gridD =n x *n y *n z .

确定待提取区域ROI,确定差异方向,基准模型A包围盒和提取模型B包围盒的差异方向,依据差异方向提取差异模型Diff;对差异模型依据差异方向进行扩展,从而标记处待提取区域ROI。Determine the ROI of the region 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, and extract the difference model Diff according to the difference direction; expand the difference model according to the difference direction, so as to mark the ROI of the region to be extracted.

求异结果Diff的获取,计算栅格xyz的坐标;Obtain the difference result Diff, and calculate the coordinates of the grid xyz;

对ROI区域中一点P1和栅格a中任意一点P2,For a point P1 in the ROI area and any point P2 in the grid a,

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

其中,dist表示两输入点间欧氏距离,P1N和P2N为P1和P2点的法三维向量;dist_th和normal_th为阈值。Among them, dist represents the Euclidean distance between two input points, P1N and P2N are the normal three-dimensional vectors of P1 and P2 points; dist_th and normal_th are the thresholds.

实施例2Example 2

在实施例1基础上,本实施例提供了一种三维网格模型求异装置,其包括:On the basis of Embodiment 1, this embodiment provides a three-dimensional mesh model differentiating device, which includes:

模型的配准模块,模型的配准模块用于对基准模型A和提取模型B进行配准,使得基准模型A和提取模型B对齐,基准模型A和提取模型B相同区域重叠;The registration module of the model, the registration module of the model is used to register the reference model A and the extraction model B, so that the reference model A and the extraction model B are aligned, and the same area of the reference model A and the extraction model B overlap;

点云密度及包围盒的计算模块,点云密度及包围盒的计算模块用于对于配准后的基准模型A和提取模型B分别进行点云密度及包围盒的计算,获得基准模型A的点云密度avgA及包围盒ABox和提取模型B的点云密度avgB及包围盒BBox;The calculation module of point cloud density and bounding box, the calculation module of point cloud density and bounding box is used to calculate the point cloud density and bounding box for the registered reference model A and extraction model B respectively, and obtain the point of reference model A. Cloud density avg A and bounding box ABox and point cloud density avg B of extraction model B and bounding box BBox;

基准模型A的体素获取Agrid模块,基准模型A的体素获取Agrid模块用于对基准模型进行体素划分获得AgridThe voxel of the benchmark model A obtains the A grid module, and the voxel of the benchmark model A obtains the A grid module for performing voxel division on the benchmark model to obtain the A grid ;

确定待提取区域ROI模块,确定待提取区域ROI模块依据基准模型A的包围盒和提取模型B的包围盒,确定待提取区域ROI;Determine the ROI module of the region to be extracted, and determine the ROI module of the region to be extracted according to the bounding box of the benchmark model A and the bounding box of the extraction model B, to determine the ROI of the region to be extracted;

求异结果Diff的获取模块,求异结果Diff的获取模块将待提取区域ROI的点在基准模型A的体素Agrid中进行查找,提取差异点,并对差异点进行合并从而获得求异结果Diff。The acquisition module of the difference result Diff, the acquisition module of the difference result Diff searches the point of the ROI of the region to be extracted in the voxel A grid of the benchmark model A, extracts the difference point, and merges the difference point to obtain the difference result diff.

实施例3Example 3

在实施例1基础上,本实施例提供了一种三维网格模型求异设备,其通过三维网格模型求异方法实现的三维网格模型求异设备。On the basis of Embodiment 1, this embodiment provides a three-dimensional mesh model differentiation device, which is a three-dimensional mesh model differentiation device realized by a three-dimensional mesh model differentiation method.

实施例4Example 4

在实施例1基础上,本实施例提供了一种存储介质,其通过三维网格模型求异方法实现的存储介质。On the basis of Embodiment 1, this embodiment provides a storage medium, which is a storage medium implemented by a three-dimensional mesh model differentiation method.

实施例5Example 5

在上述实施例基础上,本实施例如图4基准模型A 点数为50922,图5提取模型B点数为210099;通过对其进行求异从而得到diff模型图,如图6和图7。On the basis of the above embodiment, in this embodiment, the number of points in the reference model A in FIG. 4 is 50922, and the number of points in the extracted model B in FIG. 5 is 210099;

实施例6Example 6

在上述实施例基础上,本实施例图8基准模型A 点数为50922,图9提取模型B点数为210099;通过对其进行求异从而得到diff模型图。On the basis of the above embodiment, in this embodiment, the number of points of the reference model A in FIG. 8 is 50922, and the number of points of the extracted model B in FIG. 9 is 210099; the diff model diagram is obtained by differentiating them.

Claims (10)

1.一种三维网格模型求异方法,模型包括基准模型A和提取模型B,其方法包括:1. a three-dimensional mesh model differentiation method, the model comprises a reference model A and an extraction model B, and its method comprises: 模型的配准,对基准模型A和提取模型B进行配准,使得基准模型A和提取模型B对齐,基准模型A和提取模型B相同区域重叠;For model registration, the reference model A and the extraction model B are registered, so that the reference model A and the extraction model B are aligned, and the same area of the reference model A and the extraction model B overlaps; 点云密度及包围盒的计算,对于配准后的基准模型A和提取模型B分别进行点云密度及包围盒的计算,获得基准模型A的点云密度avgA及包围盒ABox和提取模型B的点云密度avgB及包围盒BBox;Calculation of point cloud density and bounding box, the point cloud density and bounding box are calculated for the registered reference model A and extraction model B, respectively, to obtain the point cloud density avg A of the reference model A, the bounding box ABox and the extraction model B The point cloud density avg B and the bounding box BBox; 基准模型A的体素获取Agrid,对基准模型进行体素划分获得AgridThe voxels of the benchmark model A are obtained A grid , and the voxels of the benchmark model are divided to obtain A grid ; 确定待提取区域ROI,依据基准模型A的包围盒和提取模型B的包围盒,确定待提取区域ROI;Determine the ROI of the region to be extracted, and determine the ROI of the region to be extracted according to the bounding box of the benchmark model A and the bounding box of the extraction model B; 求异结果Diff的获取,将待提取区域ROI的点在基准模型A的体素Agrid中进行查找,提取差异点,并对差异点进行合并从而获得求异结果Diff。To obtain the difference result Diff, the points of the ROI of the region to be extracted are searched in the voxel A grid of the benchmark model A, the difference points are extracted, and the difference points are merged to obtain the difference result Diff. 2.根据权利要求1所述的一种三维网格模型求异方法,其特征在于,模型的配准包括精细配准和粗配准;精配准通过ICP方法进行精配准。2 . The method for differentiating a three-dimensional grid model according to claim 1 , wherein the registration of the models includes fine registration and coarse registration; and the fine registration is performed by the ICP method. 3 . 3.根据权利要求1所述的一种三维网格模型求异方法,其特征在于,包围盒的计算方法包括:3. a kind of three-dimensional mesh model differentiating method according to claim 1, is characterized in that, the calculation method of bounding box comprises: 获取基准模型A中的所有点组成点集PA,其中每一个点均包含X,Y,Z三个坐标分量;Obtain all points in the benchmark model A to form a point set P A , each of which contains three coordinate components of X, Y, and Z; 在PA中随机选取点Pa1和点Pa2,计算模型A的初始外部包围盒minPABox、maxPABoxRandomly select points P a1 and P a2 in P A , and calculate the initial outer bounding boxes minP ABox and maxP ABox of model A; minPABox = min(Pa1,Pa2minP ABox = min(P a1 , P a2 ) maxPABox = max(Pa1,Pa2maxP ABox = max(P a1 , P a2 ) 其中,max表示两点中数值最大的XYZ坐标值为返回值; min表示两点中数值最小的XYZ坐标值为返回值;Among them, max represents the XYZ coordinate value with the largest value among the two points as the return value; min represents the XYZ coordinate value with the smallest value among the two points as the return value; 遍历点集PA中每一点Pa, 更新minPABox和maxPABox坐标;Traverse each point P a in the point set P A , and update the minP ABox and maxP ABox coordinates; minPABox = min(minPABox,Pa);minP ABox = min(minP ABox , P a ); maxPABox = max(maxPABox,Pa);maxP ABox = max(maxP ABox , P a ); 从而获取基准模型A包围盒ABox;Thereby, the bounding box ABox of the benchmark model A is obtained; 获取提取模型B中的所有点组成点集PB,其中每一个点均包含X,Y,Z三个坐标分量;Obtain all points in the extraction model B to form a point set P B , each of which contains three coordinate components of X, Y, and Z; 在PB中随机选取点Pb1和点Pb2,计算模型A的初始外部包围盒minPBBox、maxPBBoxRandomly select points P b1 and P b2 in P B , and calculate the initial outer bounding boxes minP BBox and maxP BBox of model A; minPBBox = min(Pb1,Pb2minP BBox = min(P b1 , P b2 ) maxPBBox = max(Pb1,Pb2maxP BBox = max(P b1 , P b2 ) 其中,max表示两点中数值最大的XYZ坐标值为返回值; min表示两点中数值最小的XYZ坐标值为返回值;Among them, max represents the XYZ coordinate value with the largest value among the two points as the return value; min represents the XYZ coordinate value with the smallest value among the two points as the return value; 遍历点集PB中每一点Pb, 更新minPBBox和maxPBBox坐标;Traverse each point P b in the point set P B , update the minP BBox and maxP BBox coordinates; minPBBox = min(minPBBox,Pb);minP BBox = min(minP BBox , P b ); maxPBBox = max(maxPBBox,Pb);maxP BBox = max(maxP BBox , P b ); 从而获取基准模型B包围盒BBox。Thereby, the bounding box BBox of the benchmark model B is obtained. 4.根据权利要求1所述的一种三维网格模型求异方法,其特征在于,基准模型A的点云密度avgA和提取模型B的点云密度avgB的计算方法为,4. a kind of three-dimensional grid model differentiating method according to claim 1 is characterized in that, the calculation method of the point cloud density avg A of reference model A and the point cloud density avg B of extraction model B is, avgA= ∑A_edge_len/A_edge_num;avg A = ∑A_edge_len/A_edge_num; avgB=∑B_edge_len/B_edge_num;avg B =∑B_edge_len/B_edge_num; 其中,A_edge_len为基准模型A中一边的边长,A_edge_num为基准模型A中边的总数量;B_edge_len为提取模型B中一边的边长,B_edge_num为提取模型B中边的总数量。Among them, A_edge_len is the edge length of one side in benchmark model A, A_edge_num is the total number of edges in benchmark model A; B_edge_len is the edge length of one side in extraction model B, and B_edge_num is the total number of edges in extraction model B. 5.根据权利要求1所述的一种三维网格模型求异方法,其特征在于,基准模型A的体素获取Agrid包括;5. a kind of three-dimensional grid model differentiation method according to claim 1, is characterized in that, the voxel acquisition A grid of reference model A comprises; 体素分辨率Resolution的确定,基准模型A的点云密度avgA和提取模型B的点云密度avgB中较大的值乘以第一阈值th;For the determination of the voxel resolution, the larger value of the point cloud density avg A of the reference model A and the point cloud density avg B of the extraction model B is multiplied by the first threshold th; Resolution=th*max(avgA,avgB);Resolution=th*max(avg A , avg B ); 包围盒ABox在X、Y、Z三个方向上长度与体素分辨率Resolution做除法并取整,从而得到体素栅格数量,体素分辨率分别为(nx,ny,nz);nx为X方向上的体素分辨率,ny为Y方向上的体素分辨率,nz为Z方向上的体素分辨率;体素AgridD的获取,AgridD=nx*ny*nzThe length of the bounding box A Box and the voxel resolution Resolution in the three directions of X, Y, and Z are divided and rounded to obtain the number of voxel grids. The voxel resolutions are (n x , ny , 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; acquisition of voxel A gridD , A gridD =n x *n y *n z . 6.根据权利要求1所述的一种三维网格模型求异方法,其特征在于,确定待提取区域ROI,确定差异方向,基准模型A包围盒和提取模型B包围盒的差异方向,依据差异方向提取差异模型Diff;对差异模型依据差异方向进行扩展,从而标记处待提取区域ROI,若差异方向不存在,标记提取模型B为待提取区域ROI。6. a kind of three-dimensional grid model differentiating method according to claim 1, is characterized in that, determining the region ROI to be extracted, determining the difference direction, the difference direction of the bounding box of the reference model A and the bounding box of the extraction model B, according to the difference Extract the difference model Diff in the direction; expand the difference model according to the difference direction, so as to mark the ROI of the region to be extracted. If the difference direction does not exist, mark the extraction model B as the ROI of the region to be extracted. 7.根据权利要求1所述的一种三维网格模型求异方法,其特征在于,求异结果Diff的获取,计算栅格xyz的坐标;7. a kind of three-dimensional grid model difference method according to claim 1 is characterized in that, the acquisition of difference result Diff calculates the coordinates of grid xyz; 对ROI区域中一点P1和体素AgridD中栅格a中任意一点P2,For a point P1 in the ROI area and any point P2 in grid a in voxel A gridD , dist(P1, P2) >dist_th&& P1N * P2N <normal_th,dist(P1, P2) >dist_th&& P1N * P2N <normal_th, 其中,dist表示两输入点间欧氏距离,P1N和P2N为P1和P2点的法三维向量;dist_th和normal_th为阈值。Among them, dist represents the Euclidean distance between two input points, P1N and P2N are the normal three-dimensional vectors of P1 and P2 points; dist_th and normal_th are the thresholds. 8.一种三维网格模型求异装置,其特征在于包括:8. A three-dimensional mesh model differentiating device is characterized in that comprising: 模型的配准模块,模型的配准模块用于对基准模型A和提取模型B进行配准,使得基准模型A和提取模型B对齐,基准模型A和提取模型B相同区域重叠;The registration module of the model, the registration module of the model is used to register the reference model A and the extraction model B, so that the reference model A and the extraction model B are aligned, and the same area of the reference model A and the extraction model B overlap; 点云密度及包围盒的计算模块,点云密度及包围盒的计算模块用于对于配准后的基准模型A和提取模型B分别进行点云密度及包围盒的计算,获得基准模型A的点云密度avgA及包围盒ABox和提取模型B的点云密度avgB及包围盒BBox;The calculation module of point cloud density and bounding box, the calculation module of point cloud density and bounding box is used to calculate the point cloud density and bounding box for the registered reference model A and extraction model B respectively, and obtain the point of reference model A. Cloud density avg A and bounding box ABox and point cloud density avg B of extraction model B and bounding box BBox; 基准模型A的体素获取Agrid模块,基准模型A的体素获取Agrid模块用于对基准模型进行体素划分获得AgridThe voxel of the benchmark model A obtains the A grid module, and the voxel of the benchmark model A obtains the A grid module for performing voxel division on the benchmark model to obtain the A grid ; 确定待提取区域ROI模块,确定待提取区域ROI模块依据基准模型A的包围盒和提取模型B的包围盒,确定待提取区域ROI;Determine the ROI module of the region to be extracted, and determine the ROI module of the region to be extracted according to the bounding box of the benchmark model A and the bounding box of the extraction model B, to determine the ROI of the region to be extracted; 求异结果Diff的获取模块,求异结果Diff的获取模块将待提取区域ROI的点在基准模型A的体素Agrid中进行查找,提取差异点,并对差异点进行合并从而获得求异结果Diff。The acquisition module of the difference result Diff, the acquisition module of the difference result Diff searches the point of the ROI of the region to be extracted in the voxel A grid of the benchmark model A, extracts the difference point, and merges the difference point to obtain the difference result diff. 9.一种三维网格模型求异设备,其特征在于,通过权利要求1-6任一所述的三维网格模型求异方法实现的三维网格模型求异设备。9 . A three-dimensional grid model differentiation device, characterized in that it is a three-dimensional grid model differentiation device realized by the three-dimensional grid model differentiation method according to any one of claims 1 to 6 . 10 . 10.一种存储介质,其特征在于,通过权利要求1-6任一所述的三维网格模型求异方法实现的存储介质。10. A storage medium, characterized in that it is a storage medium realized by the method for differentiating a three-dimensional mesh model according to any one of claims 1-6.
CN202210483477.4A 2022-05-06 2022-05-06 A three-dimensional mesh model difference finding method, device, equipment and storage medium Active CN114820985B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210483477.4A CN114820985B (en) 2022-05-06 2022-05-06 A three-dimensional mesh model difference finding method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210483477.4A CN114820985B (en) 2022-05-06 2022-05-06 A three-dimensional mesh model difference finding method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114820985A true CN114820985A (en) 2022-07-29
CN114820985B CN114820985B (en) 2025-02-21

Family

ID=82511969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210483477.4A Active CN114820985B (en) 2022-05-06 2022-05-06 A three-dimensional mesh model difference finding method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114820985B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090110297A1 (en) * 2007-10-25 2009-04-30 Fujitsu Limited Computer readable recording medium storing difference emphasizing program, difference emphasizing method, and difference emphasizing apparatus
US20090160852A1 (en) * 2007-12-19 2009-06-25 Hong Fu Jin Precision Industry (Shenzhen) Co., Ltd. System and method for measuring a three-dimensional object
US9600929B1 (en) * 2014-12-01 2017-03-21 Ngrain (Canada) Corporation System, computer-readable medium and method for 3D-differencing of 3D voxel models
CN112381947A (en) * 2021-01-18 2021-02-19 深圳大学 Method and terminal for extracting three-dimensional change information of building and recognizing semantics
US20220005260A1 (en) * 2018-11-05 2022-01-06 Twikit Nv System for determining visually relevant design differences between 3d models

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090110297A1 (en) * 2007-10-25 2009-04-30 Fujitsu Limited Computer readable recording medium storing difference emphasizing program, difference emphasizing method, and difference emphasizing apparatus
US20090160852A1 (en) * 2007-12-19 2009-06-25 Hong Fu Jin Precision Industry (Shenzhen) Co., Ltd. System and method for measuring a three-dimensional object
US9600929B1 (en) * 2014-12-01 2017-03-21 Ngrain (Canada) Corporation System, computer-readable medium and method for 3D-differencing of 3D voxel models
US20220005260A1 (en) * 2018-11-05 2022-01-06 Twikit Nv System for determining visually relevant design differences between 3d models
CN112381947A (en) * 2021-01-18 2021-02-19 深圳大学 Method and terminal for extracting three-dimensional change information of building and recognizing semantics

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周培;刘铭;王腾;杨欣;聂蓉梅;: "基于几何配准的三维模型几何比对方法研究", 图学学报, no. 04, 15 August 2016 (2016-08-15) *

Also Published As

Publication number Publication date
CN114820985B (en) 2025-02-21

Similar Documents

Publication Publication Date Title
CN107123164B (en) Three-dimensional reconstruction method and system for keeping sharp features
Mangan et al. Partitioning 3D surface meshes using watershed segmentation
Fan et al. Robust feature-preserving mesh denoising based on consistent subneighborhoods
CN107330903B (en) Skeleton extraction method of human point cloud model
US20100322496A1 (en) Method and system for anatomy structure segmentation and modeling in an image
CN116524219B (en) Barrier detection method based on laser radar point cloud clustering
US9715724B2 (en) Registration of CAD data with SEM images
Yogeswaran et al. 3d surface analysis for automated detection of deformations on automotive body panels
CN119445005A (en) A point cloud image fusion method based on vision
CN113781649B (en) Building plan generating method based on three-dimensional scanning point cloud
JP5620741B2 (en) Information processing apparatus, information processing method, and program
CN118196043A (en) A vehicle parts detection method based on machine vision and 3D point cloud fusion
Hildebrandt et al. Constraint-based fairing of surface meshes
Laycock et al. Aligning archive maps and extracting footprints for analysis of historic urban environments
CN114820985A (en) A three-dimensional mesh model differentiation method, device, equipment and storage medium
CN118070434B (en) Method and system for constructing process information model of automobile part
CN110490865B (en) Stud point cloud segmentation method based on high light reflection characteristic of stud
Yoshioka et al. Automatic segmentation and feature identification of laser scanning point cloud data for reverse engineering
Kudelski et al. 3D feature line detection based on vertex labeling and 2D skeletonization
Zabuawala et al. Fusion of LiDAR and aerial imagery for accurate building footprint extraction
CN115346019A (en) Method, device and system for measuring geometric parameters of point cloud circular holes
Bénière et al. Recovering primitives in 3D CAD meshes
CN112215867A (en) Point cloud data segmentation method, equipment, storage medium and device
Zhou et al. Incremental mesh-based integration of registered range images: Robust to registration error and scanning noise
CN119478011B (en) Automated method and device for measuring the volume of a stack

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant