A delaunay triangulation generation method based on point cloud data and computer equipment
By sorting and segmenting the point cloud data as a whole, combining parameter presets and deduplication processing, an efficient and accurate Delaunay triangulation is generated, which solves the problems of slow network construction and low accuracy in existing technologies. It is suitable for generating contour maps and three-dimensional models from various point cloud data.
Patent Information
- Application Number
- CN202411584581.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2024-10-25
- Filing Date
- 2024-11-07
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-11-07
AI Technical Summary
Existing Delaunay triangulation generation methods have problems such as large memory usage, slow network construction speed, difficult to ensure network quality, and low network construction accuracy. In particular, the efficiency is significantly reduced when processing large-scale discrete point data, and the ability to process data points with special shapes or distributions is insufficient.
By sorting and numbering the point cloud data as a whole, generating a Delaunay triangulation after block processing, and determining the number of point clouds and block overlap of each point cloud sub-block through parameter presets, combined with cross-edge correction and deduplication processing, ensuring that the circumscribed circle of the triangle does not contain other points and the minimum internal angle is maximized, deleting invalid triangles, and finally generating a uniquely numbered Delaunay triangulation.
It realizes the rapid and efficient generation of Delaunay triangulation covering the entire area, which is applicable to continuous or discontinuous point cloud data, improves the accuracy and efficiency of network construction, and provides data support for generating contour maps, calculating the cut and fill area of roadbed cross sections, or three-dimensional real-scene models.
Smart Images

