A method, medium and device for rapid fusion modeling of route three-dimensional scene

By constructing an adaptive quadtree structure and a dynamic edge sequence based on the folding cost coefficient, the problem of low fusion modeling efficiency of railway and highway routes in the existing technology is solved, and the fusion modeling effect of high precision and high efficiency is achieved.

CN119741433BActive Publication Date: 2025-05-16CENT SOUTH UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510227794.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2025-05-16
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

The prior art is inefficient and difficult to meet the synchronous update requirements of the design scheme when integrating three-dimensional scenarios of railway and highway routes.

Method used

By constructing an adaptive quad-tree structure of irregular terrain point cloud data, eliminating the edge cracks of leaf node terrain tile, and efficient merging and simplifying the terrain tile model based on dynamic edge sequences of folding cost coefficients, finally completing the fusion model of the route three-dimensional scene.

Benefits of technology

High-precision and high-efficiency three-dimensional scene fusion modeling is realized, reducing the number of point set traversals in the terrain division process, maintaining the integrity and accuracy of terrain data, and improving modeling efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119741433B_ABST
    Figure CN119741433B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of railway modeling, and discloses a method, medium and device for rapid fusion modeling of a three-dimensional scene of a route, including the following steps: constructing an adaptive quadtree structure of irregular terrain point cloud data; constructing a terrain tile model corresponding to each node in the adaptive quadtree; and fusion modeling of the three-dimensional scene of the route. The present invention adaptively establishes a quadtree structure through the spatial distribution density of point cloud data, thereby reducing the number of traversals of point sets in the process of dividing terrain; eliminates edge cracks of leaf node terrain tiles by presetting a convex hull, and merges and simplifies terrain tile models using a dynamic edge sequence based on a folding cost coefficient, thereby minimizing the amount of geographic information lost during the simplification process; converts a three-dimensional terrain triangulation network and a three-dimensional model of a route into a two-dimensional plane projection, thereby simplifying the problem, constructing an extended boundary of the route model, and realizing seamless splicing of the route model and the terrain triangulation network, thereby maintaining the integrity and accuracy of the terrain data to the greatest extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of railway modeling, and in particular to a method, medium and equipment for rapid fusion modeling of three-dimensional route scenes. Background Art

[0002] With the continuous development of surveying and mapping technology, the cost of obtaining high-precision point cloud terrain data has been continuously reduced. High-precision point cloud data can more accurately reflect the actual terrain conditions and can be used as excellent original design data to establish terrain models to improve design accuracy. It has been widely used in the design fields of housing construction, railways (highways), bridges, tunnels and water conservancy.

[0003] The three-dimensional scene of railway (highway) routes mainly consists of two parts: terrain model and route model. Among them, the terrain model is usually composed of triangular patches; the route model is usually composed of triangles, quadrilaterals and other patches. The multi-resolution LOD (Level of Detail) technology based on point cloud data can display models of different resolutions in different areas. It has obvious advantages in improving rendering efficiency, maintaining data accuracy, and saving storage space. It is a good terrain modeling technology for the design field. The terrain model and the route model are isomers of each other. The fusion of isomer models is a key and difficult problem in building three-dimensional scenes.

[0004] There are two main fusion ideas: one is based on the idea of ​​holistic modeling, merging the point sets of heterogeneous models in the scene to form homogeneous data, and then reconnecting them to form an overall model; the other is to maintain the heterogeneous forms of the two, modify the terrain model to adapt to the boundaries of the route model, so as to achieve seamless splicing. Method 1 reconstructs all the faces to be displayed in the scene, resulting in low modeling efficiency and long time consumption. During the design process, designers usually modify the design plan repeatedly. This method cannot meet the requirements of synchronous updating of the three-dimensional model and the design plan. Method 2 makes full use of the connection relationship between the existing terrain model and the midpoint of the route model, with less calculation and higher efficiency. The mainstream algorithms include triangle cutting method and restricted Delaunay triangulation method.

[0005] Therefore, there is an urgent need for a three-dimensional scene modeling method for railway and highway routes to solve the problems existing in the prior art. Summary of the invention

[0006] The purpose of the present invention is to provide a high-precision and high-efficiency method, medium and device for rapid fusion modeling of route three-dimensional scenes, and the specific technical scheme is as follows:

[0007] A method for rapid fusion modeling of a route three-dimensional scene comprises the following steps:

[0008] S1: Construct an adaptive quadtree structure for irregular terrain point cloud data, including:

[0009] Evenly divide the known irregular terrain point cloud data into multiple pre-divided terrain blocks;

[0010] Obtain leaf node terrain blocks of the adaptive quadtree according to the number of points contained in each pre-divided terrain block;

[0011] Merge the leaf node terrain blocks upward to generate branch node terrain blocks;

[0012] S2: Construct the terrain tile model corresponding to each node in the adaptive quadtree, including:

[0013] Eliminate cracks on the edges of leaf node terrain tiles;

[0014] Construct the terrain tile model corresponding to the leaf nodes in the adaptive quadtree;

[0015] Construct a dynamic edge sequence based on the folding cost coefficient, and generate a terrain tile model corresponding to the branch node in the adaptive quadtree based on the dynamic edge sequence;

[0016] S3: Fusion modeling of the route 3D scene, including:

[0017] Determine the extension boundaries of the route model;

[0018] Divide the non-triangulated network area enclosed by the extended boundary of the route model and the boundary of the route model into a plurality of terrain void area polygons;

[0019] The terrain void area polygons are triangulated to seamlessly connect the route model with the terrain triangulated network in the corresponding terrain tile model, thus completing the fusion modeling of the route three-dimensional scene.

[0020] Preferably, the specific steps of constructing a quadtree structure of adaptive irregular terrain point cloud data are as follows:

[0021] S1-1: Based on the known irregularly distributed terrain point cloud data, the total number of points is , set the leaf node terrain block to contain the point count threshold , set the quadtree root node level Level 0, pre-divided terrain levels Satisfy the following formula:

[0022] ;

[0023] in, For Rounding;

[0024] The entire terrain block is evenly divided into segments, thereby dividing them evenly into Block pre-divided terrain blocks;

