CN115496875A - Method for generating high-quality measurement ground contour line - Google Patents
Method for generating high-quality measurement ground contour line Download PDFInfo
- Publication number
- CN115496875A CN115496875A CN202211263995.1A CN202211263995A CN115496875A CN 115496875 A CN115496875 A CN 115496875A CN 202211263995 A CN202211263995 A CN 202211263995A CN 115496875 A CN115496875 A CN 115496875A
- Authority
- CN
- China
- Prior art keywords
- geodesic
- points
- distance
- contour
- contours
- 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.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/05—Geographic models
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
- G06T17/205—Re-meshing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4007—Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/13—Edge detection
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- Computer Graphics (AREA)
- Remote Sensing (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
本发明提供了一种高质量测地等值线的生成方法,该生成方法包括:对图像数据进行预处理,得到图像的三角形网格数据;计算到网格顶点的测地线距离,以及三角形网格边缘的所有三等分点;为每个三角形网格边缘生成三次插值函数;从每个三等分线边缘取k个均匀间隔的样本点,并推断样本点处的近似测地线距离;根据采样点的距离加权计算Apollonius图,将三角形划分为几个部分,再提取每个部分的测地等值线,即得到高质量测地等值线;所述采样点为三等分点和样本点。本发明能够提高测地等值线提取的精度,且将该方法应用到图像提取相关的技术领域中。
The invention provides a method for generating high-quality geodesic contours. The generating method includes: preprocessing the image data to obtain triangular grid data of the image; calculating the geodesic distance to the vertices of the grid; and All trisector points of the mesh edges; generate a cubic interpolation function for each triangular mesh edge; take k evenly spaced sample points from each trisector edge, and extrapolate the approximate geodesic distance at the sample points ;According to the distance weighted calculation of the sampling point Apollonius diagram, the triangle is divided into several parts, and then the geodesic contour of each part is extracted to obtain a high-quality geodesic contour; the sampling point is a trisecting point and sample points. The invention can improve the precision of geodesic contour extraction, and the method is applied to the technical field related to image extraction.
Description
技术领域technical field
本发明涉及图像提取相关技术领域,尤其涉及一种高质量测地等值线的生成方法。The invention relates to the technical field of image extraction, in particular to a method for generating high-quality geodesic contours.
背景技术Background technique
测地线又称大地线或短程线,可以定义为空间中两点的局域最短或最长路径。测地线(Geodesic)的名字来自于对于地球尺寸与形状的大地测量学(Geodesy)。类似地球这样的物体并非由于称为引力的力使之沿着弯曲轨道运动,而是它沿着弯曲空间中最接近于直线的称之为测地线的轨迹运动。例如,地球的表面是一弯曲的二维空间。地球上的测地线称为大圆,是两点之间最近的路径。由于测地线是两个机场之间的最短程,这正是领航员叫飞行员飞行的航线。在广义相对论中,物体总是沿着四维时空的测地线走。尽管如此,在我们的三维空间看起来它是沿着弯曲的途径(这正如同看一架在非常多山的地面上空飞行的飞机。虽然它沿着三维空间的直线飞,在二维的地面上它的影子却是沿着一条弯曲的路径)。Geodesics, also known as geodesics or geodesics, can be defined as the local shortest or longest paths between two points in space. Geodesic gets its name from geodesy, the study of the size and shape of the earth. An object like the Earth does not follow a curved orbit due to a force called gravity, but instead follows the closest approximation to a straight line in curved space called a geodesic. For example, the surface of the earth is a curved two-dimensional space. A geodesic on Earth is called a great circle and is the shortest path between two points. Since the geodesic is the shortest distance between two airports, this is exactly the route the navigator tells the pilot to fly. In general relativity, objects always follow the geodesics of four-dimensional space-time. However, in our 3D space it looks like it follows a curved path (this is like watching an airplane fly over very mountainous terrain. While it flies in a straight line in 3D space, in 2D but its shadow follows a curved path).
等值线是给定标量场的解,它具有相同标量值的直线或曲线。等值线提供了直观的方法来可视化给定的标量场,并在工程领域有许多应用。例如,气象员经常使用等值线图来显示不同地区的热量差异。最热的区域通常是红色,温暖的区域是黄色,寒冷的区域是蓝色。因此,等值线提供了一种直观的方式来可视化标量场在给定域上的行为。一般来说,任意输入标量函数都不存在显式形式。因此,常用的方法是将给定的域离散成一组简单单元或小单元,然后提取每个单元的等值线。测地距离场作为一种特殊的标量场,在计算机图形学和地理学中有着广泛的应用。同样,人们可以通过可视化测地等值线来观察测地线度量的行为。A contour is a solution to a given scalar field that has straight lines or curves of the same scalar value. Contours provide an intuitive way to visualize a given scalar field and have many applications in engineering. For example, weathermen often use contour maps to show differences in heat in different regions. The hottest areas are usually red, warmer areas are yellow, and colder areas are blue. Contours thus provide an intuitive way to visualize the behavior of a scalar field over a given domain. In general, no explicit form exists for arbitrary input scalar functions. Therefore, the commonly used method is to discretize the given domain into a group of simple units or small units, and then extract the isoline of each unit. As a special scalar field, geodesic distance field has been widely used in computer graphics and geography. Likewise, one can observe the behavior of geodesic metrics by visualizing geodesic contours.
在实际应用中,也有运用测地等值线的案例。3D打印就是个很好的例子,随着增材工艺和3D打印在计算机图形学中的日益普及,人们不应忽视这样一个事实,在大多数情况下,与增材制造相比,减材制造在相同的产品精度水平下更快、更具成本效益,适用范围更广的材料,并且能够获得出色的表面光洁度。此外,减材制造主要通过计算机数控(CNC)加工工具实现。一台CNC机器操作一个圆柱形刀具,在3D空间中从形状原料中切割出材料,以“暴露”目标3D对象。刀头描绘出一条空间曲线,称为刀具路径,它必须完全填满物体表面。用于高效CNC加工,特别是高速加工(HSM)的刀具路径的理想特性包括公平性(即低曲率)和连续性(即更少的开/关切换或刀具回缩),类似于增材制造,所以就需要将刀具路径计算的比较精确。一般来说,3D打印的刀具路径主要分为①测地等值线的提取②将等值线连接成连续的刀具路径③平滑刀具路径同时保持间隙变化尽可能小。测地等值线的提取对于3D打印的作用不言而喻。In practical applications, there are also cases where geodesic contours are used. 3D printing is a good example, with the increasing popularity of additive processes and 3D printing in computer graphics, one should not lose sight of the fact that in most cases, subtractive manufacturing compared to additive manufacturing Faster and more cost-effective at the same level of product accuracy, on a wider range of materials, and with the ability to achieve excellent surface finishes. In addition, subtractive manufacturing is primarily accomplished with computer numerically controlled (CNC) machining tools. A CNC machine operates a cylindrical cutter that cuts material from shape stock in 3D space to "expose" the target 3D object. The tool tip traces a curve in space, called the toolpath, which must completely fill the surface of the object. Desirable characteristics of toolpaths for efficient CNC machining, especially high-speed machining (HSM), include fairness (i.e. low curvature) and continuity (i.e. fewer on/off toggles or tool retractions), similar to additive manufacturing , so it is necessary to calculate the tool path more accurately. In general, the toolpath for 3D printing is mainly divided into ① extraction of geodesic contours ② connection of contours into a
而目前提出的提取测地等值线的方法很少。对此基于MMP算法,Liu等人提出了提取精确等值线、平分线和Voronoi图的实用算法。此方法首先利用MMP对测地距离场进行预计算,然后将所有的传播窗口保持在网格的每一条边上,再将每条边递归地划分成单调的子边,并在每个重新分割的三角形中搜索弧段。此过程与构造区间树都作为预计算,然后采用O(log n’+k log k)二分法检索加行进过程求解任意genus-r模型的等值线,其中n’是重新细分的三角形数,k是等值线通过的三角形数量。此外Gehre等人还提出测地等值线特征(GICS),它可以捕捉到曲面上具有一定半径的等值线到某一点x的长度。GICS计算稳健的近似测地距离,并找到等值线段和三角形的交点。GICS使用这些线段的累积距离来识别拓扑事件,因此显著依赖于等值线的精度。这些算法不提供精确的等值线,因为基于边的线段交点计算忽略了三角形内部的脊点,并生成不准确的等值线长度或虚假拓扑。However, few methods have been proposed to extract geodesic contours. Based on the MMP algorithm, Liu et al. proposed a practical algorithm for extracting exact contours, bisectors and Voronoi diagrams. This method first precomputes the geodesic distance field using MMP, then keeps all propagation windows on each edge of the grid, recursively divides each edge into monotonic sub-edges, and re-splits at each Search for arcs in the triangle of . This process and the construction of the interval tree are used as precomputation, and then O(log n'+k log k) dichotomy search and marching process are used to solve the contour line of any genus-r model, where n' is the number of triangles resubdivided , k is the number of triangles that the contour passes through. In addition, Gehre et al. also proposed Geodesic Contour Line Feature (GICS), which can capture the length from an isoline with a certain radius on a surface to a certain point x. GICS computes robust approximate geodesic distances and finds intersections of contour segments and triangles. GICS uses the cumulative distance of these line segments to identify topological events and thus depends significantly on the precision of the contours. These algorithms do not provide accurate contours because edge-based segment intersection calculations ignore ridge points inside triangles and generate inaccurate contour lengths or spurious topology.
测地等值线既反映了输入精度,又反映了输入曲面的几何变化。在计算机图形学领域中,首先在由数千个三角形组成的三角形网格上计算测地线场,再提取所需的空间测地等值线,然后逐个三角形地提取测地线等值线,假设测地场在每个三角形面上是线性的。然而发现即使测地方法是精确的,用这种方法提取的等值线往往有明显的瑕疵,特别是在真实的等值线有急弯或拓扑变化。主要原因是测地距离场不是光滑场,可能包含“脊”。因此,简单地将测地距离场分段线性化,很难重建出高质量的测地等值线的锐角或拓扑变化。Geodesic contours reflect both the input accuracy and the geometric variation of the input surface. In the field of computer graphics, the geodesic field is first calculated on a triangular grid composed of thousands of triangles, and then the required spatial geodesic contours are extracted, and then the geodesic contours are extracted triangle by triangle, The geodesic field is assumed to be linear on each triangular face. However, it was found that even though the geodesic method is accurate, the contours extracted by this method often have obvious flaws, especially where the real contours have sharp bends or topological changes. The main reason is that geodesic distance fields are not smooth and may contain "ridges". Therefore, it is difficult to reconstruct sharp angles or topological changes of geodesic contours in high quality by simply piecewise linearizing the geodesic distance field.
发明内容Contents of the invention
本发明的目的是提供一种高质量测地等值线的生成方法,以弥补现有技术的不足。The purpose of the present invention is to provide a method for generating high-quality geodesic contours, so as to make up for the deficiencies in the prior art.
测地等值线的急弯与脊点密切相关,一个脊点至少有两条到源点的测地路径。本发明将脊曲线通过计算加权Voronoi图来表示,又称Apollonius图。计算得出,测地距离是连续的而不是光滑的。因此,用脊线把△ABC分成几个部分,并认为各部分内部测地距离的变化是线性的。同时,脊线还可以得出测地等值线可能会在哪里有急转或拓扑变化。所以此发明可以近似确定脊点的位置,然后更好的生成测地等值线。The sharp bend of the geodesic contour is closely related to the ridge point, and a ridge point has at least two geodesic paths to the source point. In the present invention, the ridge curve is represented by calculating the weighted Voronoi diagram, which is also called the Apollonius diagram. It is calculated that the geodesic distance is continuous rather than smooth. Therefore, △ABC is divided into several parts by the ridge line, and the change of the geodesic distance inside each part is considered to be linear. At the same time, ridges can also reveal where geodesic contours may have sharp turns or topological changes. Therefore, this invention can approximately determine the position of the ridge point, and then better generate geodesic contour lines.
本发明为了进行测地等值线提取,从现有的基于顶点的测地距离场中提取测地等值线。测地等值线的质量和运行性能在很大程度上依赖于距离场的计算。In order to extract the geodesic contour, the present invention extracts the geodesic contour from the existing vertex-based geodesic distance field. The quality and operational performance of geodesic contours relies heavily on the computation of distance fields.
为达到上述目的,基于上述技术方案,本发明采取的具体技术方案为:In order to achieve the above-mentioned purpose, based on the above-mentioned technical scheme, the concrete technical scheme that the present invention takes is:
一种高质量测地等值线的生成方法,包括以下步骤:A method for generating high-quality geodesic contours, comprising the following steps:
S1:对图像数据进行预处理,得到图像的三角形网格数据;S1: Preprocessing the image data to obtain the triangle mesh data of the image;
S2:计算到网格顶点的测地线距离,以及三角形网格边缘的所有三等分点;S2: Calculate the geodesic distance to the vertices of the mesh, and all the trisecting points of the edges of the triangular mesh;
S3:为每个三角形网格边缘生成三次插值函数;S3: Generate a cubic interpolation function for each triangle mesh edge;
S4:从每个三等分线边缘取k个均匀间隔的样本点,并推断样本点处的近似测地线距离;S4: Take k evenly spaced sample points from the edge of each trisector, and infer the approximate geodesic distance at the sample points;
S5:根据采样点的距离加权计算Apollonius图,将三角形划分为几个部分,再提取每个部分的测地等值线,即得到高质量测地等值线;所述采样点为三等分点和样本点。S5: Calculate the Apollonius diagram according to the weighted distance of the sampling points, divide the triangle into several parts, and then extract the geodesic contours of each part to obtain high-quality geodesic contours; the sampling points are trisected points and sample points.
进一步的,所述S2中,测地线距离的计算,包括计算几何、偏微分方程和基于图形的方法;采用该方法来计算所有网格顶点的测地线距离。Further, in S2, the calculation of the geodesic distance includes computational geometry, partial differential equations and graph-based methods; this method is used to calculate the geodesic distances of all grid vertices.
进一步的,所述S3中,由于使用二次插值的距离预测不如三次插值精确,需要较少的先验距离信息,并且可以以少量额外的计算成本保持距离场的关键性质,通过三次插值推断网格边缘的测地线距离;所述三次插值函数具体为:Further, in S3, since the distance prediction using quadratic interpolation is not as accurate as cubic interpolation, less prior distance information is required, and the key properties of the distance field can be maintained with a small amount of additional computational cost, and the network can be inferred by cubic interpolation The geodesic distance of grid edge; The cubic interpolation function is specifically:
(1)对网格边缘取两个三等分点,(2)运行现有的算法,计算三等分的测地距离,(3)生成3次插值函数来模拟沿网格边缘的距离变化;设e=v1v2为网格边,d1、d2、d3、d4分别为v1、(2v1+v2)/3、(v1+2v2)/3、v2的距离值;(1) Take two trisecting points for the grid edge, (2) Run the existing algorithm to calculate the geodesic distance of the trisect, (3) Generate a 3rd order interpolation function to simulate the distance change along the grid edge ; Let e=v1v2 be the grid edge, d1, d2, d3, d4 are the distance values of v1, (2v1+v2)/3, (v1+2v2)/3, v2 respectively;
三次插值函数为:The cubic interpolation function is:
进一步的,所述S5中,Apollonius定义为Further, in the S5, Apollonius is defined as
Ωi:{x∈Ω|||x-xi||-wi≤||x-xj||-wj,j≠i}.;Apollonius图完成后,构建Apollonius顶点和采样点进行三角剖分。Ω i : {x∈Ω|||xx i ||-w i ≤||xx j ||-w j , j≠i}.; After the Apollonius graph is completed, construct Apollonius vertices and sampling points for triangulation.
进一步的,所述S5中,计算并提取测地距离场的等值线,先提取单个三角网格中所有区域的测地等值线,然后逐个三角网格提取每个部分的测地等值线,并将所有等值线元素合并为一个完整的等值线元素;具体为:Further, in said S5, calculate and extract the contour of the geodesic distance field, first extract the geodesic contour of all regions in a single triangular grid, and then extract the geodesic contour of each part one by one line, and merge all contour elements into a complete contour element; specifically:
(1)定义每个子区域的线性函数,经观察每个区域内的测地线距离场基本上是线性的;(1) Define the linear function of each sub-region, and observe that the geodesic distance field in each region is basically linear;
(2)然后收集所有子区域,并使用图来编码邻接关系;该图允许在固定时间O(1)内计算任意点对(不一定是网格顶点)之间的测地线距离;(2) All subregions are then collected and a graph is used to encode the adjacency relations; this graph allows computation of geodesic distances between arbitrary pairs of points (not necessarily mesh vertices) in constant time O(1);
(3)将每个子区域作为一个节点,并将等值线元素保留在相应的节点中,通过访问节点来生成完整的等值线:(3) Treat each subregion as a node, and keep the contour element in the corresponding node, and generate a complete contour by visiting the node:
1)假设提取d处的等值线;1) Assume that the contour line at d is extracted;
2)找到距离为d的待定等值线元素,并将该元素标记为“固定”;2) Find the undetermined contour element whose distance is d, and mark this element as "fixed";
3)只要等值线未闭合或未到达曲面边界,就会继续查找相邻节点中的等值线元素,并将其连接到现有等值线线段。3) As long as the contour is not closed or does not reach the surface boundary, it will continue to find the contour element in the adjacent node and connect it to the existing contour segment.
一种基于高质量测地等值线的3D打印方法,包括以下步骤:A 3D printing method based on high-quality geodesic contours, comprising the following steps:
(1)获取3D打印图像的输入模型;(1) Obtain an input model of a 3D printing image;
(2)生成高质量测地等值线;(2) Generate high-quality geodesic contours;
(3)将步骤(2)得到的测地等值线连接成连续的刀具路径;(3) connecting the geodesic contours obtained in step (2) into a continuous tool path;
(4)平滑刀具路径,同时保持间隙变化尽可能小;(4) Smoothing the tool path while keeping the gap variation as small as possible;
(5)最后完成3D打印即可。(5) Finish the 3D printing at last.
进一步的,所述步骤(2)同所述高质量测地等值线的生成方法。Further, the step (2) is the same as the method for generating high-quality geodesic contours.
与现有技术相比,本发明的优点和有益效果在于:Compared with prior art, advantage and beneficial effect of the present invention are:
本发明能够在三角形网格上计算出高质量的测地距离场等值线,为了可视化质量,将结果与基线(在细分网格上计算的更精确的解决方案)叠加。本发明保证测地回溯不能跨越脊曲线,从而有望达到理想的精度。在与分段线性方法比较来说,本发明显著地降低了平均误差,并且消耗内存较少,克服了分段线性产生的平脊缺陷和偏微分方程对三角测量的敏感性导致的部分等值线不准确的问题。The invention enables the computation of high-quality geodesic distance field contours on triangular meshes, overlaying the results with a baseline (a more accurate solution computed on subdivided meshes) in order to visualize the quality. The invention guarantees that the geodesic backtracking cannot cross the ridge curve, so ideal precision is expected to be achieved. Compared with the piecewise linear method, the present invention significantly reduces the average error, consumes less memory, and overcomes the flat ridge defect produced by the piecewise linear method and the partial equivalence caused by the sensitivity of the partial differential equation to triangulation. Inaccurate line problem.
本发明能够提高测地等值线提取的精度,且将该方法应用到图像提取相关的技术领域中。The invention can improve the precision of geodesic contour extraction, and the method is applied to the technical field related to image extraction.
附图说明Description of drawings
图1为实施例1中图像测地等值线的基本流程图。FIG. 1 is a basic flow chart of image geodesic contours in Embodiment 1.
图2为显示了两个站点的Apollonius图。Figure 2 is an Apollonius diagram showing two sites.
图3显示了一组9个站点的Apollonius图。Figure 3 shows the Apollonius diagram for a set of 9 sites.
图4为实施例2中等值线连接成连续的刀具轨迹图。Fig. 4 is a diagram of continuous tool trajectory connected by contour lines in Embodiment 2.
图5为实施例2中刀具路径生成图。FIG. 5 is a diagram of tool path generation in Embodiment 2. FIG.
具体实施方式detailed description
以下通过具体实施例并结合附图对本发明进一步解释和说明。The present invention will be further explained and described below through specific embodiments in conjunction with the accompanying drawings.
实施例1:以具体图像为例进行方法说明。Embodiment 1: The method is described by taking a specific image as an example.
一种高质量测地等值线的生成方法,如图1所示,包括以下步骤:A method for generating high-quality geodesic contours, as shown in Figure 1, includes the following steps:
S1:对图像数据进行预处理,得到图像的三角形网格数据;S1: Preprocessing the image data to obtain the triangle mesh data of the image;
S2:计算到网格顶点的测地线距离,以及三角形网格边缘的所有三等分点;测地线距离的计算,包括计算几何、偏微分方程和基于图形的方法;采用该方法来计算所有网格顶点的测地线距离。S2: Calculation of geodesic distances to mesh vertices, and all trisector points of triangular mesh edges; computation of geodesic distances, including computational geometry, partial differential equations, and graph-based methods; employing the method to compute The geodesic distance of all mesh vertices.
S3:为每个三角形网格边缘生成三次插值函数;S3: Generate a cubic interpolation function for each triangle mesh edge;
S4:从每个三等分线边缘取k个均匀间隔的样本点,并推断样本点处的近似测地线距离;S4: Take k evenly spaced sample points from the edge of each trisector, and infer the approximate geodesic distance at the sample points;
S5:根据采样点的距离加权计算Apollonius图,将三角形划分为几个部分,再提取每个部分的测地等值线,即得到高质量测地等值线;所述采样点为三等分点和样本点。S5: Calculate the Apollonius diagram according to the weighted distance of the sampling points, divide the triangle into several parts, and then extract the geodesic contours of each part to obtain high-quality geodesic contours; the sampling points are trisected points and sample points.
所述S3中,由于使用二次插值的距离预测不如三次插值精确,需要较少的先验距离信息,并且可以以少量额外的计算成本保持距离场的关键性质,们通过三次插值推断网格边缘的测地线距离;所述三次插值函数具体为:In said S3, since the distance prediction using quadratic interpolation is not as accurate as cubic interpolation, requires less prior distance information, and can maintain the key properties of the distance field with a small additional computational cost, we infer the grid edges by cubic interpolation The geodesic distance; the cubic interpolation function is specifically:
(1)对网格边缘取两个三等分点,(2)运行现有的算法,计算三等分的测地距离,(3)生成3次插值函数来模拟沿网格边缘的距离变化;设e=v1v2为网格边,d1、d2、d3、d4分别为v1、(2v1+v2)/3、(v1+2v2)/3、v2的距离值;(1) Take two trisecting points for the grid edge, (2) Run the existing algorithm to calculate the geodesic distance of the trisect, (3) Generate a 3rd order interpolation function to simulate the distance change along the grid edge ; Let e=v1v2 be the grid edge, d1, d2, d3, d4 are the distance values of v1, (2v1+v2)/3, (v1+2v2)/3, v2 respectively;
三次插值函数为:The cubic interpolation function is:
进一步的,所述S5中,Further, in said S5,
Voronoi图是根据到一组点{xi∈Ω}ni=1(称为站点或生成器)的直线距离将给定域划分为区域,其中xi支配子区域Ωi:{x∈Ω|||x-xi||≤||x-xj||,j≠i}.这称为站点xi的Voronoi单元。Apollonius图是Voronoi的变体。A Voronoi diagram divides a given domain in terms of straight-line distances to a set of points {xi∈Ω}ni=1 (called stations or generators) Divide into regions where xi dominates the subregion Ω i : {x ∈ Ω|||xx i ||≤||xx j ||, j≠i}. This is called the Voronoi cell of site xi. Apollonius diagrams are a variant of Voronoi.
Apollonius定义为Ωi:{x∈Ω|||x-xi||-wi≤||x-xj||-wj,j≠i}.;Apollonius图完成后,构建Apollonius顶点和步骤(2-2,3)中已取的点进行三角剖分;Apollonius is defined as Ω i : {x∈Ω|||xx i ||-w i ≤||xx j ||-w j , j≠i}.; After the Apollonius graph is completed, construct Apollonius vertices and steps (2- 2,3) The points that have been taken are triangulated;
图2显示了两个站点的Apollonius图。当{wi}巧合相等时,Apollonius图简化为传统的Voronoi图。恰好属于两个Apollonius单元的连接点集称为Apollonius边,它们是双曲线,而属于两个以上Apollonius单元的点称为Apollonius顶点。图3显示了一组9个站点的Apollonius图。如果权重为正,则可以将Apollonius图视为一组圆的Voronoi图。圆外的点具有正距离,而圆内的点具有负距离。然而,与Voronoi图中的站点不同,站点Pi可能有一个空单元格。如果是这种情况,我们称该站点为隐藏。未隐藏的站点将被称为可见站点。如果所有权重相加相同的值,Apollonius图不会改变。Figure 2 shows the Apollonius diagram for the two sites. When the {wi} coincidences are equal, the Apollonius diagram reduces to a traditional Voronoi diagram. The sets of connecting points that belong to exactly two Apollonius cells are called Apollonius edges, which are hyperbolas, while the points that belong to more than two Apollonius cells are called Apollonius vertices. Figure 3 shows the Apollonius diagram for a set of 9 sites. If the weights are positive, the Apollonius diagram can be viewed as a Voronoi diagram of a set of circles. Points outside the circle have positive distances, while points inside the circle have negative distances. However, unlike stations in a Voronoi diagram, station Pi may have an empty cell. If this is the case, we call the site hidden. Sites that are not hidden will be referred to as visible sites. The Apollonius graph does not change if all weights add up to the same value.
其中值得注意的是与传统的Voronoi图不同,Apollonius图由直线段和双曲段组成。一般来说,Apollonius图中的一个位点可能会支配一个多重连接的细胞。每个单元都必须单独连接,这可以归因于相同的原因:测地线不能通过脊点。It is worth noting that unlike the traditional Voronoi diagram, the Apollonius diagram is composed of straight line segments and hyperbolic segments. In general, a site in an Apollonius diagram may dominate a multiply connected cell. Each cell must be connected individually, which can be attributed to the same reason: geodesics cannot pass through ridge points.
所以可以证明,只要三角形面f不包含一个源点,可以将f划分为m个区域,其中m不能超过f的有界边上的样本点总数的个数(Apollonius图中可能存在隐藏点)。通过对非隐藏点逐一访问,可以将三角形面f划分为若干部分,每部分由直线段和双曲线段包围。事实上,通过以主站点为伪源,很容易推断出每个部分的测地线距离。可以证明,对于任意一个目的点p,从p到最近源点的测地线路径除了该脊点是一个鞍顶点外,不能穿过一个脊点,也就是说,该脊曲线是一个分割波峰。使得岭曲线不同侧的点定义了不同的梯度方向。在Apollonius图的帮助下,可以保证测地线回溯不能跨越山脊曲线,从而有望达到理想的精度。So it can be proved that as long as the triangular surface f does not contain a source point, f can be divided into m regions, where m cannot exceed the total number of sample points on the bounded edge of f (there may be hidden points in the Apollonius graph). By visiting the non-hidden points one by one, the triangular surface f can be divided into several parts, each part is surrounded by straight line segments and hyperbolic segments. In fact, by taking the main site as a pseudo-source, it is easy to infer the geodesic distance of each section. It can be proved that, for any destination point p, the geodesic path from p to the nearest source point cannot pass through a ridge point except that the ridge point is a saddle vertex, that is, the ridge curve is a split crest. Such that points on different sides of the ridge curve define different gradient directions. With the help of the Apollonius diagram, it can be guaranteed that the geodesic backtracking cannot cross the ridge curve, thus hopefully achieving the desired accuracy.
所述S5中,计算并提取测地距离场的等值线,先提取单个三角网格中所有区域的测地等值线,然后逐个三角网格提取每个部分的测地等值线,并将所有等值线元素合并为一个完整的等值线元素;具体为:In said S5, calculate and extract the contour of the geodesic distance field, first extract the geodesic contour of all regions in a single triangular grid, and then extract the geodesic contour of each part one by one, and Merge all contour elements into a complete contour element; specifically:
(1)定义每个子区域的线性函数,经观察每个区域内的测地线距离场基本上是线性的;(1) Define the linear function of each sub-region, and observe that the geodesic distance field in each region is basically linear;
(2)然后收集所有子区域,并使用图来编码邻接关系;该图允许在固定时间O(1)内计算任意点对(不一定是网格顶点)之间的测地线距离;(2) All subregions are then collected and a graph is used to encode the adjacency relations; this graph allows computation of geodesic distances between arbitrary pairs of points (not necessarily mesh vertices) in constant time O(1);
(3)将每个子区域作为一个节点,并将等值线元素保留在相应的节点中,通过访问节点来生成完整的等值线:(3) Treat each subregion as a node, and keep the contour element in the corresponding node, and generate a complete contour by visiting the node:
1)假设提取d处的等值线;1) Assume that the contour line at d is extracted;
2)找到距离为d的待定等值线元素,并将该元素标记为“固定”;2) Find the undetermined contour element whose distance is d, and mark this element as "fixed";
3)只要等值线未闭合或未到达曲面边界,就会继续查找相邻节点中的等值线元素,并将其连接到现有等值线线段。3) As long as the contour is not closed or does not reach the surface boundary, it will continue to find the contour element in the adjacent node and connect it to the existing contour segment.
实施例2:Example 2:
一种基于高质量测地等值线的3D打印方法,包括以下步骤:A 3D printing method based on high-quality geodesic contours, comprising the following steps:
(1)获取3D打印图像的输入模型;(1) Obtain an input model of a 3D printing image;
(2)生成高质量测地等值线;(2) Generate high-quality geodesic contours;
(3)将步骤(2)得到的测地等值线连接成连续的刀具路径;利用费马螺旋生成技术将等值线连接成连续的刀具轨迹,如图4所示;(3) Connect the geodesic contours obtained in step (2) into a continuous tool path; use the Fermat spiral generation technology to connect the contours into a continuous tool path, as shown in Figure 4;
(4)平滑刀具路径,同时保持间隙变化尽可能小;时保持间隙变化尽可能小。使用传统的拉普拉斯平滑技术来表达平滑度要求,并且要求路径路径Π的相邻部分之间的p处的最宽空间不能超过间隙约束g(p,Π)(为简单起见写为g),或者等价地,最大的空圆的半径不大于g/2,(ii)p处的最窄空间尽可能接近g。令{xi}ni=1为代表刀具路径的点序列。至此,刀具路径生成,如图5所示。(4) Smooth the tool path while keeping the gap change as small as possible; while keeping the gap change as small as possible. The smoothness requirement is expressed using conventional Laplacian smoothing techniques, and requires that the widest space at p between adjacent parts of the path Π cannot exceed the gap constraint g(p,Π) (written as g for simplicity ), or equivalently, the radius of the largest empty circle is no greater than g/2, and (ii) the narrowest space at p is as close to g as possible. Let {xi}ni=1 be the sequence of points representing the tool path. So far, the tool path is generated, as shown in Figure 5.
(5)最后完成3D打印即可。(5) Finish the 3D printing at last.
利用本发明对图像提取的精确度更高,能够应用到不同场景中。The accuracy of image extraction by using the present invention is higher, and can be applied to different scenes.
在上述实施例的基础上,本发明继续对其中涉及到的技术特征及该技术特征在本发明中所起到的功能、作用进行详细的描述,以帮助本领域的技术人员充分理解本发明的技术方案并且予以重现。On the basis of the above-mentioned embodiments, the present invention continues to describe in detail the technical features involved and the functions and effects of the technical features in the present invention, so as to help those skilled in the art fully understand the present invention. technical solutions and reproduce them.
最后,虽然本说明书按照实施方式加以描述,但并非每个实施方式仅包含一个独立的技术方案,说明书的这种叙述方式仅仅是为清楚起见,本领域技术人员应当将说明书作为一个整体,各实施例中的技术方案也可以经适当组合,形成本领域技术人员可以理解的其他实施方式。Finally, although this description is described according to implementation modes, not each implementation mode only includes an independent technical solution. This description in the description is only for the sake of clarity. The technical solutions in the examples can also be properly combined to form other implementations that can be understood by those skilled in the art.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211263995.1A CN115496875A (en) | 2022-10-17 | 2022-10-17 | Method for generating high-quality measurement ground contour line |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211263995.1A CN115496875A (en) | 2022-10-17 | 2022-10-17 | Method for generating high-quality measurement ground contour line |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115496875A true CN115496875A (en) | 2022-12-20 |
Family
ID=84474594
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211263995.1A Pending CN115496875A (en) | 2022-10-17 | 2022-10-17 | Method for generating high-quality measurement ground contour line |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115496875A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119672251A (en) * | 2024-11-29 | 2025-03-21 | 重庆邮电大学 | A method for generating anisotropic triangular meshes based on Voronoi diagram and thermal method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040076313A1 (en) * | 2002-10-07 | 2004-04-22 | Technion Research And Development Foundation Ltd. | Three-dimensional face recognition |
US20080247646A1 (en) * | 2007-04-04 | 2008-10-09 | Siemens Corporate Research, Inc. | Method for segmenting an image using constrained graph partitioning of watershed adjacency graphs |
CN112287944A (en) * | 2019-07-23 | 2021-01-29 | 山东理工大学 | Object surface sampling data local morphology frame quantization and feature recognition method |
CN114445443A (en) * | 2022-01-24 | 2022-05-06 | 山东省人工智能研究院 | Interactive image segmentation method based on asymmetric geodesic distance |
-
2022
- 2022-10-17 CN CN202211263995.1A patent/CN115496875A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040076313A1 (en) * | 2002-10-07 | 2004-04-22 | Technion Research And Development Foundation Ltd. | Three-dimensional face recognition |
US20080247646A1 (en) * | 2007-04-04 | 2008-10-09 | Siemens Corporate Research, Inc. | Method for segmenting an image using constrained graph partitioning of watershed adjacency graphs |
CN112287944A (en) * | 2019-07-23 | 2021-01-29 | 山东理工大学 | Object surface sampling data local morphology frame quantization and feature recognition method |
CN114445443A (en) * | 2022-01-24 | 2022-05-06 | 山东省人工智能研究院 | Interactive image segmentation method based on asymmetric geodesic distance |
Non-Patent Citations (3)
Title |
---|
PEIHUI WANG 等: ""Robust Computation of 3D Apollonius Diagrams"", 《COMPUTER GRAPHICS FORUM》, vol. 39, no. 7, 31 December 2020 (2020-12-31) * |
王培辉: ""三维Apollonius的快速计算"", 《万方》, 25 July 2022 (2022-07-25) * |
王文嵩 等: ""离散测地距离场的高精度等值线提取"", 《图学学报》, vol. 46, no. 2, 30 April 2025 (2025-04-30) * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN119672251A (en) * | 2024-11-29 | 2025-03-21 | 重庆邮电大学 | A method for generating anisotropic triangular meshes based on Voronoi diagram and thermal method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Bajaj et al. | Error-bounded reduction of triangle meshes with multivariate data | |
CN111968231B (en) | Three-dimensional stratum modeling method based on geological map cutting section | |
Gyulassy et al. | Efficient computation of Morse-Smale complexes for three-dimensional scalar functions | |
Buchegger et al. | Planar multi-patch domain parameterization via patch adjacency graphs | |
van Kreveld | Geographic information systems | |
CN102831645A (en) | Method for establishing digital elevation model applied to submarine topography | |
Conroy et al. | ADMESH: An advanced, automatic unstructured mesh generator for shallow water models | |
JP4783100B2 (en) | Method of converting boundary data into in-cell shape data and its conversion program | |
CN104572924A (en) | Multiscale expression information generating method for GIS (geographic information system) vector building polygon | |
US20120191423A1 (en) | Method for local refinement of geometric or physical representation | |
CN115496875A (en) | Method for generating high-quality measurement ground contour line | |
CN105931297A (en) | Data processing method applied to three-dimensional geological surface model | |
CN114510775B (en) | A 3D Space Curved Meshing Method for Complex Models | |
Huang et al. | Adaptive Sampling Technique for Free-Form Surface of Aero-Engine Blades Based on Discrete Curvature | |
Foley et al. | Visualizing and modeling unstructured data | |
CN114840896A (en) | Waterlogging simulation analysis method based on urban road BIM | |
CN101950431A (en) | Method for detecting umbilical point on triangle mesh curved surface | |
CN118298117A (en) | Three-dimensional multi-level geological model construction method | |
Lopes | Accuracy in scientific visualisation | |
CN115965764A (en) | Method and device for tetrahedron grid division of complex geological model for calculating surface subsidence | |
Yuan et al. | 3D geological fine modeling and dynamic updating method of fault slope in open-pit coal mine | |
Saye | An algorithm to mesh interconnected surfaces via the Voronoi interface | |
Zhou et al. | Scattered data fitting with simplex splines in two and three dimensional spaces | |
Kennie et al. | Digital terrain modelling | |
CN105894580A (en) | Method for processing curved surface extension data in three-dimensional geological surface 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 |