Figure CN119579824B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of point cloud data processing, and particularly relates to a Delaunay triangulation network generation method based on point cloud data and a computer device. BACKGROUND
[0002] In the field of three-dimensional laser scanning or unmanned aerial vehicle point cloud data processing, the construction and optimization of triangulation network have always been a research hotspot. Among them, the Triangulated Irregular Network (TIN) is widely used due to its small data redundancy, high storage efficiency, and good reflection of terrain characteristics. In the construction of TIN, the Delaunay triangulation network has become the focus of many scholars due to its excellent terrain fitting capability and good structural characteristics.
[0003] Delaunay triangulation network is a set of mutually adjacent and non-overlapping triangles, and each triangle does not contain other points in its circumcircle. This feature ensures the stability and optimality of the generated triangulation network in structure. Delaunay triangulation network not only satisfies the circumcircle property, but also has the largest minimum internal angle among all possible triangulation networks, further improving the accuracy and efficiency of point cloud data processing.
[0004] Traditional Delaunay triangulation network generation methods mainly include the split-merge method, the point-by-point insertion method, and the triangulation network growth method. The split-merge method divides the point set into smaller subsets recursively and generates a triangulation network in each subset, and finally merges into a complete Delaunay triangulation network. This method is efficient but has large memory usage, and the merging part needs necessary extension and a large number of regularity judgment. The point-by-point insertion method inserts points one by one into the existing triangulation network and optimizes the generated triangles. This method is simple to implement but has low efficiency. The triangulation network growth method takes a point as the starting point and generates a triangulation network by gradually expanding. This method generates quickly and has gradually become a commonly used method.
[0005] Although the fast growth method reduces unnecessary calculations by improving algorithm logic, such as region division, limiting search range, etc., there is still a lot of blindness in searching for the third point that satisfies the Delaunay rule. This blindness leads to a lot of time being consumed in invalid calculations and comparisons, especially when dealing with large-scale discrete point data, the time complexity increases significantly, and the network construction speed slows down significantly.
[0006] Secondly, in the regional division of the fast growing method, how to reasonably determine the division basis and parameters (such as the selection of the center of the circle, the value of the radius, etc.) is a big challenge. Improper division may lead to the inability to find a reasonable third point in the current partition, or the division is too fine to improve the efficiency of the algorithm, and even may reduce the network quality.
[0007] In addition, the fast growing method may not effectively avoid the overlap of triangles or produce triangles that do not comply with the Delaunay rule when dealing with special-shaped or distributed data points, thereby affecting the accuracy and reliability of the network construction.
[0008] In summary, although the fast growing method of Delaunay triangulation network improves the network construction efficiency to some extent, it still needs to further optimize the search algorithm, perfect the regional division strategy, and improve the processing ability of the algorithm for special data points to better meet the needs in practical applications. SUMMARY
[0009] The purpose of the present application is to overcome the technical defects of the existing triangular network generation method, such as large memory occupation, slow network construction speed, difficult to guarantee network construction quality, low network construction accuracy, etc., and to provide a Delaunay triangular network generation method based on point cloud data and a computer device.
[0010] In a first aspect, the present application provides a Delaunay triangular network generation method based on point cloud data, which specifically comprises the following steps:
[0011] Step 1, sort the point cloud data to be processed by coordinates as a whole to determine the overall trend of the point cloud data to be processed, and then number the point cloud data to be processed as a whole according to the overall trend;
[0012] Step 2, parameter presetting and block processing are performed on the point cloud data to be processed numbered in step 1 to form point cloud sub-blocks. Before block processing, parameter presetting is performed first, wherein parameter 1 to be preset is the number of point clouds in each point cloud sub-block; parameter 2 to be preset is the block overlap value between adjacent point cloud sub-blocks. In this step, the final number of point clouds and the corresponding number of each point cloud sub-block are determined according to the preset of parameters 1 and 2;
[0013] Step 3, generate a Delaunay triangular network for all point cloud sub-blocks to form a Delaunay triangular network; and correct the intersecting edges of the Delaunay triangular network and perform de-duplication processing to make the number of data sets in the Delaunay triangular network unique;
[0014] Step 4, check the Delaunay triangular network data obtained in step 3,
[0015] Judge whether the edge length of each triangle in the whole network Delaunay triangulation data is within the preset maximum edge length value range, and whether the angle of each triangle is within the preset minimum angle value range;
[0016] If all the conditions are met, the corresponding triangle is retained; if not, the triangle is deleted;
[0017] After completing the judgment of all triangles in the whole network Delaunay triangulation data, the current whole network Delaunay triangulation data is output as a Delaunay triangulation.
[0018] In the technical scheme of the application, by adopting numbering, blocking and allowing the blocks to overlap in proportion, the public area and the non-public area of the overlapping area are determined, and the generation of each block triangulation is performed in this way. During the generation process, the key parameters are set, and the Delaunay triangulation is quickly, efficiently and accurately established through reasonable parameter setting. Further, the triangulation formed by the non-public area points at the beginning and the end of the current block is discarded, and the triangulation in the overlapping area is processed to remove the duplicate triangulation, and finally the Delaunay whole network triangulation is generated. Using the generation method of the application, the triangulation covering the whole area can be quickly and efficiently generated, and the Delaunay triangulation can be generated for continuous (uniform) or non-continuous (non-uniform) point cloud data, which provides favorable data support for generating contour topographic maps, calculating roadbed cross-section excavation and filling area, or generating three-dimensional real scene models.
[0019] Preferably, in step 1, the specific sorting and numbering method is as follows:
[0020] According to the maximum Xmax and the minimum Xmin on the X coordinate axis, and the maximum Ymax and the minimum Ymin on the Y coordinate axis, the overall general trend of the point cloud data to be processed is determined;
[0021] It is specified that when |Xmax-Xmin|>|Ymax-Ymin|, the point cloud data to be processed is east-west trending;
[0022] It is specified that when |Xmax-Xmin|<|Ymax-Ymin|, the point cloud data to be processed is south-north trending;
[0023] The overall numbering method is as follows: for south-north trending point cloud data, Ymin is first determined, and then the X value is sorted and numbered in order; for east-west trending point cloud data, Xmin is first determined, and then the Y value is sorted and numbered in order;
[0024] The above method is used to sequentially number until all the point cloud data to be processed is numbered. The purpose of this numbering is to facilitate the next step of blocking, and to keep the aspect ratio of the blocks as small as possible.
[0025] Further preferably, in step 1, before all point clouds are sorted and numbered, the point cloud data is further deduplicated (the purpose is to ensure that the xy coordinates and numbers of each point are unique).
[0026] Preferably, in step 2, before performing block division, parameters are first preset, wherein parameter 1 to be preset is the number of point clouds in each point cloud sub-block; parameter 2 to be preset is the block overlap value between adjacent point cloud sub-blocks; in this step, the final number of point clouds and the corresponding number of each point cloud sub-block are determined based on the preset parameters 1 and 2;
[0027] The block processing is specifically as follows: first, the total number of point cloud points of the point cloud data to be processed numbered in step 1 is divided by parameter 1, and the integer is rounded up to obtain the total number of point cloud sub-blocks n, and then the total number of point cloud points is divided by the total number of point cloud sub-blocks n to obtain the average number of point clouds Ki′ in each point cloud sub-block;
[0028] According to parameter 2, determine the final number of point clouds and the corresponding point cloud number in each point cloud sub-block, and the number of point clouds and the point cloud number in the overlapping area of each point cloud sub-block, where K i =K i ′+K i+1 *c%, and E i =S i+1 .
[0029] In the technical solution of the present invention, the value range of parameter 1 is appropriately set based on the total amount of point cloud data. Different values result in different numbers of blocks. If the point cloud data volume of the object being constructed is large, the number of points in each point cloud sub-block should be set larger. If the point cloud data volume of the object being constructed is small, the number of points in each point cloud sub-block should be set smaller. This setting is made while ensuring computer operating efficiency. The minimum value must be greater than 3 to construct a triangle.
[0030] Further preferably, in step 2, after the block division is completed, it also includes determining the common part and the non-common part of the overlapping area, and deleting the triangle formed by the non-common area points at the beginning and end of the current point cloud sub-block.
[0031] When the number of point cloud sub-blocks n≥2, the first point cloud sub-block includes a non-overlapping area N1 and an end overlapping area E1, and the last point cloud sub-block includes a non-overlapping area N n and the head-end overlapping area S n , all the middle point cloud sub-blocks include non-overlapping area N i , the head end overlapping area S i , end overlapping area E i ;
[0032] In order to improve the efficiency of the generation of the triangular net, in the parameter setting process, in the parameter preset process, the setting range of parameter 2 is 10% to 100%, and further preferably, the setting range of parameter 2 is 20% to 50%.
[0033] The preferred range of the above parameter setting is obtained by summarizing a plurality of point cloud data examples, and by controlling the parameters in the above range, the Delaunay triangular net can be efficiently, quickly and accurately generated. The generation of unqualified triangular nets is reduced.
[0034] The overlapping region S i or E i of each of the point cloud sub-blocks is further divided into three parts according to the preset parameter 3, that is, the proportion of the public part, that is, the overlapping region public part Sg i and Eg i , the front non-public region Sq i and S hi , and the rear non-public region Eq i and E hi . The range of the region contained by the first point cloud sub-block is K1=N1+E1, the range of the region contained by the middle point cloud sub-block is K i =S i +N i +E i , and the range of the region contained by the end point cloud sub-block is K n =S n +N n .
[0035] The beginning of the first point cloud sub-block and the end of the end point cloud sub-block are regarded as the overlapping region containing 0 point cloud numbers, that is, Sg1=Sq1=Sh1=0; Eg n =Eq n =Eh n =0; and the range of the region containing the point cloud numbers of each of the point cloud sub-blocks is K i =S i +N i +E i .
[0036] The deletion region of each of the point cloud sub-blocks is Sq i and Eh i , wherein i=1, 2,..., n, and n≥1; and Eh i =Sq i+1 .
[0037] The setting range of parameter 3 (proportion of public part) is 30%-100%. Further preferably, the setting range of parameter 3 (proportion of public part) is 30%-70%.
[0038] Preferably, in step 3, the establishment of the Delaunay triangular net of each point cloud sub-block needs to meet the following conditions:
[0039] Condition 1: the circumcircle of each triangle does not contain other points;
[0040] Condition 2: has the largest minimum internal angle among all possible triangular nets.
[0041] For the above two conditions, specifically, as to the circumcircle of the triangle not containing other points, it is determined according to the following manner: the center coordinates of the circumcircle can be calculated through the three point coordinates of the triangle, the radius of the circumcircle is obtained, and then the distance from other points to the center of the triangle is calculated. If the distance is greater than the radius, the circumcircle of the triangle does not contain the point.
[0042] For example: assuming that the three point coordinates are:
[0043] A (X A , Y A ), B (X B , Y B ), and C (X C , Y C ).
[0044] Let A1 = 2*(X B -X A ), A2 = 2*(X C -X B ), B1 = 2*(Y B -Y A ), B2 = 2*(Y C -Y B )
[0045] C1 = X B *X B + Y B *Y B - X A *X A - Y A *Y A , and C2 = X C *X C + Y C *Y C - X B *X B - Y B *Y B .
[0046] Then the coordinates of the center of the circle O(X O 、Y O ) are:
[0047] X O =(B2*C1-B1*C2) / (A1*B2-A2*B1), Y O =(-A2*C1+A1*C2) / (B2*A1-B1*A2).
[0048] Regarding condition 2, according to the point cloud number of each point cloud sub-block area, take the two smallest point numbers in the sub-block area to form a side of the triangle, traverse all the points in the sub-block area, and after forming a triangle, calculate its minimum internal angle, and take the point corresponding to the largest minimum internal angle to form a triangle. Continue to search for other points in the sub-block area according to this algorithm until all point cloud data are checked and a Delaunay triangulation containing all points in each of the point cloud sub-blocks is formed.
[0049] More specifically, when generating triangles according to the point cloud numbers in the current point cloud sub-block, if the current deletion area Sq i and Eh i If the number of any point in the current triangle is included, the current triangle will be deleted as an invalid triangle. Otherwise, the current triangle will be saved as a valid triangle for the current point cloud sub-block, and the triangle will also be saved as a valid triangle for the entire network. When generating triangles, some of the three points of a triangle may be in the Sq or Eh area, while others may not. Specifically, if any point number in the generated triangle is in the Sq or Eh area, the triangle will be deemed invalid.
[0050] Preferably, in step 3, the cross-edge correction is specifically as follows: traverse each triangle in the entire Delaunay triangle network, obtain the number of times each edge is used, wherein the number of times a non-public edge is used is 1, and the number of times a public edge is used is 2. When the number of times a public edge is used is 3 or 4, then the triangles associated with the edge must have cross-edges, which are corrected by changing parameters or by rules.
[0051] Preferably, in step 3, the deduplication processing is specifically as follows: checking the algorithm for generating the Delaunay triangle network of all point cloud data, traversing the data set composed of all triangles in the algorithm, and according to the numbers m1, m2, and m3 of the three points that constitute each triangle, when the sum of the three-point numbers and the product of the three-point numbers of two triangles are equal, deleting one of the triangles, and finally obtaining a data set with only a unique number combination for the Delaunay triangle network.
[0052] Preferably, in step 4, the maximum side length and the minimum angle of the triangular mesh are preset parameters 4, in step 4, the triangular mesh formed in step 3 is checked based on the preset parameters 4 to determine whether the side length and the angle of each triangle are within the value range of the preset parameters 4, and when any one parameter does not meet the requirement, the corresponding triangle is deleted, and finally a qualified Delaunay triangular mesh is obtained. Among them, for the side length, the maximum is taken as the limit, that is, the side length cannot be greater than the preset value, while the angle is just the opposite, the angle cannot be less than the preset angle.
[0053] Parameter 4 is mainly for the triangles formed between the discontinuously distributed point clouds (narrow and long, small angle and meaningless triangles that need to be deleted), which are determined and deleted through the two parameters. If the discontinuously distributed point clouds have different spacings, such as a spacing of 100 meters or a spacing of 10 kilometers, the maximum side length and the minimum angle will have different values, which are determined according to the spacing of the discontinuously distributed point cloud data. The default maximum side length in the software is 100 m, and the minimum angle is 5°.
[0054] In actual application, there are discontinuously distributed point cloud data, and meaningless triangles (long side length or small angle) will be generated for the discontinuously distributed point cloud data. According to the two parameters, the side length and the angle of each triangle are checked through the traversal of the whole mesh triangle, and if they are within the value range of the set maximum side length and minimum angle, they are retained, otherwise they are deleted. The deleted triangle is a meaningless triangle.
[0055] In the technical solution, the setting of the parameters is crucial. If the parameters are not reasonably set, the generated Delaunay triangular mesh may have a triangular side length intersection, and at this time, the above parameters need to be adjusted, and then the calculation is performed again according to the above steps until a complete and reasonable Delaunay triangular mesh is finally generated.
[0056] In the first aspect, the present application provides a computer device comprising at least one processor and a memory connected in communication with the at least one processor, wherein the memory stores instructions that can not be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned method.
[0057] Compared with the prior art, the present application has the following beneficial effects:
[0058] The technical scheme of the present application provides a Delaunay triangulation network fast generation method based on point cloud data, in which the triangulation network is generated through block division and non-splicing technology, and the full-area covered Delaunay triangulation network can be quickly and effectively generated, which can be generated for continuous (uniform) or non-continuous (non-uniform) point cloud data. The method provides favorable data support for the next step of generating contour topographic map, calculating roadbed cross-section excavation and filling area or three-dimensional real scene model.
[0059] In the technical scheme of the present application, when there are repeated triangles in the public area, the unique triangle combination is obtained through the deduplication processing of the method. Then, the maximum side length and the minimum angle parameter of the irregular triangulation network are set, the Delaunay triangulation network is traversed and optimized, and the triangles with too long side length and too small angle are deleted, so that the final Delaunay triangulation network is obtained. The triangulation network has higher accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0060] Figure 1 The flowchart of the Delaunay triangulation network generation algorithm.
[0061] Figure 2 The numbering mode schematic diagram of the point cloud data in the north-south direction.
[0062] Figure 3 The numbering mode schematic diagram of the point cloud data in the east-west direction.
[0063] Figure 4 The numbering schematic diagram of the virtual point cloud data in the east-west direction under the coordinate system.
[0064] Figure 5 The numbering schematic diagram of the virtual point cloud data in the north-south direction under the coordinate system.
[0065] Figure 6 The schematic diagram of the first point cloud sub-block after block division.
[0066] Figure 7 The schematic diagram of the point cloud sub-block of the middle block after block division.
[0067] Figure 8 The schematic diagram of the last point cloud sub-block after block division.
[0068] Figure 9 The effect diagram of the Delaunay triangulation network generated by the method of the present application.
[0069] Figure 10 The schematic diagram of the Delaunay triangulation network generated by the parameter setting not in the preferred range, in which a small amount of triangle edges intersect.
[0070] Figure 11The effect diagram of the Delaunay triangulation regenerated by adjusting the parameters.
[0071] Figure 12 The effect diagram of the Delaunay triangulation generated by the unmanned aerial vehicle for measuring a certain railway engineering project. DETAILED DESCRIPTION
[0072] The application will be further described below in connection with specific embodiments. However, it should not be understood that the scope of the above-mentioned subject matter of the application is limited to the following embodiments, and any technology achieved based on the content of the application falls within the scope of the application.
[0073] In the description of the specific embodiments of the application, the orientation or position relationship terms such as "up", "down", "left", "right", "center", "inner", "outer", etc. appearing without special indication are based on the orientation or position relationship expressed in the drawings, or the orientation or position relationship when the product / equipment / device of the application is usually used. These orientation or position relationship terms are only for the convenience of describing the application scheme or simplifying the description in the specific embodiments, and for the convenience of the technical personnel to quickly understand the scheme, and therefore cannot be understood as indicating or implying that the specific device / component / element must have a specific orientation or be constructed and operated in a specific position relationship, and therefore cannot be understood as a limitation on the application.
[0074] In addition, if the terms "horizontal", "vertical", "suspension", "parallel" and the like appear, it does not mean that the corresponding device / component / element must be absolutely horizontal or vertical or suspended or parallel, but can be slightly inclined or deviated. For example, "horizontal" only means that its direction is relatively more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly inclined. Alternatively, it can be simplified to understand that the corresponding device / component / element is arranged in the "horizontal", "vertical", "suspension", "parallel" direction, and can have an error / deviation of ±10% with respect to the corresponding direction, more preferably an error / deviation of ±8% or less, more preferably an error / deviation of ±6% or less, more preferably an error / deviation of ±5% or less, and more preferably an error / deviation of ±4% or less. As long as the corresponding device / component / element is within the error / deviation range, it can still achieve its role in the scheme of the application.
[0075] In addition, the terms "first", "second", "third", etc. appearing in the terms are only used to distinguish the description of the same or similar parts, and should not be understood as emphasizing or implying the relative importance of the specific parts.
[0076] In addition, in the description of the embodiments of the present application, "several" "a plurality of" "several" represents at least 2. It can be 2, 3, 4, 5, 6, 7, 8, 9, etc. Any case, it can even be more than 9 cases.
[0077] In addition, in the description of the technical solutions of the present application, unless otherwise specified / limited / limited, the terms "set", "install", "connect", "connect", "set", "lay", "arrange" should be understood broadly, for example, it can be fixedly connected, or it can be detachably connected, or integrally connected, which can be welding, riveting, bolting, screwing and other commonly used connection means in the art. The connection can be mechanical connection, electrical connection or communication connection; it can be directly connected or indirectly connected through an intermediate medium; it can be the communication between two elements.
[0078] Embodiment 1
[0079] In order to explain the principle of the point cloud data Delaunay triangulation of the present application, this embodiment introduces specific numerical values and combines the flowchart of Figure 1 to understand:
[0080] Step 101, sort the to-be-processed point cloud data as a whole according to the coordinates, determine the overall trend of the to-be-processed point cloud data, and then number the to-be-processed point cloud data according to the overall trend;
[0081] In the step 101, the specific sorting and numbering method is:
[0082] According to the coordinate values of each point in the point cloud data, Xmax, Xmin, Ymax and Ymin are obtained, and the overall trend of the to-be-processed point cloud data is determined;
[0083] It is provided that when |Xmax-Xmin|>|Ymax-Ymin|, the to-be-processed point cloud data is east-west;
[0084] It is provided that when |Xmax-Xmin|<|Ymax-Ymin|, the to-be-processed point cloud data is south-north;
[0085] The overall numbering method is: for the point cloud data of south-north, first determine Ymin, and then sort and number according to the size of X value; for the point cloud data of east-west, first determine Xmin, and then sort and number according to the size of Y value; sequentially numbered according to the above method until all to-be-processed point cloud data is numbered. The purpose of such numbering is to facilitate the next block, and the block is kept as small as possible. The length-width ratio.
[0086] As shown in Figures 2-3 , wherein,Figure 2 This is the numbering method for point cloud data in the north-south direction; Figure 3 This is the numbering method for point cloud data in the east-west direction. Figures 2-3 Only a few rows or columns are listed as examples. The actual point cloud data shape is not necessarily a regular rectangular form, and the amount of data is huge, so it is necessary to operate according to the method described above.
[0087] Furthermore, in order to understand the numbering logic, such as Figures 4-5 Schematic diagrams of virtual point cloud data numbering for east-west and north-south directions respectively.
[0088] Step 102: Divide the point cloud data to be processed, which has been numbered in step 1, into point cloud sub-blocks. Before dividing the points into blocks, parameters are first preset, wherein parameter 1 to be preset is the number of point clouds in each point cloud sub-block; parameter 2 to be preset is the block overlap value between adjacent point cloud sub-blocks. In this step, the final number of point clouds and the corresponding number of each point cloud sub-block are determined based on the preset parameters 1 and 2.
[0089] Specifically, in step 102, the block processing is specifically as follows: first, the total number of point cloud points of the point cloud data to be processed numbered in step 1 is divided by parameter 1, and the integer is rounded up to obtain the total number of point cloud sub-blocks n, and then the total number of point cloud points is divided by the total number of point cloud sub-blocks n to obtain the average number of point clouds Ki′ in each point cloud sub-block;
[0090] According to parameter 2, the final number of point clouds K in each point cloud sub-block is determined i and the corresponding point cloud number, the number of point clouds and point cloud numbers in the overlapping area of each point cloud sub-block, where K i =K i ′+K i+1 *c%, and E i =S i+1 .
[0091] Take the total number of point cloud points as an example, assuming that the point cloud data to be processed is in the east-west direction, then the block direction is along the east-west direction. Figures 3-4 The numbering diagram; among them, the preset parameter 1 is 600, then the number of point cloud sub-blocks is 2001 / 600≈3.33, rounded up to 4, and the average number of point clouds in each point cloud sub-block is K i= 2001 / 4 = 500, i.e. the number of point clouds of each sub-block is initially configured as 500, and the last block is 501. Without considering the overlapping region, the initial number of point cloud data of the first point cloud sub-block is 0-499, the initial number of point cloud data of the second point cloud sub-block is 500-999, the initial number of point cloud data of the third point cloud sub-block is 1000-1499, and the initial number of point cloud data of the fourth sub-block is 1500-2000.
[0092] According to the parameter 2 (the preset sub-block overlapping degree value) c%, the number of point clouds of each sub-block and the number are finally determined. Considering the overlapping degree and the proportion of the common part of the overlapping region, the overlapping degree c is set as 50, and the proportion of the common part of the overlapping region d is set as 50, as shown in Figure 6 the first sub-block is shown in the first sub-block schematic diagram, Figure 7 the sub-block schematic diagram of the middle part is shown in the first sub-block schematic diagram, Figure 8 the last sub-block schematic diagram is shown in the first sub-block schematic diagram.
[0093] As shown in Figure 6 the first sub-block includes a non-overlapping region (N1), a start-end overlapping region S1 and an end-end overlapping region E1, wherein S1 = 0, the number of point clouds of the non-overlapping region N1 of the first sub-block is 500, and the initial number is 0-499, the E1 of the first block is added to the front half of the adjacent next sub-block, which is also the overlapping region of the first sub-block and the second sub-block, i.e. Figure 6 the number of point clouds in the middle E1 region is: the number of point clouds K2 of the second sub-block * 50% = 500 * 50% = 250;
[0094] Further, the overlapping region E1 is divided into three parts, i.e. the overlapping region common part (Eg1), the front-end non-common part (Eq1) and the rear-end non-common part (Eh1). The parameter 3 (the proportion of the common part) d of the overlapping region is set as 50%, and the number of point clouds in the overlapping region common part Eg1 is 125, the number of point clouds in the front-end non-common part Eq1 is 125 / 2, which is rounded up to 63, and the number of point clouds in the rear-end non-common part Eh1 is 125 / 2, which is rounded down to 62. The final total number of point clouds of the first sub-block is 500+250 = 750, and the numbers of point clouds are determined accordingly.
[0095] The number of point clouds of the first point cloud sub-block Sq1 and Sh1 is 0, the number of point clouds of the rear-end non-common part Eq1 is 63, and the number of point clouds of the rear-end non-common part Eh1 is 62, and the numbers of point clouds in each region are determined accordingly.
[0096] The second point cloud sub-block has a non-overlapping region (N2), a start-end overlapping region S2 (overlapping with the end-end region of the first sub-block) and an end-end overlapping region E2 (overlapping with the start-end region of the third point cloud sub-block), as shown in Figure 7The total number of points in the second sub-block K2 = K2' + K3 * c%, i.e. 500 + 250 = 750.
[0097] Similarly, the total number of points in the remaining point cloud sub-blocks and the number of points in the common part and the non-common part of the first and last end overlapping regions of the point cloud sub-blocks are obtained.
[0098] Step 103, performing Delaunay triangulation on each of the point cloud sub-blocks to form a Delaunay triangle network; first, performing correction of intersecting edges in the Delaunay triangle network, and then performing de-duplication processing on the Delaunay triangle network to make the number of data sets in the Delaunay triangle network unique;
[0099] In this step, the establishment of the Delaunay triangle network needs to meet the following conditions:
[0100] Condition 1: Each triangle does not contain other points in its circumcircle; specifically, the circumcenter coordinates of the triangle can be calculated from the coordinates of the three points, the circumcircle radius can be obtained, and the distance of other points to the circumcenter can be calculated. If the distance is greater than the radius, the triangle does not contain the point in its circumcircle.
[0101] Condition 2: All possible triangulations have the largest minimum internal angle. According to the total number of points in the current sub-block region, the smallest two point numbers in the sub-block region form a side of a triangle, and all points in the sub-block region are traversed to form a triangle and calculate its minimum internal angle.
[0102] In this embodiment, the smallest number point (0 and 1) of the first point cloud sub-block is taken, and the other point with the shortest horizontal distance from the point is found, and the two points are taken as the first side of the first triangle of the point cloud sub-block. The triangulation is expanded from there. From the two points forming a side of a triangle, all other points (2-749) in the sub-block region are traversed and form a triangle with the first side, and the maximum minimum internal angle of each triangle is calculated. The point corresponding to the maximum minimum internal angle forms a triangle, and if the three points of the triangle are 0, 1, and 46, respectively. The two points 0 and 46 and the two points 1 and 46 form a side of a triangle, and the search for other points in the point cloud sub-block region is continued, and the second and third triangles are formed according to the triangulation principle. The generation of all Delaunay triangulations in the first point cloud sub-block is completed.
[0103] In this step, the application also includes a step of checking whether there is a cross edge in the whole network of Delaunay triangles: specifically, if the overlap parameter is too small, the number of point clouds is too small or too scattered, and the proportion of the common part of the overlapping region is too large, the boundary part of the overlapping region may have a cross edge. The cross edge correction is specifically: traversing each triangle in the whole network of Delaunay triangles, obtaining the use frequency of each edge, wherein the use frequency of the non-common edge is 1, the use frequency of the common edge is 2, and when the use frequency of the common edge is 3, then the three triangles associated with the edge must have a cross edge, which is corrected by changing the parameter.
[0104] In the technical solution, the setting of the parameter is crucial. If the set parameter is unreasonable, the generated Delaunay triangular network may have a situation of triangle edge length crossing. At this time, the above-mentioned parameter needs to be adjusted, and then the calculation is performed again according to the above steps to finally generate a complete and reasonable Delaunay triangular network. Figure 9 To generate a Delaunay triangular network effect diagram of the application.
[0105] As shown in Figure 10 , there is a situation of a small amount of triangle edge crossing in the Delaunay triangular network, and the current parameter setting is: the overlap is set to 30%, and the proportion of the common part of the overlapping region is set to 80%. The point cloud data has a total of 1896 points, and the maximum number of point clouds in the block is set to 700. There is a situation of triangle edge crossing in the red box in the figure, which does not meet the network building rule of the Delaunay triangular network at this time, and the parameter setting needs to be adjusted. The overlap is modified to 50%, and the proportion of the common part of the overlapping region is set to remain unchanged (still 80%), and the Delaunay triangular network effect diagram generated again is as shown in Figure 11 . From the effect diagram, it can be seen that there is no situation of triangle edge crossing in the whole network, which completely meets the network building rule of the Delaunay triangular network. On the other hand, if the proportion of the common part of the overlapping region is modified, the original parameter setting is modified from 80% to 50%, which means that the discarded region (Sq i or Eh i ) is increased, and the overlap parameter remains unchanged (still the initial setting of 30%), and the Delaunay triangular network generated again also meets the Delaunay network building rule to obtain a Delaunay triangular network covering the whole region.
[0106] In the process of building the triangular network of the current point cloud sub-block, if the number of any corner point of the current triangle is included in Sq i or Eh i , the current triangle will be regarded as an invalid triangle and discarded, otherwise, it will be saved as an effective triangle of the current block and the whole block respectively. According to the above method, the establishment of the Delaunay triangular network is completed for each point cloud sub-block.
[0107] In step 103, the deduplication process is specifically as follows: the algorithm for generating the Delaunay triangle network of all point cloud data is checked, and the data set composed of all triangles in the algorithm is traversed. According to the numbers m1, m2, and m3 of the three points that make up each triangle, when the sum of the three-point numbers and the product of the three-point numbers of two triangles are equal, one of the triangles is deleted, and finally a data set with only a unique number combination of the Delaunay triangle network is obtained.
[0108] Step 104: further check the Delaunay triangle mesh data obtained in step 103 to determine whether the side length of each triangle in the Delaunay triangulation is within a preset maximum side length value range, and whether the angle of each triangle is within a preset minimum angle value range. If all the parameters are met, the triangle is retained; if any parameter is not met, the triangle is deleted to obtain the final qualified Delaunay triangulation.
[0109] Specifically, since the numbering range of the first point cloud sub-block is 0-724, the second sub-block point cloud numbering range is 500-1249, the third sub-block point cloud numbering range is 1000-1749, and the fourth sub-block point cloud numbering range is 1500-2000. There are overlapping areas between different point cloud sub-blocks. When generating a Delaunay triangulation for each point cloud sub-block area, the overlapping common parts will repeatedly generate a valid Delaunay triangulation. Traverse each triangle of the entire network, according to the numbers of the three points that make up each triangle, assuming that the three points are numbered m1, m2, and m3 respectively, then according to the algorithm that the same triangle has m1+m2+m3 and m1*m2*m3 is equal, find the repeatedly generated triangles and perform deduplication processing to obtain a data set with only unique number combinations for the entire Delaunay triangle network.
[0110] The present invention also includes the step of checking whether there are cross edges in the entire network of Delaunay triangles: specifically, if the overlap parameter value is too small, the number of point clouds is small or scattered, and the proportion of the common part of the overlapping area is too large, then the boundary part of the overlapping area may have cross edges. After generating the Delaunay triangles of the entire network, all triangles are traversed to obtain the number of times each edge is used. The number of times non-public edges are used is 1, and the number of times public edges are used is 2. If there are cross edges, the number of times one of the public edges is used is 3. The three triangles related to the common edge with a number of uses of 3 are judged in turn by the Delaunay circumscribed circle rule. If a triangle contains a point of other triangles, the triangle is deleted.
[0111] Parameter 4 is the maximum side length of the triangular net and the minimum angle of the triangular net, in the step 104, based on the preset parameter 4, the triangular net formed in the step 103 is checked, whether the side length and the angle of each triangle are in the value range of the preset parameter 4, when any one parameter does not meet, the corresponding triangle will be deleted, and finally the qualified Delaunay triangular net is obtained.
[0112] According to the preset parameter 4 in the Delaunay triangular net generation process, if the point cloud data is discontinuously distributed, the above-mentioned algorithm will appear the condition that a small amount of triangular nets have long side length or small angle, through the traversal checking of the triangular nets, whether the side length and the angle of each triangle are in the value range of the set maximum side length and minimum angle, if yes, the triangular net is reserved, if not, the triangular net is deleted, and finally the Delaunay triangular net meeting the requirements is formed.
[0113] According to the above-mentioned embodiment, the Delaunay triangular net can be efficiently and quickly constructed through the program, no matter how many point clouds are, whether the measurement area is continuous or not, the Delaunay triangular net can be generated through the technical scheme of the application, which provides favorable data support for the next generation of contour terrain map or three-dimensional real scene model.
[0114] As shown in Figure 12 Fig. 1, it is the Delaunay triangular net effect diagram generated according to the point cloud data of a certain railway engineering project measured by a UAV, the length of the measurement area is 1598m, the width is 243m, the point cloud density is 276514 after sampling at an interval of 1m (point cloud dilution processing), the maximum number of block point clouds is set to 10000, there are 28 blocks in total, the overlap degree is set to 30%, and the proportion of the common part in the overlapping area is set to 50%. As shown in the figure, the generated Delaunay triangular net completely covers the measurement area, completes the digital processing of the measurement area, and can well reflect the topography of the measurement area.
[0115] The technical scheme of the application generates the triangular net of each block by adopting numbering, blocking and allowing the blocks to overlap in proportion, determining the common area and the non-common area of the overlapping part, and generating the triangular net of each block. In the generation process, the key parameters are set, and the Delaunay triangular net is quickly, efficiently and accurately established through reasonable parameter setting. Further, the triangular net of each block of the point cloud data is generated, the triangular net formed by the non-common area points at the beginning and the end of the current block is discarded, and the triangular net in the overlapping area is de-duplicated, and finally the Delaunay whole net triangular net is generated. The generation method of the application can quickly and efficiently generate the triangular net covering the whole area, and the Delaunay triangular net can be generated for the continuous (uniform) or non-continuous (non-uniform) point cloud data, which provides favorable data support for generating the contour terrain map, calculating the cross-section excavation and filling area of the roadbed or generating the three-dimensional real scene model.
[0116] Embodiment 2
[0117] An electronic device includes at least one processor, a memory connected to the at least one processor in communication, and at least one input / output interface connected to the at least one processor in communication; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of the preceding embodiment 1. The input / output interface can include a display, a keyboard, a mouse, and a USB interface for inputting and outputting data.
[0118] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium, and the program is executed to perform steps including the above-mentioned method embodiments; and the foregoing storage medium includes mobile storage equipment, read only memory (Read Only Memory, ROM), magnetic disc or optical disc and various storage program codes.
[0119] When the integrated unit of the present application is realized in the form of a software function unit and sold or used as an independent product, it can also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in the embodiments of the present application. The foregoing storage medium includes mobile storage equipment, ROM, magnetic disc or optical disc and various storage program codes.
[0120] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for generating a Delaunay triangulation based on point cloud data, characterized in that: The steps include: Step 1: Sort the point cloud data to be processed by coordinates, determine the overall direction of the point cloud data to be processed, and then number the point cloud data to be processed according to the overall direction; the specific sorting and numbering method is: Obtain Xmax, Xmin, Ymax, and Ymin according to the coordinate values of each point in the point cloud data to determine the overall general direction of the point cloud data to be processed; It is stipulated that when |Xmax-Xmin|>|Ymax-Ymin|, Xmin is determined first, and then the numbers are sorted in order according to the size of the Y value; It is stipulated that when |Xmax-Xmin|<|Ymax-Ymin|, first determine Ymin, and then sort and number them in order according to the size of the X value; Follow the above method to number the points until all the point cloud data to be processed are numbered. Step 2: The point cloud data to be processed that has been numbered in step 1 is divided into blocks to form point cloud sub-blocks. Before dividing the blocks, parameters are first preset, wherein parameter 1 to be preset is the number of point clouds in each point cloud sub-block; parameter 2 to be preset is the block overlap value between adjacent point cloud sub-blocks; the final point cloud number and the corresponding number of each point cloud sub-block are determined according to the preset parameters 1 and 2; the block processing is specifically as follows: first, the total number of point cloud points of the point cloud data to be processed that has been numbered in step 1 is divided by parameter 1, and the integer is rounded up to obtain the total number of point cloud sub-blocks n, and then the total number of point cloud points is divided by the total number of point cloud sub-blocks n to obtain the average number of point clouds in each point cloud sub-block K i '; According to parameter 2, determine the final number of point clouds and the corresponding point cloud number in each point cloud sub-block, and the number of point clouds and the point cloud number in the overlapping area of each point cloud sub-block, where K i =K i ′+K′ i+1 *c%, and E i =S i+1 ; Among them, K i Indicates the final number of point clouds of the i-th point cloud sub-block, i=1, 2...n, n≥1; K i ′ represents the average number of point clouds in the i-th point cloud sub-block; K′ i+1 Indicates the average number of point clouds in the i+1th point cloud sub-block; c% represents the block overlap value between adjacent point cloud sub-blocks; E i Represents the end overlapping area of the i-th point cloud sub-block; S i+1 Indicates the overlapping area at the beginning of the i+1th point cloud sub-block; Step 3: Generate a Delaunay triangulation for each of the point cloud sub-blocks to form a Delaunay triangle network; first, correct the cross edges in the Delaunay triangle network, and then perform deduplication processing on the Delaunay triangle network to make the data set number in the Delaunay triangle network unique; Step 4: Further check the Delaunay triangle mesh data obtained in step 3 to determine whether the side length of each triangle in the Delaunay triangulation is within the preset maximum side length value range, and whether the angle of each triangle is within the preset minimum angle value range. If all the parameters are met, the triangle is retained; if any parameter is not met, the triangle is deleted to obtain the final qualified Delaunay triangulation.
2. The generation method according to claim 1, characterized in that In step 2, after the block division is completed, the common area and the non-public area of the overlapping area are determined: When the number of point cloud sub-blocks n≥2, the first point cloud sub-block includes a non-overlapping area N1 and an end overlapping area E1, and the last point cloud sub-block includes a non-overlapping area N n and the head-end overlapping area S n , all the middle point cloud sub-blocks include non-overlapping area N i , the head end overlapping area S i , end overlapping area E i ; The overlapping area S of each point cloud sub-block i or E i The public portion is further divided into three parts according to the preset proportion d%, wherein the public portion d% is the parameter to be preset 3, that is, the public portion Sg of the overlapping area. i and Eg i , front non-public area Sq i and S hi , the backend non-public area Eq i and E hi The first point cloud sub-block contains an area range of K1=N1+E1, and the middle point cloud sub-block contains an area range of K i =S i +N i +E i , the area of the point cloud sub-block at the end is K n =S n +N n ; The beginning of the point cloud sub-block at the head end and the end of the point cloud sub-block at the tail end are regarded as overlapping areas including 0 point clouds, then: Sg1=Sq1=Sh1=0; Eg n =Eq n =Eh n =0; the area range of the point cloud number contained in each point cloud sub-block is K i =S i +N i +E i ; The deletion area of each point cloud sub-block is Sq i and Eh i , where i=1, 2...n, n≥1; and Eh i =Sq i+1 .
3. The generation method according to claim 1, characterized in that In step 3, the cross-edge correction is specifically as follows: traverse each triangle in the entire Delaunay triangle network and obtain the number of times each edge is used, where the number of times a non-public edge is used is 1 and the number of times a public edge is used is 2. When the number of times a public edge is used is 3 or 4, the triangles associated with the public edge must have cross edges, which are corrected by changing parameters or using rules.
4. The generation method according to claim 3, characterized in that In step 3, the deduplication process is specifically as follows: the algorithm for generating the Delaunay triangle network of all point cloud data is checked, and the data set composed of all triangles in the algorithm is traversed. According to the numbers m1, m2, and m3 of the three points that make up each triangle, when the sum of the three-point numbers and the product of the three-point numbers of two triangles are equal, one of the triangles is deleted, and finally a data set with only a unique number combination of the Delaunay triangle network is obtained.
5. The generation method according to claim 1, characterized in that In step 4, the maximum side length and minimum angle of the triangulated network are the parameters 4 to be preset. In step 4, based on the preset parameters 4, the triangulated network formed in step 3 is checked to determine whether the side length and angle of each triangle are within the value range of the preset parameters 4. When any parameter is not met, the corresponding triangle will be deleted, and finally a qualified Delaunay triangulated network is obtained.
6. The generation method according to any one of claims 1 to 5, characterized in that: During parameter preset, the setting range of parameter 2 is 10% to 100%, and the setting range of parameter 3 is 30% to 100%.
7. The generation method according to claim 6, characterized in that During parameter preset, the setting range of parameter 2 is 20% to 50%, and the setting range of parameter 3 is 30% to 70%.
8. A computer device, characterized in that: The method comprises at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Mass airborne LiDAR point cloud Delaunay triangulation network parallel construction method and apparatus thereof
CN102629390A
Point cloud clipping-based generation method for spatial curved surface
CN102881048A