[0025] S1-2: Record the information of each pre-divided terrain block obtained in S1-1, and the corresponding node number of the pre-divided terrain block The calculation method is as follows:

[0026] ;

[0027] in, and are the index numbers of the pre-divided terrain blocks in the x and y directions respectively. The level where the pre-divided terrain blocks are located;

[0028] The pre-divided terrain block range is used to record the range information of the terrain block, and its calculation method is as follows:

[0029] ;

[0030] in, For the entire terrain block range, To pre-divide the terrain block range;

[0031] S1-3: Traverse each pre-divided terrain block and calculate the number of points it contains The value of is further processed to obtain all leaf node terrain blocks of the adaptive quadtree;

[0032] S1-4: Based on S1-3, all leaf node terrain blocks are merged upward to generate the remaining branch node terrain blocks, which includes: locating the leaf node terrain block at the highest level, and generating all branch node terrain blocks of the adaptive quadtree from the bottom to the top layer by layer, so as to obtain a complete adaptive quadtree structure of irregular terrain point cloud data;

[0033] Like leaf nodes, branch nodes need to record the level, index numbers in the x and y directions, and corresponding node number information; the indexing method between the parent terrain block node number and the child terrain block node number is as follows:

[0034] ;

[0035] in, is the ID of the parent node; is the index number of the parent node in the x and y directions; and are the levels of parent nodes and child nodes respectively; , , and They are the numbers of the lower left, upper left, lower right, and upper right child nodes respectively;

[0036] Parent node terrain block range middle and Pick of and , and Pick In and ; The parent node terrain block contains points that are the sum of all child node terrain blocks.

[0037] Preferably, the specific steps of S1-3 are as follows:

[0038] Determine the number of points contained in the pre-divided terrain block If the value is 0, the terrain block is discarded; if the value is less than the leaf node terrain block contains point count threshold and the value is not 0, then the pre-divided terrain block is added to the merge queue; if the value is equal to , then mark the pre-divided terrain block as a leaf node terrain block; if the value is greater than , then add the pre-divided terrain block to the decomposition queue;

[0039] For the pre-divided terrain block in the merge queue, the following operations are performed: merge it with the other three sub-terrain blocks belonging to the same parent terrain block to obtain its merged terrain block, and determine whether the merged terrain block contains points and The size relationship of is: if it is less than, the merged terrain block and the other three sub-terrain blocks are discarded, and the merged terrain block is added to the merge queue; if it is equal to, the merged terrain block and the other three sub-terrain blocks are discarded, and the merged terrain block is marked as a leaf node terrain block; if it is greater than, the terrain block is marked as a leaf node terrain block; after the processing is completed, the merged terrain block is removed from the merge queue;

[0040] For the pre-divided terrain block in the decomposition queue, set it as the initial terrain block, set its contained point set as the initial point set, set its level as the initial level, and then recursively adopt the adaptive leaf node generation strategy of traversing each pre-divided terrain block after pre-division, and remove the pre-divided terrain block from the decomposition queue after processing;

[0041] After traversing and processing the merge queue and the decomposition queue until there are no terrain blocks in the two queues, all leaf node terrain blocks of the adaptive quadtree are obtained.

[0042] Preferably, the specific steps of constructing the terrain tile model corresponding to each node in the adaptive quadtree are as follows:

[0043] S2-1: directly setting the boundary of each leaf node tile model as the rectangular boundary of the terrain block and realizing seamless connection, which includes: obtaining the three-dimensional coordinate data of the four rectangular vertices of the leaf node terrain block, adding the four vertices to the included point set of the leaf node terrain block to which they belong, connecting the four vertices to form a preset convex hull, thereby forming an initial triangulated network boundary that ensures that the seams of adjacent leaf node tile models are completely overlapped;

[0044] The x and y coordinates of the four rectangular vertices can be obtained from the leaf node terrain block range Determine that the x and y coordinates of the lower left, upper left, lower right, and upper right vertices are , , , ,The method of acquiring vertex elevation data is as follows: take out the four closest points to the vertex from the four terrain blocks to which the vertex belongs, where the closest points refer to the closest Euclidean distance of the three-dimensional coordinates of the two terrain points, connect these four points to generate two triangles, find the triangle containing the vertex, and obtain the vertex elevation through triangle interpolation;

[0045] S2-2: Based on the initial triangulated network boundary obtained in S2-1, a terrain tile model corresponding to the leaf node in the adaptive quadtree is constructed by point-by-point insertion method;

[0046] S2-3: Define the edge folding cost coefficient, which is used to compare the loss of geographic information after folding different edges in the triangulated network;

[0047] S2-4: Construct a dynamic edge sequence based on the folding cost coefficient, including:

[0048] The boundary lines of the tile model that cannot be folded and the endpoints of the terrain feature lines are marked as restriction points, and the edges with restriction points as endpoints are set as restriction edges that do not allow folding, and the remaining edges are non-restriction edges that can be folded;

[0049] Get the folding cost coefficient of any unrestricted edge;

[0050] Sort the values ​​of the folding cost coefficients from small to large to obtain an edge sequence based on the values ​​of the folding cost coefficients;

[0051] Each time a fold occurs, the directly affected edges are the edges to which the two endpoints of the folded edges belong. The old edges are directly removed, and new edges with simplified points as endpoints are constructed as directly affected edges. The removal and reconstruction of directly affected edges will affect the edges connected to them, and all edges connected to the newly generated edges are indirectly affected edges. After each folding operation is completed, the folding cost coefficients of the directly affected edges and the indirectly affected edges are recalculated, and the edge sequence is reordered to obtain a dynamic edge sequence of the folding cost coefficients.

[0052] S2-5: Based on the dynamic edge sequence of S2-4, the terrain tile model is merged and simplified, and the terrain tile model corresponding to each branch node in the adaptive quadtree is generated.

[0053] Preferably, the specific steps of constructing the folding cost coefficient are as follows:

[0054] Get the endpoints of the folded edge , and midpoint ;

[0055] Deleting points from the TIN and Point and all points contained in it and Point The edge of

