CN108765572B - Triangulation method and system of plane point set in 3D scanning - Google Patents
Triangulation method and system of plane point set in 3D scanning Download PDFInfo
- Publication number
- CN108765572B CN108765572B CN201810553247.4A CN201810553247A CN108765572B CN 108765572 B CN108765572 B CN 108765572B CN 201810553247 A CN201810553247 A CN 201810553247A CN 108765572 B CN108765572 B CN 108765572B
- Authority
- CN
- China
- Prior art keywords
- triangle
- pointer
- target
- edge
- new
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three-dimensional [3D] modelling for computer graphics
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computer Graphics (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Generation (AREA)
Abstract
Description
技术领域technical field
本发明涉及三维重建技术领域,尤其涉及一种三维扫描中平面点集的三角剖分方法及系统。The present invention relates to the technical field of three-dimensional reconstruction, in particular to a triangulation method and system of a plane point set in three-dimensional scanning.
背景技术Background technique
三维重建的目的是建立一个虚拟的三维立体的事物,并给人一种十分真实的感觉,图像的三维重建融合了图像处理以及计算机几何学等知识,它拥有二维图形无法相比的功能,三维重建的对象可以从任意的角度直观地观察并且有十分真实的感觉,可以达到实时交互的功能。面对现代生产的快速发展和需求,三维重建可以用来减少设计成本,缩短设计周期,并且可以为社会带来庞大的经济效益。因此,三维重建是一个发展前途非常有吸引力的,使用范围广泛,并且具有很高的研究和使用价值的研究领域。The purpose of three-dimensional reconstruction is to create a virtual three-dimensional object and give people a very real feeling. The three-dimensional reconstruction of images integrates knowledge of image processing and computer geometry. It has functions that two-dimensional graphics cannot compare. The 3D reconstructed object can be observed intuitively from any angle and has a very real feeling, which can achieve the function of real-time interaction. Faced with the rapid development and demands of modern production, 3D reconstruction can be used to reduce design costs, shorten design cycles, and bring huge economic benefits to the society. Therefore, 3D reconstruction is a very attractive research field with a wide range of applications and high research and use value.
三角剖分理论是三维重建技术中最不可或缺的一部分,三维空间的三角剖分理论在三维重建技术快速发展的影响下,也得到了进一步的丰富和改善。目前,三角剖分存在多种不同的改进规范,其中常用的三角剖分改进标准有圆规范、最大/最小间隔规范、最大/最小角规范、最大/最小高规范、Thiessen规范等。这些规范的基本要点之一就是尽可能减少平面三角形出现太尖锐的情况。通过近似理论得知,三角曲面的近似差值与三角形的最小内角有关,特别需要的是提升逼近的准确性并减少出现过分尖锐的三角形,这在计算几何中十分必要。Delaunay三角剖分得到三角形所有内角里最小值比其他剖分都大,并且平均形态最规则等特征,故被数学家称为是最优三角剖分。Delaunay三角剖分不仅在二维空间中有着广泛的应用,在三维空间中也起着非常重要的作用,目前对于三维空间中的Delaunay三角形剖分算法的研究并不多,许多传统的三角形剖分算法只能够解决二维空间的问题,在三维空间中,三角剖分的许多问题并没有得到解决。Triangulation theory is the most indispensable part of 3D reconstruction technology. The triangulation theory of 3D space has been further enriched and improved under the influence of the rapid development of 3D reconstruction technology. At present, there are many different improvement specifications for triangulation, among which the commonly used triangulation improvement standards are circle specification, maximum/minimum interval specification, maximum/minimum angle specification, maximum/minimum height specification, Thiessen specification, etc. One of the basic points of these specifications is to minimize the occurrence of flat triangles that are too sharp. It is known from the approximation theory that the approximate difference of a triangular surface is related to the minimum interior angle of the triangle. It is particularly necessary to improve the accuracy of the approximation and reduce the appearance of excessively sharp triangles, which is very necessary in computational geometry. Delaunay triangulation obtains that the minimum value of all the interior angles of the triangle is larger than other triangulations, and the average shape is the most regular, so it is called the optimal triangulation by mathematicians. Delaunay triangulation is not only widely used in two-dimensional space, but also plays a very important role in three-dimensional space. At present, there are not many researches on Delaunay triangulation algorithm in three-dimensional space. Many traditional triangulation Algorithms can only solve problems in two-dimensional space, and in three-dimensional space, many problems of triangulation are not solved.
目前二维空间的Delaunay三角剖分已发展到一定的高度,但当需要插入大量顶点时,传统的Delaunay三角剖分算法的执行时间都太长,特别是当对过多散点数据进行处理时,耗费时间过长,不能够满足实时性的要求。At present, the Delaunay triangulation in two-dimensional space has developed to a certain height, but when a large number of vertices need to be inserted, the execution time of the traditional Delaunay triangulation algorithm is too long, especially when processing too many scattered data. , which takes too long to meet the real-time requirements.
发明内容SUMMARY OF THE INVENTION
本发明目的在于提供一种三维扫描中平面点集的三角剖分方法及系统,以提高三维扫描中平面点集的三角剖分速度,更好地满足三维重建的实时性需求。The purpose of the present invention is to provide a triangulation method and system of plane point sets in three-dimensional scanning, so as to improve the triangulation speed of plane point sets in three-dimensional scanning, and better meet the real-time requirements of three-dimensional reconstruction.
为实现上述目的,本发明提供了一种三维扫描中平面点集的三角剖分方法,包括以下步骤:In order to achieve the above object, the present invention provides a triangulation method for a plane point set in a three-dimensional scan, comprising the following steps:
S1:获取目标待重构物体的三维坐标点,将所述三维坐标点映射为平面点集,遍历所述平面点集构建包含所述平面点集内所有点的目标三角形;S1: Obtain the three-dimensional coordinate points of the target object to be reconstructed, map the three-dimensional coordinate points to a plane point set, and traverse the plane point set to construct a target triangle including all points in the plane point set;
S2:按逆时针的顺序为所述目标三角形标记第一顶点、第二顶点以及第三顶点,然后为所述第一顶点与所述第三顶点的连边分配第一边指针,为所述第二顶点与所述第三顶点的连边分配第二边指针,为所述第一顶点与所述第二顶点的连边分配第三边指针;S2: Mark the first vertex, the second vertex, and the third vertex for the target triangle in a counterclockwise order, and then assign a first edge pointer to the edge connecting the first vertex and the third vertex, and assign a first edge pointer to the A second edge pointer is allocated for the connection between the second vertex and the third vertex, and a third edge pointer is allocated for the connection between the first vertex and the second vertex;
S3:选取所述平面点集内的某个点作为插入点,分别连接所述插入点与所述目标三角形的各个顶点,得到剖分后顺序排列的新三角形,完成第一次三角剖分得到三角形网,删除被剖分的目标三角形,然后按照所述步骤S2所述的方法更新每个新三角形的边指针,并将所述新三角形按顺序存储在三角形链表中;S3: Select a certain point in the plane point set as the insertion point, connect the insertion point and the vertices of the target triangle respectively, obtain new triangles arranged in sequence after the division, and complete the first triangulation to obtain Triangle net, delete the divided target triangle, then update the edge pointer of each new triangle according to the method described in step S2, and store the new triangle in the triangle linked list in sequence;
S4:选取所述平面点集内另一个点作为插入点,根据该插入点与所述三角形链表中的首个三角形的边指针关系将该插入点插入到相应三角形中,将被插入的三角形视为新的目标三角形,分别连接所述插入点与所述目标三角形的各个顶点,完成对该目标三角形的剖分得到新三角形,并删除所述目标三角形以更新所述三角形网,同时更新每个三角形的边指针和所述三角形链表;然后依次判断每个所述新三角形是否符合Delaunay空圆规则,如果符合,则进入步骤S5,如果不符合,则调整所述新三角形的连边,直至所述新三角形符合Delaunay空圆规则后进入步骤S5;S4: Select another point in the plane point set as the insertion point, insert the insertion point into the corresponding triangle according to the edge pointer relationship between the insertion point and the first triangle in the triangle linked list, and view the inserted triangle as a For a new target triangle, connect the insertion point and each vertex of the target triangle respectively, complete the subdivision of the target triangle to obtain a new triangle, and delete the target triangle to update the triangle mesh, and update each The edge pointer of the triangle and the triangle linked list; then determine whether each of the new triangles conforms to the Delaunay empty circle rule in turn, if so, enter step S5, if not, adjust the connected sides of the new triangle until all After the new triangle conforms to the Delaunay empty circle rule, enter step S5;
S5:重复上述步骤S4,直至完成所有坐标点的插入,得到最后的三角形网实现对三维扫描中平面点集的三角剖分。S5: Repeat the above step S4 until the insertion of all coordinate points is completed, and a final triangular net is obtained to implement triangulation of the plane point set in the three-dimensional scanning.
优选地,所述步骤S3中,所述新三角形的排序方法为:以原三角形的顶点先后顺序,按逆时针方向为每个新三角形排列顺序。Preferably, in the step S3, the sorting method of the new triangles is as follows: according to the order of the vertices of the original triangles, the order of each new triangle is arranged in a counterclockwise direction.
优选地,所述步骤S3中,所述根据插入点与所述三角形链表中的首个三角形的边指针关系将该插入点插入到相应三角形中,具体包括以下步骤:Preferably, in the step S3, inserting the insertion point into the corresponding triangle according to the edge pointer relationship between the insertion point and the first triangle in the triangle linked list specifically includes the following steps:
(31)判断所述插入点是否位于所述三角形的第一边指针的外侧,若是,则根据所述三角形的第一边指针查找共边三角形,若不是,则判断所述插入点是否位于所述三角形的第二边指针的外侧,若是,则根据所述三角形的第二边指针查找共边三角形,若不是,则判断所述插入点是否位于所述三角形的第三边指针的外侧,若是,则根据所述三角形的第三边指针查找共边三角形;(31) judging whether the insertion point is located outside the first side pointer of the triangle, if so, search for a common triangle according to the first side pointer of the triangle, if not, judge whether the insertion point is located at the The outer side of the pointer of the second side of the triangle, if so, search for a co-lateral triangle according to the pointer of the second side of the triangle, if not, determine whether the insertion point is located outside the pointer of the third side of the triangle, if so , then according to the pointer of the third side of the triangle to find a common triangle;
(32)判断所述插入点是否位于该共边三角形的内部,若是,则将该共边三角形视为目标三角形,将所述插入点插入到该目标三角形中;若不是,则采用所述步骤(31)中的办法继续判断所述插入点与所述共边三角形的边指针的关系,直至找到所述插入点的目标三角形。(32) Judging whether the insertion point is located in the interior of the colateral triangle, if so, the colateral triangle is regarded as a target triangle, and the insertion point is inserted into the target triangle; if not, the steps are adopted The method in (31) continues to judge the relationship between the insertion point and the edge pointer of the co-edge triangle, until the target triangle of the insertion point is found.
优选地,在所述步骤(31)前,还包括步骤:判断所述插入点是否位于所述首个三角形中,若是,则将所述首个三角形视为目标三角形;若不是,则执行所述步骤(31)。Preferably, before the step (31), the method further includes the step of: judging whether the insertion point is located in the first triangle, if so, treating the first triangle as the target triangle; if not, executing all Step (31) described above.
优选地,当所述插入点位于所述首个三角形的边上时,将插入点落入边所在的三角形都视为目标三角形。Preferably, when the insertion point is located on the edge of the first triangle, all triangles where the insertion point falls into the edge are regarded as the target triangle.
优选地,所述步骤S4中,所述删除所述目标三角形以更新所述三角形网,同时更新每个三角形的边指针和所述三角形链表具体包括更新新三角形的边指针、更新与被删除目标三角形相邻的三角形的边指针、以及更新三角形链表中存储的三角形;其中:Preferably, in the step S4, deleting the target triangle to update the triangle mesh, and updating the edge pointer of each triangle and the triangle linked list at the same time specifically includes updating the edge pointer of the new triangle, updating and deleting the target. The edge pointer of the triangle adjacent to the triangle, and the triangle stored in the updated triangle linked list; where:
所述更新与被删除目标三角形相邻的三角形的边指针具体包括以下步骤:删除目标三角形,将与原本指向被删除目标三角形的相邻三角形的边指针指向相应新三角形;The updating of the edge pointer of the triangle adjacent to the deleted target triangle specifically includes the following steps: deleting the target triangle, and pointing the edge pointer of the adjacent triangle that originally pointed to the deleted target triangle to the corresponding new triangle;
所述更新三角形链表中存储的三角形具体包括以下步骤:在所述三角形链表中将生成的顺序排列的新三角形替换被删除目标三角形在三角形链表中所在的位置。The updating of the triangles stored in the triangle linked list specifically includes the following steps: replacing the position of the deleted target triangle in the triangle linked list with the generated new triangles arranged in sequence in the triangle linked list.
优选地,所述步骤S4中,依次判断每个所述新三角形是否符合Delaunay空圆规则具体包括以下步骤:Preferably, in the step S4, judging in turn whether each of the new triangles conforms to the Delaunay empty circle rule specifically includes the following steps:
根据该新三角形的第三边指针查找共边三角形,若查找到的共边三角形与该新三角形形成的四边形不满足Delaunay空圆规则,则删除该共边,并连接该四边形中的另一条对角线以调整新三角形的连边,同时更新新生成三角形的边指针和三角形链表,然后重新对每个新三角形进行判断。According to the pointer of the third side of the new triangle, find the co-edge triangle. If the quadrilateral formed by the found co-edge triangle and the new triangle does not satisfy the Delaunay empty circle rule, delete the co-edge and connect another pair in the quadrilateral. To adjust the connecting edge of the new triangle, update the edge pointer and triangle linked list of the newly generated triangle at the same time, and then re-evaluate each new triangle.
为实现上述目的,本发明还提供一种三维扫描中平面点集的三角剖分系统,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述方法的步骤。In order to achieve the above object, the present invention also provides a triangulation system for a plane point set in a three-dimensional scan, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, the processor executing the The steps of the above method are implemented when the computer program is described.
本发明具有以下有益效果:The present invention has the following beneficial effects:
本发明提供的三维扫描中平面点集的三角剖分方法及系统,首先获取目标待重构物体的三维坐标点,将三维坐标点映射为平面点集,遍历平面点集构建包含平面点集内所有点的目标三角形,然后通过不断寻找该目标三角形内的新的目标三角形实现对该目标三角形的剖分;本发明通过为目标三角形分配相应的边指针,根据插入点与相应三角形的边指针的位置关系有方向地查找新的目标三角形,能快速的实现对最初目标三角形的剖分,得到三角形网,然后将该三角形网映射为曲面以拟合待重构物体,该方法及系统能提高查找新的目标三角形的速度,能更好地满足三维重建的实时性需求。The triangulation method and system for a plane point set in a three-dimensional scan provided by the present invention first obtain the three-dimensional coordinate points of the target object to be reconstructed, map the three-dimensional coordinate points into a plane point set, and traverse the plane point set to construct a The target triangle of all points is then divided into the target triangle by continuously searching for new target triangles in the target triangle; the present invention allocates corresponding edge pointers to the target triangle, according to the difference between the insertion point and the edge pointer of the corresponding triangle. The new target triangle is searched in a directional position relationship, which can quickly realize the division of the original target triangle, obtain a triangular mesh, and then map the triangular mesh into a curved surface to fit the object to be reconstructed. The method and system can improve the search efficiency. The speed of the new target triangle can better meet the real-time requirements of 3D reconstruction.
下面将参照附图,对本发明作进一步详细的说明。The present invention will be described in further detail below with reference to the accompanying drawings.
附图说明Description of drawings
构成本申请的一部分的附图用来提供对本发明的进一步理解,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings constituting a part of the present application are used to provide further understanding of the present invention, and the exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached image:
图1是本发明优选实施例的三角剖分的方法流程示意图;Fig. 1 is the method flow schematic diagram of the triangulation of the preferred embodiment of the present invention;
图2是本发明优选实施例的三角剖分中插入点落入某个三角形中的实例图;2 is an example diagram of an insertion point falling into a certain triangle in the triangulation of the preferred embodiment of the present invention;
图3是本发明优选实施例的三角剖分中插入点落入三角形边上的实例图;Fig. 3 is the example diagram that the insertion point falls on the triangle edge in the triangulation of the preferred embodiment of the present invention;
图4是本发明优选实施例的三角剖分中Delaunay空圆规则判断示意图。FIG. 4 is a schematic diagram of judging the Delaunay empty circle rule in triangulation according to a preferred embodiment of the present invention.
具体实施方式Detailed ways
以下结合附图对本发明的实施例进行详细说明,但是本发明可以由权利要求限定和覆盖的多种不同方式实施。The embodiments of the present invention are described in detail below with reference to the accompanying drawings, but the present invention can be implemented in many different ways as defined and covered by the claims.
实施例1Example 1
参见图1,本实施例提供一种三维扫描中平面点集的三角剖分方法,包括以下步骤:Referring to FIG. 1 , this embodiment provides a triangulation method for a plane point set in a three-dimensional scan, including the following steps:
S1:获取目标待重构物体的三维坐标点,将三维坐标点映射为平面点集,遍历平面点集构建包含平面点集内所有点的目标三角形;S1: Obtain the three-dimensional coordinate points of the target object to be reconstructed, map the three-dimensional coordinate points to a plane point set, and traverse the plane point set to construct a target triangle including all points in the plane point set;
S2:按逆时针的顺序为目标三角形标记第一顶点、第二顶点以及第三顶点,然后为第一顶点与第三顶点的连边分配第一边指针,为第二顶点与第三顶点的连边分配第二边指针,为第一顶点与第二顶点的连边分配第三边指针;S2: Mark the first vertex, the second vertex and the third vertex for the target triangle in a counterclockwise order, then assign the first edge pointer to the edge connecting the first vertex and the third vertex, and assign the first edge pointer to the edge between the second vertex and the third vertex. The second edge pointer is allocated for connecting the edge, and the third edge pointer is allocated for the connecting edge between the first vertex and the second vertex;
S3:选取平面点集内的某个点作为插入点,分别连接插入点与目标三角形的各个顶点,得到剖分后顺序排列的新三角形,完成第一次三角剖分得到三角形网,删除被剖分的目标三角形,然后按照步骤S2的方法更新每个新三角形的边指针,并将新三角形按顺序存储在三角形链表中;S3: Select a point in the plane point set as the insertion point, connect the insertion point and the vertices of the target triangle respectively, obtain new triangles arranged in sequence after division, complete the first triangulation to obtain a triangle mesh, delete the divided triangles divide the target triangle, then update the edge pointer of each new triangle according to the method of step S2, and store the new triangles in the triangle linked list in sequence;
S4:选取平面点集内另一个点作为插入点,根据该插入点与三角形链表中的首个三角形的边指针关系将该插入点插入到相应三角形中,将被插入的三角形视为新的目标三角形,分别连接插入点与目标三角形的各个顶点,完成对该目标三角形的剖分得到新三角形,并删除目标三角形以更新三角形网,同时更新每个三角形的边指针和三角形链表;然后依次判断每个新三角形是否符合Delaunay空圆规则,如果符合,则进入步骤S5,如果不符合,则调整新三角形的连边,直至新三角形符合Delaunay空圆规则后进入步骤S5;S4: Select another point in the plane point set as the insertion point, insert the insertion point into the corresponding triangle according to the edge pointer relationship between the insertion point and the first triangle in the triangle linked list, and regard the inserted triangle as a new target Triangle, connect the insertion point and the vertices of the target triangle respectively, complete the subdivision of the target triangle to obtain a new triangle, delete the target triangle to update the triangle mesh, and update the edge pointer and triangle linked list of each triangle at the same time; then judge each triangle in turn. Whether the new triangle conforms to the Delaunay empty circle rule, if so, go to step S5, if not, adjust the connecting sides of the new triangle until the new triangle conforms to the Delaunay empty circle rule and go to step S5;
S5:重复上述步骤S4,直至完成所有坐标点的插入,得到最后的三角形网实现对三维扫描中平面点集的三角剖分。S5: Repeat the above step S4 until the insertion of all coordinate points is completed, and a final triangular net is obtained to implement triangulation of the plane point set in the three-dimensional scanning.
需要说明的是,在第一次构建目标三角形时,首先遍历平面点集内所有的坐标点,找到最大的横坐标值和纵坐标值Xmax,Ymax,取两者中较大者得到max,并根据max构造包含平面点集内所有点的目标三角形,优选地,其各点坐标为:It should be noted that when constructing the target triangle for the first time, first traverse all the coordinate points in the plane point set, find the maximum abscissa value and ordinate value X max , Y max , take the larger of the two to get max , and construct a target triangle containing all points in the plane point set according to max, preferably, the coordinates of each point are:
V1={0,4*max};V 1 ={0, 4*max};
V2={-4*max,-4*max};V 2 ={-4*max,-4*max};
V3={4*max,0};V 3 ={4*max, 0};
其中,V1,V2,V3分别表示构造的包含平面点集内所有点的目标三角形的三个顶点,该确定方法能确保所有被插入的散点都落在超级三角形内部,然后将所有点插入到该目标三角形中,最后删除点V1,V2,V3以及所有和V1,V2,V3相关的边,最终得到满足Delaunay三角形规则的三角形网。Among them, V 1 , V 2 , V 3 represent the three vertices of the constructed target triangle containing all points in the plane point set, respectively. This determination method can ensure that all the inserted scatter points fall inside the super triangle, and then all The point is inserted into the target triangle, and finally the points V 1 , V 2 , V 3 and all the edges related to V 1 , V 2 , V 3 are deleted, and finally a triangle mesh that satisfies the Delaunay triangle rule is obtained.
具体地,在实际实施中,遍历平面点集后构建目标三角形ABC,参见图2,则按逆时针方向,为边AC边分配第一边指针,为BC边分配第二边指针,为AB边分配第三边指针,选取平面内的点E作为插入点,连接AE、BE以及CE,对三角形ABC进行剖分得到顺序排列的ABE,BCE,CAE。需要注意的是,在为新三角形命名时,需将插入点作为最后的点进行命名。此外,对三角形ABC进行剖分后得到的新三角形的排列顺序应该以第一顶点A开始确定第一个新三角形,然后以第二顶点B开始确定第二个新三角形,再以第三顶点C开始确定第三个新三角形。则,可以得到按顺序排列的新三角形ABE,BCE,CAE,然后为每个新三角形分配相应的边指针,并将该各三角形按顺序存储在三角形链表中。其中,在为每个新三角形分配相应的边指针时,应当为第一顶点与第三顶点之间的连边分配第一边指针,为第二顶点与第三顶点之间的连边分配第二边指针,为第一顶点与第二顶点之间的连边分配第三边指针,以三角形ABE为例,则,AE边上为第一边指针,BE边上为第二边指针,AB边上为第三边指针。Specifically, in the actual implementation, after traversing the plane point set, the target triangle ABC is constructed. Referring to Figure 2, in a counterclockwise direction, the first side pointer is allocated to the side AC, the second side pointer is allocated to the BC side, and the AB side is allocated. Allocate the third side pointer, select the point E in the plane as the insertion point, connect AE, BE and CE, and divide the triangle ABC to obtain ABE, BCE, CAE in order. It is important to note that when naming the new triangle, name the insertion point as the last point. In addition, the order of the new triangles obtained by dividing the triangle ABC should start with the first vertex A to determine the first new triangle, then start with the second vertex B to determine the second new triangle, and then start with the third vertex C Start identifying the third new triangle. Then, new triangles ABE, BCE, CAE can be obtained in order, and then a corresponding edge pointer is allocated to each new triangle, and the triangles are stored in the triangle linked list in order. Among them, when assigning a corresponding edge pointer to each new triangle, the first edge pointer should be assigned to the connecting edge between the first vertex and the third vertex, and the first edge pointer should be assigned to the connecting edge between the second vertex and the third vertex. Two-edge pointer, allocates a third edge pointer for the connecting edge between the first vertex and the second vertex, taking triangle ABE as an example, then the first edge pointer is on the AE side, the second edge pointer is on the BE edge, and AB On the edge is the third edge pointer.
需要说明的是,每一个边指针都指向该边的共边三角形。根据边指针的指向方向能快速的找到与边指针所在边共边的共边三角形,为快速的找到目标三角形提供基础。例如,参见图2,在插入点E之后,新三角形ABE的第一边指针指向共边三角形CAE,第二边指针指向共边三角形BCE。It should be noted that each edge pointer points to the coedge triangle of the edge. According to the pointing direction of the edge pointer, the co-edge triangle with the edge where the edge pointer is located can be quickly found, which provides a basis for quickly finding the target triangle. For example, referring to FIG. 2, after the insertion point E, the first side pointer of the new triangle ABE points to the colateral triangle CAE, and the second side pointer points to the colateral triangle BCE.
然后,选取平面内的另一个点D作为插入点。首先,判断点D不位于三角形链表中的首个三角形ABE的内部,然后,根据点D与三角形链表中的首个三角形ABE的各边的边指针关系进行判断。具体地,根据图2可知,点D处于三角形ABE的第一边指针对应的边AE的外侧,则查找到与三角形ABE共边AE的共边三角形CAE,判断点D不位于共边三角形CAE的内部,再判断点D位于共边三角形CAE的第一边指针对应的边CE的外侧,则查找到共边三角形BCE,判断点D位于共边三角形BCE的内部,则将点D插入到共边三角形BCE中,将共边三角形BCE视为目标三角形,连接点D与目标三角形BCE的各个顶点,得到顺序排列的新三角形BCD,CED以及EBD。删除目标三角形BCE,然后为每个新三角形分配相应的边指针,更新三角形链表为ABE,BCD,CED,EBD,CAE。具体地,在为每个新三角形分配相应的边指针时,采用的边指针分配方法同上述生成新三角形ABE使用的分配方法一致。同时,在插入点D时,删除了目标三角形BCE,此时,还应当更新与目标三角形BCE相邻的三角形如三角形ABE的指针。具体地,在三角形ABE中,其与目标三角形BCE相邻的边BE上的指针,原先指向三角形BCE,删除三角形BCE后,该边BE上的指针指向新生成的三角形EBD。Then, pick another point D in the plane as the insertion point. First, it is judged that the point D is not located inside the first triangle ABE in the triangle linked list, and then the judgment is made according to the edge pointer relationship between the point D and each side of the first triangle ABE in the triangle linked list. Specifically, according to Fig. 2, it can be seen that the point D is located outside the side AE corresponding to the first side pointer of the triangle ABE, then the common triangle CAE that shares the side AE with the triangle ABE is found, and it is judged that the point D is not located in the common side triangle CAE. Inside, then judging that the point D is located outside the side CE corresponding to the first side pointer of the common triangle CAE, then find the common triangle BCE, and judge that the point D is inside the common triangle BCE, then insert the point D into the common side In the triangle BCE, the co-edge triangle BCE is regarded as the target triangle, and the vertexes of the point D and the target triangle BCE are connected to obtain new triangles BCD, CED and EBD arranged in sequence. Delete the target triangle BCE, then assign the corresponding edge pointer to each new triangle, and update the triangle linked list to be ABE, BCD, CED, EBD, CAE. Specifically, when assigning a corresponding edge pointer to each new triangle, the edge pointer assignment method adopted is the same as the assignment method used for generating the new triangle ABE described above. At the same time, when the point D is inserted, the target triangle BCE is deleted, and at this time, the pointers of the triangles adjacent to the target triangle BCE, such as the triangle ABE, should also be updated. Specifically, in the triangle ABE, the pointer on the side BE adjacent to the target triangle BCE originally points to the triangle BCE. After the triangle BCE is deleted, the pointer on the side BE points to the newly generated triangle EBD.
按照同样的方法将点P插入到三角形CED中,则得到顺序排列的新三角形CEP,EDP,DCP。然后删除目标三角形CED,为每个新三角形分配相应的边指针,更新三角形链表为ABE,EBD,BCD,CEP,EDP,DCP,CAE。进一步地,对点X进行插入,同理,判断点X不在三角形ABE内部,判断点X处于三角形ABE的第一边指针对应的边AE的外侧,则查找到与三角形ABE共边AE的共边三角形CAE,判断点X不位于共边三角形CAE的内部,判断点X处于三角形CAE的第一边指针CE的外侧,查找到与三角形CAE共边CE的共边三角形CEP,判断点X处于共边三角形CEP的内部,则将共边三角形CEP视为目标三角形。在该例中,按照该基于边指针搜索的方法经过3次就能找到目标三角形,如果按照传统的算法(依次查找三角形链表),则需要第4次才能找到目标三角形,而且随着插入点的点数目的增加,基于边指针搜索的方法的速度会突出地更加明显。Insert the point P into the triangle CED in the same way, and then get the new triangles CEP, EDP, DCP arranged in sequence. Then delete the target triangle CED, assign the corresponding edge pointer to each new triangle, and update the triangle linked list to ABE, EBD, BCD, CEP, EDP, DCP, CAE. Further, the point X is inserted. Similarly, the point X is judged not to be inside the triangle ABE, and the point X is judged to be outside the side AE corresponding to the first side pointer of the triangle ABE, then the common side of the triangle ABE is found. Triangle CAE, judge that the point X is not located inside the triangle CAE, judge that the point X is outside the pointer CE of the first side of the triangle CAE, find the common triangle CEP that has the same side CE with the triangle CAE, and judge that the point X is on the same side Inside the triangle CEP, the co-edge triangle CEP is regarded as the target triangle. In this example, according to the edge pointer-based search method, the target triangle can be found after 3 times. If the traditional algorithm (finding the triangle linked list in turn) is used, it takes the 4th time to find the target triangle, and with the insertion point As the number of points increases, the speed of the edge-pointer search-based method is significantly more pronounced.
作为本实施例优选的实施方式,当插入点位于首个三角形的边上时,将插入点落入边所在的三角形都视为目标三角形。具体地,在上述插入过程中,假设点P落入边CE上,如图3,当找到三角形CDE时,首先判断得到点P在边CE上,接着搜索三角形CED的共边三角形,可由边CE上的指针直接得到,即三角形AEC。找到共边三角形后,将点P插入到边CE上,生成三角形EDP、DCP以及AEP、CAP,更新边AE、CA、DE以及CD的指针(图3中加粗部分,AE边指针原本指向三角形ACE,现指向三角形AEP,同理DE边指针指向三角形EDP,CD边指针指向三角形CDP,CA边指针指向三角形CAP;更新图3中虚线部分,使得三角形EDP、CDP以及AEP、CAP能够通过边上的指针找到相邻的共边三角形),边EP、DP、CP以及AP的指针指向相临共边三角形,则三角形CDE、ACE都为目标三角形,删除三角形CDE、ACE。As a preferred implementation of this embodiment, when the insertion point is located on the edge of the first triangle, the triangle where the insertion point falls into the edge is regarded as the target triangle. Specifically, in the above insertion process, it is assumed that the point P falls on the edge CE, as shown in Figure 3, when the triangle CDE is found, it is first judged that the point P is on the edge CE, and then the colateral triangle of the triangle CED is searched. The pointer above is directly obtained, that is, the triangle AEC. After finding the common triangle, insert the point P into the edge CE, generate the triangles EDP, DCP, AEP, CAP, and update the pointers of the edges AE, CA, DE and CD (the bold part in Figure 3, the AE edge pointer originally points to the triangle ACE, now points to triangle AEP, similarly DE side pointer points to triangle EDP, CD side pointer points to triangle CDP, CA side pointer points to triangle CAP; update the dotted line part in Figure 3, so that triangle EDP, CDP, AEP, CAP can pass through the edge The pointer to find the adjacent coedge triangles), the pointers of the edges EP, DP, CP and AP point to the adjacent coedge triangles, then the triangles CDE and ACE are the target triangles, and the triangles CDE and ACE are deleted.
作为本实施例优选的实施方式,步骤S4中,依次判断每个新三角形是否符合Delaunay空圆规则具体包括以下步骤:As a preferred implementation of this embodiment, in step S4, judging in turn whether each new triangle conforms to the Delaunay empty circle rule specifically includes the following steps:
根据该新三角形的第三边指针查找共边三角形,若查找到的共边三角形与该新三角形形成的四边形不满足Delaunay空圆规则,则删除该四边形的对角连线,并连接该四边形中的另一条对角线,同时更新新生成三角形的边指针和三角形链表,然后重新对每个新三角形进行判断。According to the pointer of the third side of the new triangle, search for a colateral triangle. If the quadrilateral formed by the found colateral triangle and the new triangle does not satisfy the Delaunay empty circle rule, delete the diagonal connection line of the quadrilateral and connect the quadrilateral in the quadrilateral. Another diagonal line of , update the edge pointer and triangle linked list of the newly generated triangle at the same time, and then re-evaluate each new triangle.
具体地,在进行Delaunay空圆规则判定时,如图4所示,假设对三角形ABP进行Delaunay规则判断,可以通过AB边上的边指针找到共边三角形DBA,接着通过判断三角形的三个顶点是否符合逆时针方向来确定三角形ADB的位置关系(DBA或ADB或BAD)。然后判断三角形ABP,ADB是否在同一个外接圆内,若不在同一圆内,则符合Delaunay空圆特性规则,否则不符合Delaunay空圆特性规则。若不符合空圆特性,则删除图4中虚线部分,将四边形APBD重新拆分为三角形ADP以及BPD,并根据三角形的位置关系,更新与新生成的三角形相关的边指针。图4中黑色箭头仍然指向与其有公共边的三角形,使三角形ADP以及BPD能够通过边指针找到相邻的共边三角形,图4中加粗部分原本指向三角形ADB,ABP,现指向三角形ADP,BPD。最后删除共边三角形ABP以及ADB,依次判断新生成的三角形ADP以及BPD是否符合Delaunay规则。Specifically, when determining the Delaunay empty circle rule, as shown in Figure 4, assuming that the triangle ABP is determined by the Delaunay rule, the co-edge triangle DBA can be found through the edge pointer on the AB side, and then the three vertices of the triangle are judged whether the The positional relationship (DBA or ADB or BAD) of the triangle ADB is determined according to the counterclockwise direction. Then it is judged whether the triangles ABP and ADB are in the same circumcircle. If they are not in the same circle, it conforms to the Delaunay empty circle characteristic rule, otherwise it does not conform to the Delaunay empty circle characteristic rule. If it does not meet the characteristics of the empty circle, delete the dashed part in Figure 4, re-split the quadrilateral APBD into triangles ADP and BPD, and update the edge pointer related to the newly generated triangle according to the positional relationship of the triangles. The black arrows in Figure 4 still point to the triangles with common sides, so that the triangles ADP and BPD can find the adjacent common-sided triangles through the edge pointer. The bold part in Figure 4 originally points to the triangles ADB and ABP, but now points to the triangles ADP and BPD. . Finally, delete the co-edge triangles ABP and ADB, and then judge whether the newly generated triangles ADP and BPD conform to the Delaunay rule.
同理,与将插入点插在三角形的公共边上情况类似,Delaunay规则判断中共边三角形不同的位置关系也是都会生成三角形ADP以及BPD,但需要更新的边指针会有所不同。例如,如果原始共边三角形为ABP以及ADB,则对于三角形ADB,AD边上的指针应该为第三边指针;若原始共边三角形为ABP以及DBA,则对于三角形DBA,AD边上的指针应该为第一边指针,与此同时,其他边上指针也是不同的。其他情况类似,不同的位置关系,拆分生成的三角形虽然相同,但边的指针更新会有所不同。其中,由于被测试三角形ABP的位置关系是确定的,所以与将插入点插在三角形的公共边上的位置关系不完全相同。In the same way, similar to the case of inserting the insertion point on the common edge of the triangle, Delaunay's rule determines that different positional relationships of the co-sided triangle will also generate triangles ADP and BPD, but the edge pointers that need to be updated will be different. For example, if the original coedge triangle is ABP and ADB, then for triangle ADB, the pointer on the AD side should be the third side pointer; if the original coedge triangle is ABP and DBA, then for triangle DBA, the pointer on AD side should be For the first side pointer, at the same time, the other side pointers are also different. Other situations are similar, with different positional relationships, although the triangles generated by splitting are the same, the update of the edge pointers will be different. Among them, since the positional relationship of the tested triangle ABP is determined, it is not exactly the same as the positional relationship of inserting the insertion point on the common side of the triangle.
实施例2Example 2
与上述方法实施例相对应的,本实施例提供一种三维扫描中平面点集的三角剖分系统,包括存储器、处理器以及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述方法的步骤。Corresponding to the above method embodiments, this embodiment provides a triangulation system for a plane point set in a three-dimensional scan, including a memory, a processor, and a computer program stored in the memory and running on the processor, the The steps of the above-mentioned methods are implemented when the processor executes the computer program.
如上所述,本发明提供的三维扫描中平面点集的三角剖分方法及系统,首先获取目标待重构物体的三维坐标点,将三维坐标点映射为平面点集,遍历平面点集构建包含平面点集内所有点的目标三角形,然后通过不断寻找该目标三角形内的新的目标三角形实现对该目标三角形的剖分;本发明通过为目标三角形分配相应的边指针,根据插入点与相应三角形的边指针的位置关系有方向地查找新的目标三角形,能快速的实现对最初目标三角形的剖分,得到三角形网,然后将该三角形网映射为曲面以拟合待重构物体,该方法及系统能提高查找新的目标三角形的速度,能更好地满足三维重建的实时性需求。As described above, the triangulation method and system for a plane point set in a three-dimensional scan provided by the present invention firstly obtains the three-dimensional coordinate points of the target object to be reconstructed, maps the three-dimensional coordinate points to a plane point set, and traverses the plane point set to construct a The target triangle of all points in the plane point set, and then realize the division of the target triangle by continuously searching for new target triangles in the target triangle; the present invention allocates corresponding edge pointers to the target triangle, according to the insertion point and the corresponding triangle. The positional relationship of the edge pointers can find new target triangles in a directional manner, which can quickly realize the division of the original target triangles, obtain a triangular mesh, and then map the triangular mesh into a curved surface to fit the object to be reconstructed. The method and The system can improve the speed of finding new target triangles, and can better meet the real-time requirements of three-dimensional reconstruction.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims (7)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810553247.4A CN108765572B (en) | 2018-05-31 | 2018-05-31 | Triangulation method and system of plane point set in 3D scanning |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201810553247.4A CN108765572B (en) | 2018-05-31 | 2018-05-31 | Triangulation method and system of plane point set in 3D scanning |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN108765572A CN108765572A (en) | 2018-11-06 |
| CN108765572B true CN108765572B (en) | 2022-05-10 |
Family
ID=64001611
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201810553247.4A Active CN108765572B (en) | 2018-05-31 | 2018-05-31 | Triangulation method and system of plane point set in 3D scanning |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN108765572B (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111444883B (en) * | 2019-05-10 | 2023-09-19 | 沈阳工业大学 | Gain face synthesis method using stereoscopic faces |
| CN114219914A (en) * | 2021-11-23 | 2022-03-22 | 深圳市中金岭南有色金属股份有限公司凡口铅锌矿 | Triangular reconstruction method and device of empty area three-dimensional model and computer equipment |
| CN116704151B (en) * | 2022-02-25 | 2024-10-29 | 比亚迪股份有限公司 | Three-dimensional reconstruction method and device, and vehicle, equipment and medium based on three-dimensional reconstruction method and device |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1967596A (en) * | 2006-08-14 | 2007-05-23 | 东南大学 | Triangulation construction method of three-dimensional scattered point set in three-dimensional scanning system |
| CN1996392A (en) * | 2006-08-14 | 2007-07-11 | 东南大学 | Figure reconstruction method in 3D scanning system |
| CN101441780A (en) * | 2008-11-05 | 2009-05-27 | 武汉大学 | Method for slitting three-dimensional gridding model |
| CN103092933A (en) * | 2013-01-06 | 2013-05-08 | 南京大学 | Delaunay triangulation network parallel net-constructing method based on rectangular piecing towards magnanimity point cloud data |
| CN105303617A (en) * | 2015-11-27 | 2016-02-03 | 中山大学 | Recursive curved surface generating method and device on the basis of quadrangle segmentation |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9922459B2 (en) * | 2015-03-09 | 2018-03-20 | D4D Technologies, Llc | Real-time detail highlighting on 3D models |
-
2018
- 2018-05-31 CN CN201810553247.4A patent/CN108765572B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1967596A (en) * | 2006-08-14 | 2007-05-23 | 东南大学 | Triangulation construction method of three-dimensional scattered point set in three-dimensional scanning system |
| CN1996392A (en) * | 2006-08-14 | 2007-07-11 | 东南大学 | Figure reconstruction method in 3D scanning system |
| CN101441780A (en) * | 2008-11-05 | 2009-05-27 | 武汉大学 | Method for slitting three-dimensional gridding model |
| CN103092933A (en) * | 2013-01-06 | 2013-05-08 | 南京大学 | Delaunay triangulation network parallel net-constructing method based on rectangular piecing towards magnanimity point cloud data |
| CN105303617A (en) * | 2015-11-27 | 2016-02-03 | 中山大学 | Recursive curved surface generating method and device on the basis of quadrangle segmentation |
Non-Patent Citations (2)
| Title |
|---|
| Distributed and Parallel Delaunay Triangulation Construction with Balanced Binary-tree Model in Cloud;Jiaxiang Lin 等;《 2016 15th International Symposium on Parallel and Distributed Computing (ISPDC)》;20160710;I138-250 * |
| 三角剖分算法研究;王力;《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》;20101215(第12期);I138-250 * |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108765572A (en) | 2018-11-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN115661374B (en) | Rapid retrieval method based on space division and model voxelization | |
| US10504284B2 (en) | Method for automatic modeling of complex buildings with high accuracy | |
| CN108765572B (en) | Triangulation method and system of plane point set in 3D scanning | |
| CN103279989A (en) | Three-dimensional laser imaging system planar point cloud data triangularization processing method | |
| CN107705363B (en) | Road three-dimensional visual modeling method and device | |
| CN112200906B (en) | Entity extraction method and system for inclined three-dimensional model | |
| CN107833273A (en) | Oblique photograph threedimensional model objectification application process based on three-dimensional simulation model | |
| CN115087983A (en) | Method and system for hybrid modeling using geometric patches | |
| CN108898659B (en) | A triangulation method and system for three-dimensional reconstruction | |
| CN109983509A (en) | A kind of instant boolean operation method using geometric surface | |
| CN103238170B (en) | Display processing method and device | |
| CN103970949A (en) | Edge-by-edge layering method of triangular patch model in rapid forming | |
| CN118015197B (en) | Live-action three-dimensional logic singulation method and device and electronic equipment | |
| CN107993242A (en) | Based on airborne LiDAR point cloud shortage of data zone boundary extracting method | |
| Sacchi et al. | Curvature estimation for segmentation of triangulated surfaces | |
| CN117726772A (en) | A partitioned quadrilateral mesh reconstruction method for 3D point cloud models | |
| CN116067391B (en) | Path generation method and system for multi-map information fusion | |
| CN113593010B (en) | Correction method, electronic device and storage medium | |
| CN111400969A (en) | Method for accelerating generation of unstructured right-angle grid | |
| US6518964B1 (en) | Apparatus, system, and method for simplifying annotations on a geometric surface | |
| CN105869210A (en) | Interpolation data processing method in three-dimensional geological surface model | |
| CN120217799A (en) | A method for automatic reconstruction of complex BIM in finite element platform | |
| JP2010092507A (en) | Image processing method and apparatus | |
| CN107832378A (en) | The determination method, apparatus and computer-readable medium in pipeline data region to be updated | |
| JP3624015B2 (en) | Method and apparatus for extracting edges, faces and elements from a finite element division model |
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 |