[0056] The midpoint Insert into the triangulated network and place the midpoint The two endpoints of each side of the outer polygon are Connect to form new triangles and add them to the triangulated network;

[0057] Defines the cost coefficient of collapsing edges in a pair of deformed triangles , the specific calculation formula is as follows:

[0058] ;

[0059] in, and Represents the two side vectors of the triangle that are deleted before deformation; and Represents the two new side vectors of the deformed triangle; and Respectively represent the normal vectors of the normalized triangle patch before and after deformation;

[0060] Defines the folding cost coefficient of an edge : For a certain edge, each pair of deformed triangles produced by its folding has a corresponding value, thus generating a Sequence; set a folding cost coefficient threshold ,when The maximum value in the sequence Greater than or equal to When folding this edge, it is believed that folding this edge will cause a large deviation in one or some triangles before and after the change. Set to ;when Less than When , the deviation of all triangular facets generated by folding this edge is considered acceptable. Set to The average value of the sequence; the folding cost coefficient of an edge The smaller the value, the less geographic information is lost after folding this edge.

[0061] Preferably, the specific steps of generating the terrain tile model corresponding to each branch node in the adaptive quadtree are as follows:

[0062] ①. Merge the sub-node terrain tile models to generate a new merged triangulated network;

[0063] ②, traverse all the edges in the new merged triangulation network, calculate the folding cost coefficient of each edge, and construct the edge sequence;

[0064] ③. Select the first edge in the edge sequence, that is, the edge with the smallest folding cost coefficient, for folding;

[0065] ④. Calculate the folding cost coefficient of the newly generated edge, remove the old edge from the sequence, and add the new edge to the sequence;

[0066] ⑤. Calculate and update the folding cost coefficient of the indirect impact edge;

[0067] ⑥ Re-sort the edge sequence based on the folding cost coefficient value;

[0068] ⑦. Determine whether the number of points included in the merged terrain tile model is not greater than the threshold of the number of points included. If it is, go to step ③; if it is not, the process ends and the corresponding branch node terrain tile model is obtained.

[0069] Preferably, the specific steps of fusion modeling of the route three-dimensional scene are as follows:

[0070] S3-1: traverse each point in the 3D terrain triangulation network, remove its z coordinate, retain only the x and y coordinates, maintain the connection relationship between the points in the original 3D terrain triangulation network, and thus convert the 3D terrain triangulation network into a 2D plane triangulation network; for the route model boundary, remove the elevation information of all points, retain only the plane coordinates of the points, and connect them according to the connection method in the original 3D boundary line to obtain the plane projection of the route model boundary;

[0071] S3-2: Based on the two-dimensional plane triangulation network in S3-1 and the plane projection of the route model boundary, all edges in the two-dimensional plane triangulation network that intersect with the plane projection of the route model boundary are identified through a geometric algorithm;

[0072] S3-3: Delete all the intersecting edges in S3-2, obtain the outer polyline of the plane projection of the route model boundary, which is the plane projection of the extended boundary of the route model, and find the outer polyline of the route model boundary in the terrain triangulation according to the corresponding points, which is the extended boundary of the route model;

[0073] S3-4: projecting the characteristic cross sections constituting the route model onto a plane, i.e., multiple line segments perpendicular to the center line of the route, extending the line segments to both ends to obtain two intersection points of the plane projection with the extended boundary of the route model, traversing the plane projection line segments of all characteristic cross sections, and recording the plane coordinates of all intersection points;

[0074] S3-5: Based on the intersection points obtained in S3-4, the elevation information of all intersection points is determined by the coordinate interpolation method of a point on an edge of the terrain triangulation network;

[0075] S3-6: Based on two adjacent characteristic cross sections on the route model, the extended boundary of the route model and the extended area without triangulated network enclosed by the boundary of the route model are divided into a plurality of terrain void area polygons composed of closed polylines, and the edges of the terrain void area polygons are composed of a part of the boundary of the route model, a part of the extended boundary of the route model and the extended line of the adjacent characteristic cross section;

[0076] S3-7: triangulate each terrain void area polygon using a dichotomy method combined with void circumscribed circle detection triangulation;

[0077] S3-8: Remove all points and edges within the extended boundary of the route model in the terrain triangulation network, and fill the route model surrounded by the extended boundary after the secondary processing into the triangulation network in the corresponding terrain tile model to complete the fusion modeling of the route three-dimensional scene.

[0078] Preferably, the specific steps of triangulating the terrain void area polygon in S3-7 are as follows:

[0079] Step 1: Get the edges of the terrain void polygon, use the boundary of the route model as the starting edge, and the rest as the basic polyline ;

[0080] Step 2: From the basic polyline Remove the , A little outside , until the triangle The formed circumscribed circle does not contain other vertices on the terrain void area polygon, and proceed to the next step;

[0081] Step 3: The triangle Add to the triangulation network and add the basic polyline from Divide into two, forming Duan He part;

[0082] Step 4: Duan He Base polyline Process it and determine whether the number of vertices is greater than 3. If so, take the corresponding start and end point connection as the starting edge and go to step 2. If not, end this branch.

[0083] Step 5: After all branches are completed, the triangulation of the terrain void area polygon is completed.

[0084] The application of the technical solution of the present invention has the following beneficial effects:

[0085] (1) The present invention provides a fast fusion modeling method for a route three-dimensional scene, which adaptively establishes a quadtree structure based on the spatial distribution density of point cloud data. First, the terrain blocks are evenly divided according to the number of point clouds and the point count threshold of a single terrain block, and then each pre-divided terrain block is traversed and further operated according to the number of points contained therein. After the traversal is completed, all leaf node terrain blocks are generated, and then merged upward to generate the remaining branch node terrain blocks, thereby forming a complete quadtree structure. This process reduces the number of traversals of the point set in the process of dividing the terrain, and the number of points contained in each leaf node terrain block of the generated quadtree is roughly equal, which can better match the spatial distribution characteristics of irregular terrain point cloud data.

[0086] (2) The present invention eliminates the edge cracks of leaf node terrain tiles by presetting the convex hull, thereby solving the problem that the geographic information at the edge of the tile is lost when the terrain tile model is merged and simplified; by defining the folding cost coefficient of the edge, the importance of a certain edge in the triangulation network can be intuitively and effectively measured. By using a dynamic edge sequence based on the folding cost coefficient, the merging and simplification of the terrain tile model can be efficiently realized, and the loss of geographic information during the simplification process can be minimized.

[0087] (3) The present invention converts the three-dimensional terrain triangulation network and the three-dimensional route model into a two-dimensional plane projection, and directly processes the three-dimensional spatial data in the two-dimensional plane, thereby simplifying the problem and avoiding the complex spatial line-surface intersection and surface-surface intersection problems; by constructing the extended boundary of the route model, the route model and the terrain triangulation network are seamlessly connected, which not only solves the geometric conflict but also maintains the integrity and accuracy of the terrain data to the greatest extent; by decomposing the terrain void area enclosed by the extended boundary of the route model and the boundary of the route model into multiple terrain void area polygons, and using the binary method combined with the void circumscribed circle detection triangulation to triangulate the terrain void area polygons in parallel, not only the efficiency is improved, but also the problem of narrow and long triangles that may occur in traditional methods such as the ear clipping method and the scanning method is avoided.

[0088] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for rapid fusion modeling of the three-dimensional scene of the route is implemented.

[0089] The present invention also provides an electronic device, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the aforementioned method for rapid fusion modeling of a route three-dimensional scene by executing the executable instructions.

[0090] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0091] The accompanying drawings, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0092] Figure 1 is a flow chart of a method for rapid fusion modeling of a route three-dimensional scene in an embodiment;

[0093] Figure 2 A schematic diagram of a process for generating all leaf nodes of an adaptive quadtree in an embodiment;

[0094] Figure 3 A schematic diagram of pre-dividing terrain blocks in an embodiment;

[0095] Figure 4 A schematic diagram of solution parameters of the folding cost coefficient in the embodiment;

[0096] Figure 5 A schematic diagram of a terrain void area polygon in an embodiment;

[0097] Figure 6 Schematic diagram of the dichotomy method for detecting triangulation in combination with an empty circumscribed circle in an embodiment. DETAILED DESCRIPTION

[0098] The embodiments of the present invention are described in detail below with reference to the accompanying drawings. Example

[0099] like Figure 1 As shown, a method for rapid fusion modeling of a route three-dimensional scene is used for three-dimensional scene modeling in the field of railway (highway) design, including the following steps:

[0100] S1: Construct an adaptive quadtree structure for irregular terrain point cloud data, such as Figure 2 As shown, specifically including:

[0101] S1-1: Based on the known irregularly distributed terrain point cloud data, the total number of points is , set the leaf node terrain block to contain the point count threshold , set the quadtree root node level Level 0, pre-divided terrain levels Satisfy the following formula:

[0102] ;

[0103] in, For Rounding;

[0104] like Figure 3 As shown, the entire terrain block is evenly divided into segments, thereby dividing them evenly into Block pre-divided terrain blocks;

[0105] S1-2: Record the information of each pre-divided terrain block obtained in S1-1, and the corresponding node number of the pre-divided terrain block The calculation method is as follows:

[0106] ;

[0107] in, and are the index numbers of the pre-divided terrain blocks in the x and y directions respectively. The level where the pre-divided terrain blocks are located;

[0108] The pre-divided terrain block range is used to record the range information of the terrain block, and its calculation method is as follows:

[0109] ;

[0110] in, For the entire terrain block range, To pre-divide the terrain block range;

[0111] S1-3: Traverse each pre-divided terrain block and calculate the number of points it contains The value of is further processed to obtain all leaf node terrain blocks of the adaptive quadtree. The specific steps are as follows:

[0112] Determine the number of points contained in the pre-divided terrain block If the value is 0, the terrain block is discarded; if the value is less than the leaf node terrain block contains point count threshold and the value is not 0, then the pre-divided terrain block is added to the merge queue; if the value is equal to , then mark the pre-divided terrain block as a leaf node terrain block; if the value is greater than , then add the pre-divided terrain block to the decomposition queue;

[0113] For the pre-divided terrain block in the merge queue, the following operations are performed: merge it with the other three sub-terrain blocks belonging to the same parent terrain block to obtain its merged terrain block, and determine whether the merged terrain block contains points and The size relationship of is: if it is less than, the merged terrain block and the other three sub-terrain blocks are discarded, and the merged terrain block is added to the merge queue; if it is equal to, the merged terrain block and the other three sub-terrain blocks are discarded, and the merged terrain block is marked as a leaf node terrain block; if it is greater than, the terrain block is marked as a leaf node terrain block; after the processing is completed, the merged terrain block is removed from the merge queue;

[0114] For the pre-divided terrain block in the decomposition queue, set it as the initial terrain block, set its contained point set as the initial point set, set its level as the initial level, and then recursively adopt the adaptive leaf node generation strategy of traversing each pre-divided terrain block after pre-division, and remove the pre-divided terrain block from the decomposition queue after processing;

[0115] After traversing and processing the merge queue and the decomposition queue until there are no terrain blocks in the two queues, all leaf node terrain blocks of the adaptive quadtree are obtained.

[0116] S1-4: Based on S1-3, all leaf node terrain blocks are merged upward to generate the remaining branch node terrain blocks, which includes: locating the leaf node terrain block at the highest level, and generating all branch node terrain blocks of the adaptive quadtree from the bottom to the top layer by layer, so as to obtain a complete adaptive quadtree structure of irregular terrain point cloud data;

[0117] Like leaf nodes, branch nodes need to record the level, index numbers in the x and y directions, and corresponding node number information; the indexing method between the parent terrain block node number and the child terrain block node number is as follows:

[0118] ;

[0119] in, is the ID of the parent node; is the index number of the parent node in the x and y directions; and are the levels of parent nodes and child nodes respectively; , , and They are the numbers of the lower left, upper left, lower right, and upper right child nodes respectively;

[0120] Parent node terrain block range middle and Pick of and , and Pick In and ; The parent node terrain block contains points that are the sum of all child node terrain blocks.

[0121] S2: Construct the terrain tile model corresponding to each node in the adaptive quadtree, and eliminate the edge cracks of the terrain tile of the leaf node by presetting the convex hull; construct the terrain tile model corresponding to the leaf node in the adaptive quadtree; define the folding cost coefficient of the edge to compare the loss of geographic information after folding different edges in the triangulated network; construct a dynamic edge sequence based on the folding cost coefficient, and realize the efficient merging and simplification of the terrain tile model based on the dynamic edge sequence, so as to construct the terrain tile model corresponding to the branch node in the adaptive quadtree. The specific steps are as follows:

[0122] S2-1: Since each leaf node terrain block is a regular rectangle, the boundary of each leaf node tile model is directly set as the rectangular boundary of the terrain block to achieve seamless connection, which includes: obtaining the three-dimensional coordinate data of the four rectangular vertices of the leaf node terrain block, adding the four vertices to the included point set of the leaf node terrain block to which they belong, connecting the four vertices to form a preset convex hull, thereby forming an initial triangulated network boundary that ensures that the seams of adjacent leaf node tile models are completely overlapped;

[0123] The x and y coordinates of the four rectangular vertices can be obtained from the leaf node terrain block range Determine that the x and y coordinates of the lower left, upper left, lower right, and upper right vertices are , , , ,The method of acquiring vertex elevation data is as follows: take out the four closest points to the vertex from the four terrain blocks to which the vertex belongs, where the closest points refer to the closest Euclidean distance of the three-dimensional coordinates of the two terrain points, connect these four points to generate two triangles, find the triangle containing the vertex, and obtain the vertex elevation through triangle interpolation;

[0124] S2-2: Based on the initial triangulated network boundary obtained in S2-1, a terrain tile model corresponding to the leaf node in the adaptive quadtree is constructed by point-by-point insertion method;

[0125] S2-3: Define the edge folding cost coefficient to compare the loss of geographic information after folding different edges in the triangulation network; the specific steps are as follows:

[0126] The terrain tile models of the four child nodes are merged to obtain the terrain tile model of the parent node. The number of points contained in the merged terrain tile is approximately the point count threshold in S1-1. The edge folding algorithm is to fold a certain edge in the triangulated network into a simplified point according to certain rules, reconstruct the triangulated network, thereby reducing the number of terrain points and achieving the purpose of simplifying the model. In order to minimize the loss of geographic information and keep the distribution of points relatively uniform, the folded point can be selected as the midpoint of the original edge. The edge folding process is as follows:

[0127] Get the endpoints of the folded edge , and midpoint ;

[0128] Deleting points from the TIN and Point and all containing points and Point The edge of

[0129] The midpoint Insert into the triangulated network and place the midpoint The two endpoints of each side of the outer polygon are Connect to form new triangles and add them to the triangulated network;

[0130] The edge collapse process usually reduces a terrain point ( and become ) and two triangles (with and The two adjacent triangles where the edges with the endpoints are located) are in a one-to-one correspondence between the new triangles generated during the edge folding process and the triangles before the folding. A pair of triangles before and after the folding is called a deformed triangle. The closer the normal vectors of each group of deformed triangle faces are, the smaller the change in the terrain tile model before and after the folding, and the less the loss of geographic information before and after the folding, that is, the edges should be folded first. In spatial geometry, the similarity of two normal vectors is usually expressed by their normalized dot product result. The larger the value, the closer they are. The folding cost coefficient of the edge in a pair of deformed triangles is defined in this way , the specific calculation formula is as follows:

[0131] ;

[0132] in, and Represents the two side vectors of the triangle that are deleted before deformation; and Represents the two new side vectors of the deformed triangle; and Respectively represent the normal vectors of the normalized triangle patch before and after deformation. Figure 4 ,triangle and triangle is a pair of deformed triangles. Since vectors have vector properties and vector cross multiplication does not satisfy the commutative law of multiplication, and , and There should be one-to-one correspondence, and the corresponding relationship is shown in Table 1.

[0133] Table 1 Schematic diagram of solution parameters for folding cost coefficient

[0134]

[0135] Defines the folding cost coefficient of an edge : For a certain edge, each pair of deformed triangles produced by its folding has a corresponding value, thus generating a Sequence. Set an appropriate folding cost coefficient threshold ,when The maximum value in the sequence Greater than or equal to When folding this edge, it is believed that folding this edge will cause a large deviation in one or some triangles before and after the change. Set to ;when Less than When , the deviation of all triangular facets generated by folding this edge is considered acceptable. Set to The average value of the sequence. The result of unit vector dot product is between [-1,1], so The range is between [0,1], that is The range is between [0,1]. The folding cost coefficient of an edge The smaller the value, the less geographic information is lost after folding this edge. S2-4: Construct a dynamic edge sequence based on the folding cost coefficient, including:

[0136] In order to ensure seamless connection between tile models, the boundary lines of tile models cannot be folded, and terrain feature lines such as ridge lines, valley lines, and slope toe lines cannot be folded. Therefore, the endpoints of edges that cannot be folded can be marked as restriction points, and all edges with restriction points as endpoints are set as restriction edges, and folding of restriction edges is not allowed; the remaining edges are non-restricted edges and can be folded.

[0137] Get the folding cost coefficient of any unrestricted edge; an ordered map (Map) is a container composed of some "key-value" pairs, and the container will automatically sort the "key-value" elements according to the size of the key value. The edge sequence based on the folding cost coefficient can be recorded using a Map, with the folding cost coefficient of the edge as the "key" and the edge as the "value", so as to quickly index to the corresponding edge according to the key value. The folding cost coefficient of any unrestricted edge can be obtained using the method for calculating the folding cost coefficient described in S2-3.

[0138] The values ​​of the folding cost coefficients are sorted from small to large to obtain an edge sequence based on the size of the folding cost coefficient values; not all edges will change after each folding, only some edges are affected, so a dynamic edge sequence can be maintained, and the folding cost coefficient values ​​of some affected edges can be dynamically updated after each folding to reduce repeated calculations and improve simplification efficiency.

[0139] The update of the dynamic edge sequence requires that the affected edges be determined first and then locally updated after each folding operation is completed. Each time a fold occurs, the edges directly affected are the edges to which the two endpoints of the folded edge belong. The old edges will be directly removed, and then new edges with the midpoints of the folded edges as endpoints will be constructed. These are directly affected edges. At the same time, the removal and reconstruction of these directly affected edges will affect the edges connected to them. All edges connected to the newly generated edges are indirectly affected edges. Each time a folding operation is completed, the folding cost coefficients of the directly affected edges and the indirectly affected edges need to be recalculated.

[0140] S2-5: Based on the dynamic edge sequence of S2-4, the terrain tile model is merged and simplified, and the terrain tile model corresponding to each branch node in the adaptive quadtree is generated. The specific steps are as follows:

[0141] ①. Merge the sub-node terrain tile models to generate a new merged triangulated network;

[0142] ②, traverse all the edges in the new merged triangulation network, calculate the folding cost coefficient of each edge, and construct the edge sequence;

[0143] ③. Select the first edge in the edge sequence, that is, the edge with the smallest folding cost coefficient, for folding;

[0144] ④. Calculate the folding cost coefficient of the newly generated edge, remove the old edge from the sequence, and add the new edge to the sequence;

[0145] ⑤. Calculate and update the folding cost coefficient of the indirect impact edge;

[0146] ⑥ Re-sort the edge sequence based on the folding cost coefficient value;

[0147] ⑦. Determine whether the number of points included in the merged terrain tile model is not greater than the threshold of the number of points included. If it is, go to step ③; if it is not, the process ends and the corresponding branch node terrain tile model is obtained.

[0148] S3: Fusion modeling of the route 3D scene. The specific steps are as follows:

[0149] S3-1: traverse each point in the 3D terrain triangulation network, remove its z coordinate, retain only the x and y coordinates, maintain the connection relationship between the points in the original 3D terrain triangulation network, and thus convert the 3D terrain triangulation network into a 2D plane triangulation network; for the route model boundary, remove the elevation information of all points, retain only the plane coordinates of the points, and connect them according to the connection method in the original 3D boundary line to obtain the plane projection of the route model boundary;

[0150] S3-2: Based on the two-dimensional plane triangulation network in S3-1 and the plane projection of the route model boundary, all edges in the two-dimensional plane triangulation network that intersect with the plane projection of the route model boundary are identified through a geometric algorithm;

[0151] S3-3: Delete all the intersecting edges in S3-2, obtain the outer polyline of the plane projection of the route model boundary, which is the plane projection of the extended boundary of the route model, and find the outer polyline of the route model boundary in the terrain triangulation according to the corresponding points, which is the extended boundary of the route model;

[0152] S3-4: projecting the characteristic cross sections constituting the route model onto a plane, i.e., multiple line segments perpendicular to the center line of the route, extending the line segments to both ends to obtain two intersection points of the plane projection with the extended boundary of the route model, traversing the plane projection line segments of all characteristic cross sections, and recording the plane coordinates of all intersection points;

[0153] S3-5: Based on the intersection points obtained in S3-4, the elevation information of all intersection points is determined by the coordinate interpolation method of a point on an edge of the terrain triangulation network;

[0154] S3-6: Figure 5 As shown, based on two adjacent characteristic cross sections on the route model, the extended boundary of the route model and the extended area without triangulated network enclosed by the boundary of the route model are divided into a plurality of terrain void area polygons composed of closed polylines, and the edges of the terrain void area polygons are composed of a part of the boundary of the route model, a part of the extended boundary of the route model and the extended lines of the adjacent characteristic cross sections;

[0155] S3-7: Figure 6 As shown, each terrain void area polygon is triangulated using a dichotomy method combined with void circumscribed circle detection triangulation;

[0156] The specific steps for triangulating the terrain void polygons in S3-7 are as follows:

[0157] Step 1: Get the edges of the terrain void polygon, use the boundary of the route model as the starting edge, and the rest as the basic polyline ;

[0158] Step 2: From the basic polyline Remove the , A little outside , until the triangle The formed circumscribed circle does not contain other vertices on the terrain void area polygon, and proceed to the next step;

[0159] Step 3: The triangle Add to the triangulation network and add the basic polyline from Divide into two, forming Duan He part;

[0160] Step 4: Duan He Base polyline Process it to determine whether the number of vertices is greater than 3. If so, use the corresponding start and end point connection as the starting edge and go to step 2. If not, end this branch.

[0161] Step 5: After all branches are completed, the triangulation of the terrain void area polygon is completed.

[0162] S3-8: Remove all points and edges within the extended boundary of the route model in the terrain triangulation network, and fill the route model surrounded by the extended boundary after the secondary processing into the triangulation network in the corresponding terrain tile model to complete the fusion modeling of the route three-dimensional scene.

[0163] This embodiment further discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for rapid fusion modeling of the route three-dimensional scene described above in this embodiment is implemented.

[0164] This embodiment also discloses an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method for rapid fusion modeling of a route three-dimensional scene as described above in this embodiment by executing the executable instructions.

[0165] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for rapid fusion modeling of a route three-dimensional scene, characterized in that: The steps include: S1: Construct an adaptive quadtree structure for irregular terrain point cloud data, including: Evenly divide the known irregular terrain point cloud data into multiple pre-divided terrain blocks; Obtain leaf node terrain blocks of the adaptive quadtree according to the number of points contained in each pre-divided terrain block; Merge the leaf node terrain blocks upward to generate branch node terrain blocks; S2: Construct the terrain tile model corresponding to each node in the adaptive quadtree, including: Eliminate cracks on leaf node terrain tile edges; Construct the terrain tile model corresponding to the leaf nodes in the adaptive quadtree; Construct a dynamic edge sequence based on the folding cost coefficient, and generate a terrain tile model corresponding to the branch node in the adaptive quadtree based on the dynamic edge sequence; S3: Fusion modeling of the route 3D scene, including: Determine the extension boundaries of the route model; Divide the non-triangulated network area enclosed by the extended boundary of the route model and the boundary of the route model into a plurality of terrain void area polygons; The terrain void area polygons are triangulated to seamlessly connect the route model with the terrain triangulated network in the corresponding terrain tile model, thus completing the fusion modeling of the route three-dimensional scene.

2. The method for rapid fusion modeling of a route three-dimensional scene according to claim 1, characterized in that: The specific steps for constructing an adaptive quadtree structure for irregular terrain point cloud data are as follows: S1-1: Based on the known irregularly distributed terrain point cloud data, the total number of points is , set the leaf node terrain block to contain the point count threshold , set the quadtree root node level Level 0, pre-divided terrain levels Satisfy the following formula: ; in, For Rounding; The entire terrain block is evenly divided into segments, thereby dividing them evenly into Block pre-divided terrain blocks; S1-2: Record the information of each pre-divided terrain block obtained in S1-1, and the corresponding node number of the pre-divided terrain block The calculation method is as follows: ; in, and are the index numbers of the pre-divided terrain blocks in the x and y directions respectively. The level where the pre-divided terrain blocks are located; The pre-divided terrain block range is used to record the range information of the terrain block, and its calculation method is as follows: ; in, For the entire terrain block range, To pre-divide the terrain block range; S1-3: Traverse each pre-divided terrain block and calculate the number of points it contains The value of is further processed to obtain all leaf node terrain blocks of the adaptive quadtree; S1-4: Based on S1-3, all leaf node terrain blocks are merged upward to generate the remaining branch node terrain blocks, which includes: locating the leaf node terrain block at the highest level, and generating all branch node terrain blocks of the adaptive quadtree from the bottom to the top layer by layer, so as to obtain a complete adaptive quadtree structure of irregular terrain point cloud data; Like leaf nodes, branch nodes need to record the level, index numbers in the x and y directions, and corresponding node number information; the indexing method between the parent terrain block node number and the child terrain block node number is as follows: ; in, is the ID of the parent node; is the index number of the parent node in the x and y directions; and are the levels of parent nodes and child nodes respectively; , , and They are the numbers of the lower left, upper left, lower right, and upper right child nodes respectively; Parent node terrain block range middle and Pick of and , and Pick In and ; The parent node terrain block contains points that are the sum of all child node terrain blocks.

3. The method for rapid fusion modeling of a route three-dimensional scene according to claim 2, characterized in that: The specific steps of S1-3 are as follows: Determine the number of points contained in the pre-divided terrain block If the value is 0, the terrain block is discarded; if the value is less than the leaf node terrain block contains point count threshold If the value is not 0, the pre-divided terrain block is added to the merge queue; If the value is equal to , then mark the pre-divided terrain block as a leaf node terrain block; if the value is greater than , then add the pre-divided terrain block to the decomposition queue; For the pre-divided terrain block in the merge queue, the following operations are performed: merge it with the other three sub-terrain blocks belonging to the same parent terrain block to obtain its merged terrain block, and determine whether the merged terrain block contains points and The size relationship of is: if it is less than, the merged terrain block and the other three sub-terrain blocks are discarded, and the merged terrain block is added to the merge queue; if it is equal to, the merged terrain block and the other three sub-terrain blocks are discarded, and the merged terrain block is marked as a leaf node terrain block; if it is greater than, the terrain block is marked as a leaf node terrain block; after the processing is completed, the merged terrain block is removed from the merge queue; For the pre-divided terrain block in the decomposition queue, set it as the initial terrain block, set its contained point set as the initial point set, set its level as the initial level, and then recursively adopt the adaptive leaf node generation strategy of traversing each pre-divided terrain block after pre-division, and remove the pre-divided terrain block from the decomposition queue after processing; After traversing and processing the merge queue and the decomposition queue until there are no terrain blocks in the two queues, all leaf node terrain blocks of the adaptive quadtree are obtained.

4. The method for rapid fusion modeling of a route three-dimensional scene according to claim 3, characterized in that: The specific steps for constructing the terrain tile model corresponding to each node in the adaptive quadtree are as follows: S2-1: directly setting the boundary of each leaf node tile model as the rectangular boundary of the terrain block and realizing seamless connection, which includes: obtaining the three-dimensional coordinate data of the four rectangular vertices of the leaf node terrain block, adding the four vertices to the included point set of the leaf node terrain block to which they belong, connecting the four vertices to form a preset convex hull, thereby forming an initial triangulated network boundary that ensures that the seams of adjacent leaf node tile models are completely overlapped; The x and y coordinates of the four rectangular vertices can be obtained from the leaf node terrain block range Determine that the x and y coordinates of the lower left, upper left, lower right, and upper right vertices are , , , ,The method of acquiring vertex elevation data is as follows: take out the four closest points to the vertex from the four terrain blocks to which the vertex belongs, where the closest points refer to the closest Euclidean distance of the three-dimensional coordinates of the two terrain points, connect these four points to generate two triangles, find the triangle containing the vertex, and obtain the vertex elevation through triangle interpolation; S2-2: Based on the initial triangulated network boundary obtained in S2-1, a terrain tile model corresponding to the leaf node in the adaptive quadtree is constructed by point-by-point insertion method; S2-3: Define the edge folding cost coefficient, which is used to compare the loss of geographic information after folding different edges in the triangulated network; S2-4: Construct a dynamic edge sequence based on the folding cost coefficient, including: The boundary lines of the tile model that cannot be folded and the endpoints of the terrain feature lines are marked as restriction points, and the edges with restriction points as endpoints are set as restriction edges that do not allow folding, and the remaining edges are non-restriction edges that can be folded; Get the folding cost coefficient of any unrestricted edge; Sort the values ​​of the folding cost coefficients from small to large to obtain an edge sequence based on the values ​​of the folding cost coefficients; Each time a fold occurs, the directly affected edges are the edges to which the two endpoints of the folded edges belong. The old edges are directly removed, and new edges with simplified points as endpoints are constructed as directly affected edges. The removal and reconstruction of directly affected edges will affect the edges connected to them, and all edges connected to the newly generated edges are indirectly affected edges. After each folding operation is completed, the folding cost coefficients of the directly affected edges and the indirectly affected edges are recalculated, and the edge sequence is reordered to obtain a dynamic edge sequence of the folding cost coefficients. S2-5: Based on the dynamic edge sequence of S2-4, the terrain tile models corresponding to the leaf nodes are merged and simplified, and the terrain tile models corresponding to the branch nodes in the adaptive quadtree are generated.

5. The method for rapid fusion modeling of a route three-dimensional scene according to claim 4, characterized in that: The specific steps of constructing the folding cost coefficient are as follows: Get the endpoints of the folded edge , and midpoint ; Deleting points from the TIN and Point and all containing points and Point The edge of The midpoint Insert into the triangulated network and place the midpoint The two endpoints of each side of the outer polygon are Connect to form new triangles and add them to the triangulated network; Defines the cost coefficient of collapsing edges in a pair of deformed triangles , the specific calculation formula is as follows: ; in, and Represents the two side vectors of the triangle that are deleted before deformation; and Represents the two new side vectors of the deformed triangle; and Respectively represent the normal vectors of the normalized triangle patch before and after deformation; Defines the folding cost coefficient of an edge : For a certain edge, each pair of deformed triangles produced by its folding has a corresponding value, thus generating a Sequence; set a folding cost coefficient threshold ,when The maximum value in the sequence Greater than or equal to When folding this edge, it is believed that folding this edge will cause a large deviation in one or some triangles before and after the change. Set to ;when Less than When , the deviation of all triangular facets generated by folding this edge is considered acceptable. Set to The average value of the sequence; the folding cost coefficient of an edge The smaller the value, the less geographic information is lost after folding this edge.

6. The method for rapid fusion modeling of a route three-dimensional scene according to claim 5, characterized in that: The specific steps for generating the terrain tile model corresponding to each branch node in the adaptive quadtree are as follows: ①. Merge the sub-node terrain tile models to generate a new merged triangulated network; ②, traverse all the edges in the new merged triangulation network, calculate the folding cost coefficient of each edge, and construct the edge sequence; ③. Select the first edge in the edge sequence, that is, the edge with the smallest folding cost coefficient, for folding; ④. Calculate the folding cost coefficient of the newly generated edge, remove the old edge from the sequence, and add the new edge to the sequence; ⑤. Calculate and update the folding cost coefficient of the indirect impact edge; ⑥ Re-sort the edge sequence based on the folding cost coefficient value; ⑦. Determine whether the number of points included in the merged terrain tile model is not greater than the number of points included threshold. If it is greater, go to step ③. If it is not greater than, the process ends and the corresponding branch node terrain tile model is obtained.

7. The method for rapid fusion modeling of a route three-dimensional scene according to claim 6, characterized in that: The specific steps of the fusion modeling of the route three-dimensional scene are as follows: S3-1: traverse each point in the 3D terrain triangulation network, remove its z coordinate, retain only the x and y coordinates, maintain the connection relationship between the points in the original 3D terrain triangulation network, and thus convert the 3D terrain triangulation network into a 2D plane triangulation network; for the route model boundary, remove the elevation information of all points, retain only the plane coordinates of the points, and connect them according to the connection method in the original 3D boundary line to obtain the plane projection of the route model boundary; S3-2: Based on the two-dimensional plane triangulation network in S3-1 and the plane projection of the route model boundary, all edges in the two-dimensional plane triangulation network that intersect with the plane projection of the route model boundary are identified through a geometric algorithm; S3-3: Delete all the intersecting edges in S3-2, obtain the outer polyline of the plane projection of the route model boundary, which is the plane projection of the extended boundary of the route model, and find the outer polyline of the route model boundary in the terrain triangulation according to the corresponding points, which is the extended boundary of the route model; S3-4: projecting the characteristic cross sections constituting the route model onto a plane, i.e., multiple line segments perpendicular to the center line of the route, extending the line segments to both ends to obtain two intersection points of the plane projection with the extended boundary of the route model, traversing the plane projection line segments of all characteristic cross sections, and recording the plane coordinates of all intersection points; S3-5: Based on the intersection points obtained in S3-4, the elevation information of all intersection points is determined by the coordinate interpolation method of a point on an edge of the terrain triangulation network; S3-6: Based on two adjacent characteristic cross sections on the route model, the extended boundary of the route model and the extended area without triangulated network enclosed by the boundary of the route model are divided into a plurality of terrain void area polygons composed of closed polylines, and the edges of the terrain void area polygons are composed of a part of the boundary of the route model, a part of the extended boundary of the route model and the extended line of the adjacent characteristic cross section; S3-7: triangulate each terrain void area polygon using the dichotomy method combined with void circumscribed circle detection triangulation; S3-8: Remove all points and edges within the extended boundary of the route model in the terrain triangulation network, and fill the route model surrounded by the extended boundary after the secondary processing into the triangulation network in the corresponding terrain tile model to complete the fusion modeling of the route three-dimensional scene.

8. The method for rapid fusion modeling of a route three-dimensional scene according to claim 7, characterized in that: The specific steps for triangulating terrain void polygons in S3-7 are as follows: Step 1: Get the edges of the terrain void polygon, use the boundary of the route model as the starting edge, and the rest as the basic polyline ; Step 2: From the basic polyline Remove the , A little outside , until the triangle The formed circumscribed circle does not contain other vertices on the terrain void area polygon, and proceed to the next step; Step 3: The triangle Add to the triangulation network and add the basic polyline from Divide into two, forming Duan He part; Step 4: Duan He Base polyline Process it and determine whether the number of its vertices is greater than 3. If so, take the corresponding starting and ending points as the starting edge and go to step 2. If not, end the branch; Step 5: After all branches are completed, the triangulation of the terrain void area polygon is completed.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for rapid fusion modeling of a route three-dimensional scene as described in any one of claims 1 to 8 is implemented.

10. An electronic device, characterized in that: include: processor; and a memory for storing executable instructions for the processor; Wherein, the processor is configured to execute the method for rapid fusion modeling of a route three-dimensional scene as described in any one of claims 1-8 by executing the executable instructions.

Citation Information

Patent Citations

  • Three-dimensional terrain model real-time smooth drawing method with combination of GPU technology

    CN105336003A

  • Engineering three-dimensional topographic data cutting fusion method and system

    CN114708414A