Building point cloud segmentation method, device, equipment and storage medium

By constructing a Delaunay triangle network and performing regional growth methods, dividing and segmenting building point clouds, the problem of insufficient accuracy of building point cloud segmentation is solved, and a higher three-dimensional modeling accuracy is achieved.

CN118096782BActive Publication Date: 2025-04-01BEIJING INSTITUTE OF SURVEYING AND MAPPING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410447886.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-12
Publication Date
2025-04-01
Estimated Expiration
2044-04-12

AI Technical Summary

Technical Problem

In the three-dimensional modeling process of building single-unitization, the accuracy of building point cloud segmentation is insufficient, which affects the final modeling accuracy.

Method used

By constructing a Delaunay triangular network and using it as a primitive for regional growth, multiple roof point cloud segmented faces were obtained, and then these faces were divided into complete roof faces and to be processed triangle faces. The area growth with point cloud as a primitive for the to be processed triangle faces was further segmented to obtain the second roof point cloud segmented faces.

Benefits of technology

Improve the accuracy of building point cloud segmentation and ensure the final three-dimensional modeling accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118096782B_ABST
    Figure CN118096782B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device, equipment and storage medium for segmenting a building point cloud, the method comprising obtaining a building point cloud to be processed; constructing a first Delaunay triangulation network based on the building point cloud, and performing region growth with triangular facets in the first Delaunay triangulation network as primitives to obtain a plurality of first roof point cloud segmentation facets; dividing each first roof point cloud segmentation facet into a complete roof facet and a triangular facet to be processed; for the triangular facet to be processed, extracting the building point cloud constituting the triangular facet to be processed as a target point cloud, performing region growth with point cloud as primitives on the target point cloud, and obtaining a second roof point cloud segmentation facet; taking the complete roof facet and the second roof point cloud segmentation facet in the first roof point cloud segmentation facet as the segmentation result of the building point cloud. In the present disclosure, two different region growing algorithms are combined to segment the building point cloud, so that the result of the building point cloud segmentation is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a method, device, equipment and storage medium for segmenting a building point cloud. Background Art

[0002] When performing individual 3D modeling of a building, an airborne laser radar is usually used to obtain a building point cloud, and then the building point cloud is segmented to form point cloud segmentation patches of multiple building roofs. Then, the roof patch is constructed based on the point cloud segmentation patch using the contour line extraction method, and the final individual 3D model of the building is constructed based on the constructed roof patch. In this process, the accuracy of the building point cloud segmentation will directly affect the final modeling accuracy. Therefore, improving the accuracy of the building point cloud segmentation is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0003] In view of this, the present disclosure proposes a method, device, equipment and storage medium for segmenting a building point cloud, which can make the result of building point cloud segmentation more accurate.

[0004] According to a first aspect of the present disclosure, a method for segmenting a building point cloud is provided, comprising:

[0005] Obtain the building point cloud to be processed;

[0006] Based on the building point cloud, a first Delaunay triangulation network is constructed, and triangular facets in the first Delaunay triangulation network are used as primitives to perform region growth to obtain a plurality of first roof point cloud segmentation facets;

[0007] Divide each of the first roof point cloud segmentation patches into complete roof patches and to-be-processed triangular patches, wherein the to-be-processed triangular patches include isolated triangular patches and triangular patches whose three edges of the same triangular patch are divided into at least two different first roof point cloud segmentation patches;

[0008] For the to-be-processed triangular facet, extract the building point cloud constituting the to-be-processed triangular facet as the target point cloud, perform region growing with the point cloud as the primitive on the target point cloud, and obtain a second roof point cloud segmentation facet;

[0009] The complete roof patch in the first roof point cloud segmentation patch and the second roof point cloud segmentation patch are used as the segmentation result of the building point cloud.

[0010] In a possible implementation, when the triangular facets in the first Delaunay triangulation are used as primitives to perform region growth to obtain the first roof point cloud segmentation facets, the method includes:

[0011] For each triangular facet constituting the first Delaunay triangulation, calculating the area of ​​each triangular facet;

[0012] A seed surface is selected based on the area of ​​each triangular surface patch, and region growth is performed based on the selected seed surface to obtain the first roof point cloud segmentation surface patch.

[0013] In a possible implementation, when performing region growing with point clouds as primitives on the target point cloud to obtain a second roof point cloud segmentation patch, the method includes:

[0014] Traversing each of the target point clouds;

[0015] For the traversed current target point cloud, a K nearest neighbor algorithm is used to filter out spatial adjacent points of the current target point cloud from each of the target point clouds;

[0016] Performing plane fitting on the spatial adjacent points to obtain the optimal plane of the current target point;

[0017] Based on the optimal plane, calculating the normal vector and curvature corresponding to the current target point cloud;

[0018] After the traversal is completed, the normal vector, curvature and optimal plane of each target point cloud are obtained;

[0019] Based on the normal vector, curvature and optimal plane of each target point cloud, region growing with point cloud as primitive is performed on each target point cloud to obtain a second roof point cloud segmentation patch.

[0020] In a possible implementation, when performing plane fitting on the spatial adjacent points to obtain the best plane for the current target point, the process includes:

[0021] Based on the spatial adjacent points, construct a second Delaunay triangulation network, and for each triangular facet constituting the second Delaunay triangulation network, calculate the area of ​​each triangular facet;

[0022] Selecting the triangular facet with the largest area from each of the triangular facets as a first sample facet, and constructing a first plane based on the first sample facet;

[0023] Calculating the distance between each of the spatial adjacent points and the first plane, and selecting the spatial adjacent points whose distance to the first plane is less than or equal to a preset first distance threshold as the inner points corresponding to the first plane;

[0024] A plane fitting is performed based on the inner points corresponding to the first plane to obtain the optimal plane for the current target point.

[0025] In a possible implementation, when calculating the curvature corresponding to the current target point cloud based on the optimal plane, the method includes:

[0026] Calculating the distance between each of the spatial adjacent points and the optimal plane, and selecting the spatial adjacent points whose distance to the optimal plane is less than or equal to a preset second distance threshold as the inner points corresponding to the optimal plane;

[0027] The average value of the distances from the inner points corresponding to the optimal plane to the optimal plane is calculated, and the average value is used as the curvature corresponding to the current target point cloud.

[0028] In a possible implementation, when performing region growing with point clouds as primitives on each of the target point clouds based on the normal vectors and curvatures of each of the target point clouds to obtain a second roof point cloud segmentation patch, the method includes:

[0029] Selecting a target point cloud with the smallest curvature from the target point cloud as a seed point;

[0030] Traversing adjacent points in the target point cloud that meet proximity conditions with the seed point;

[0031] For the traversed current adjacent point, calculate the normal vector angle between the current adjacent point and the seed point and the distance from the current adjacent point to the optimal plane where the seed point is located;

[0032] When the normal vector angle between the current neighboring point and the seed point is less than or equal to a preset first normal vector threshold, and the distance from the current neighboring point to the optimal plane where the seed point is located is less than or equal to a preset third distance threshold, the current neighboring point is divided into the optimal plane where the seed point is located;

[0033] After the traversal is completed, the current best plane where the seed point is located is used as the second roof point cloud segmentation patch;

[0034] A target point cloud with the smallest curvature is selected from the unprocessed target point cloud as a new seed point, and region growth is performed based on the new seed point until all target point clouds are processed, and all second roof point cloud segmentation patches are output.

[0035] In a possible implementation, before calculating the normal vector angle between the current neighboring point and the seed point and the distance from the current neighboring point to the optimal plane where the seed point is located, the method further includes:

[0036] Determine whether the current adjacent point has been processed;

[0037] When it is not processed, the operation of calculating the normal vector angle between the current neighboring point and the seed point and the distance from the current neighboring point to the optimal plane corresponding to the seed point is performed;

[0038] When the current neighbor point has been processed, the distance from the optimal plane where the seed point is located is calculated;

[0039] Determine whether the distance from the current neighboring point to the optimal plane where the seed point is located is less than or equal to a preset fourth distance threshold, and when the distance is less than or equal to the preset fourth distance threshold, divide the current neighboring point into the optimal plane where the seed point is located.

[0040] According to a second aspect of the present disclosure, a device for segmenting a building point cloud is provided, comprising:

[0041] Point cloud reading module, used to obtain the building point cloud to be processed;

[0042] A first point cloud segmentation module is used to construct a first Delaunay triangulation network based on the building point cloud, and perform region growth using triangular facets in the first Delaunay triangulation network as primitives to obtain a plurality of first roof point cloud segmentation facets;

[0043] A patch classification module, used for dividing each of the first roof point cloud segmentation patches into complete roof patches and to-be-processed triangular patches, wherein the to-be-processed triangular patches include isolated triangular patches and triangular patches whose three edges of the same triangular patch are divided into at least two different first roof point cloud segmentation patches;

[0044] A first point cloud segmentation module is used to extract the building point cloud constituting the to-be-processed triangular facet as a target point cloud, and perform region growth with point clouds as primitives on the target point cloud to obtain a second roof point cloud segmentation facet;

[0045] A result output module is used to use the complete roof patch in the first roof point cloud segmentation patch and the second roof point cloud segmentation patch as the segmentation result of the building point cloud.

[0046] According to a third aspect of the present disclosure, a device for segmenting a building point cloud is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in the first aspect of the present disclosure.

[0047] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, implement the method described in the first aspect of the present disclosure.

[0048] In the present disclosure, a method for segmenting a building point cloud includes: obtaining a building point cloud to be processed; constructing a first Delaunay triangulation based on the building point cloud, and performing region growth with triangular facets in the first Delaunay triangulation as primitives to obtain multiple first roof point cloud segmentation facets; dividing each first roof point cloud segmentation facet into a complete roof facet and a triangular facet to be processed, wherein the triangular facet to be processed includes an isolated triangular facet and three edges of the same triangular facet divided into at least two different first roof point cloud segmentation facets; for the triangular facet to be processed, extracting the building point cloud constituting the triangular facet to be processed as the target point cloud, performing region growth with point cloud as primitives on the target point cloud, and obtaining a second roof point cloud segmentation facet; taking the complete roof facet in the first roof point cloud segmentation facet and the second roof point cloud segmentation facet as the segmentation result of the building point cloud. In the present disclosure, two different region growing algorithms are combined to segment the building point cloud, so that the result of the building point cloud segmentation is more accurate.

[0049] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.

[0051] Figure 1 A flowchart of a method for segmenting a building point cloud according to an embodiment of the present disclosure is shown.

[0052] Figure 2 A schematic diagram of a cross-face triangular patch according to an embodiment of the present disclosure is shown.

[0053] Figure 3 An exemplary flowchart of a method for segmenting a building point cloud according to an embodiment of the present disclosure is shown.

[0054] Figure 4 A schematic block diagram of a device for segmenting a building point cloud according to an embodiment of the present disclosure is shown.

[0055] Figure 5 A schematic block diagram of a device for segmenting a building point cloud according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0056] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0057] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0058] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0059] <Method Example>

[0060] Figure 1 FIG. 1 is a flow chart showing a method for segmenting a building point cloud according to an embodiment of the present disclosure. Figure 1 As shown, the method includes steps S1100-S1500.

[0061] S1100, obtaining a building point cloud to be processed. Specifically, firstly obtain ground point cloud data through an airborne laser radar system, and then perform at least one pre-processing operation such as point cloud filtering, denoising, and classification processing on the ground point cloud data, so as to obtain point cloud data containing only the building layer, and the point cloud data containing only the building layer is the building point cloud to be processed in the present disclosure.

[0062] S1200: construct a first Delaunay triangulation network based on the building point cloud, and perform region growth using triangular facets in the first Delaunay triangulation network as primitives to obtain a plurality of first roof point cloud segmentation facets.

[0063] In a possible implementation, when the triangular facets in the first Delaunay triangulation are used as primitives to perform region growth to obtain the first roof point cloud segmentation facets, the following steps may be included:

[0064] First, for each triangular facet constituting the first Delaunay triangulation, the area of ​​each triangular facet is calculated.

[0065] Second, seed faces are selected based on the area of ​​each triangular facet, and region growth is performed based on the selected seed faces to obtain multiple first roof point cloud segmentation facets. Specifically, each time a seed face is selected, the one with the largest area is selected from the unprocessed triangular facets as the seed facet. After the seed facet is selected, region growth can be performed based on the selected seed facet to obtain the first roof point cloud segmentation facet corresponding to the seed facet.

[0066] It should be noted here that, for each triangular facet constituting the first Delaunay triangulation, the area of ​​each triangular facet is calculated, and the normal vector of each triangular facet is also calculated. In this way, after the seed facet is selected, the region growth can be performed based on the seed facet and the normal vector of each triangular facet to obtain multiple first roof point cloud segmentation facets. The specific steps include:

[0067] Step 1: Determine whether there are adjacent facets in the unprocessed triangular facets that are adjacent to the seed facet. If there are adjacent facets, calculate the first normal vector angle between the adjacent facet and the seed facet, and when the first normal vector angle is less than the preset first angle threshold, divide the adjacent facet into the set where the seed facet is located. Repeat step 1 until there are no adjacent facets adjacent to the seed facet, and output the set where the seed facet is currently located as the first roof point cloud segmentation facet of the seed face.

[0068] Step 2: Determine whether there are unprocessed triangular facets in the first Delaunay triangulation network. If there are unprocessed triangular facets, continue to select the triangular facet with the largest area from the remaining unprocessed triangular facets as the new seed facet, and refer to step 1 to perform region growth to obtain the first roof point cloud segmentation facet of the new seed facet. Repeat step 2 until all triangular facets in the first Delaunay triangulation network are divided into the corresponding first roof point cloud segmentation facets, and then multiple first roof point cloud segmentation facets can be obtained.

[0069] It should be noted here that the larger the area of ​​the triangle, the flatter the position of the triangle, which further indicates that the triangle is at the core of the complete patch and is more representative and typical. Therefore, selecting the triangle with the largest area as the seed patch for regional growth can make the first roof point cloud segmentation patch obtained by growth more accurate.

[0070] After obtaining a plurality of first roof point cloud segmentation patches through step S1200, step S1300 is executed to divide each first roof point cloud segmentation patch into a complete roof patch and to-be-processed triangular patches, wherein the to-be-processed triangular patches include isolated triangular patches and cross-face triangular patches.

[0071] Specifically, when the first roof point cloud segmentation patch is not connected to other first roof point cloud segmentation patches, it is divided into an isolated patch. For example, for a roof with a raised skylight on the slope of the roof, after the first point cloud segmentation, the point cloud corresponding to the roof slope will be divided into a first roof point cloud segmentation patch, and the point cloud corresponding to the raised skylight will be divided into another first roof point cloud segmentation patch. Since the point cloud corresponding to the raised skylight is obviously floating above the point cloud corresponding to the roof slope, the first roof point cloud segmentation patch corresponding to the roof slope is not connected to the first roof point cloud segmentation patch corresponding to the raised skylight. Therefore, the first roof point cloud segmentation patch corresponding to the raised skylight can be regarded as an isolated triangular patch.

[0072] When three edges of the same triangular facet in the first roof point cloud segmentation facet are divided into at least two different first roof point cloud segmentation facets, it is divided into a cross-face triangular facet. Figure 2 , Figure 2 In the black first roof point cloud segmentation patch on the upper left, there is a triangle patch a2bc. The two edges a2b and a2c in the triangle patch a2bc are divided into the black first roof point cloud segmentation patch, and the bc edge is divided into the gray first roof point cloud segmentation patch. Then the three edges of the triangle patch a2bc, which belongs to the same triangle patch, are divided into triangle patches of at least two different first roof point cloud segmentation patches. At this time, the black first roof point cloud segmentation patch can be divided into cross-face triangle patches. Similarly, Figure 2 There is a triangle patch a1bc in the gray first roof point cloud segmentation patch at the lower right corner. The two edges a1b and a1c in the triangle patch a1bc are divided into the gray first roof point cloud segmentation patch, and the bc edge is divided into the black first roof point cloud segmentation patch. The three edges of the triangle patch a1bc, that is, belonging to the same triangle patch, are divided into triangle patches of at least two different first roof point cloud segmentation patches. At this time, the gray first roof point cloud segmentation patch can be divided into cross-face triangle patches.

[0073] All isolated triangles and cross-face triangles are the triangles to be processed. All other first roof point cloud segmentation patches that are not to be processed are divided into complete roof patches.

[0074] S1400, for each triangular face to be processed, extract the building point cloud constituting the triangular face to be processed as the target point cloud, perform region growth with the point cloud as the primitive on the target point cloud, and obtain the second roof point cloud segmentation face. It should be noted that step S1400 is performed for each triangular face to be processed respectively, so as to obtain the second roof point cloud segmentation face corresponding to each triangular face to be processed.

[0075] In a possible implementation, when performing region growing with point clouds as primitives on the target point cloud to obtain the second roof point cloud segmentation patch, the following steps are included:

[0076] First, traverse each target point cloud.

[0077] Second, for the traversed current target point cloud, the K nearest neighbor algorithm is used to filter out the spatial neighboring points of the current target point cloud from each target point cloud. In a possible implementation, in order to improve the efficiency of filtering spatial neighboring points, each target point cloud is first stored as a kd-tree structure, and then the spatial neighboring points of the current target point cloud are filtered based on the kd-tree structure.

[0078] Third, perform plane fitting on the spatial adjacent points to obtain the optimal plane for the current target point. The specific steps are as follows:

[0079] First, a second Delaunay triangulation is constructed based on spatial adjacent points, and the area of ​​each triangular facet constituting the second Delaunay triangulation is calculated.

[0080] Secondly, the largest area is selected from each triangular patch as the first sample patch, and the first plane is constructed based on the first sample patch. Specifically, the first sample patch is used as the seed patch to perform regional growth on each triangular patch, and the final grown patch is used as the first plane. The specific growth steps refer to the generation process of the first roof point cloud segmentation patch, which will not be repeated here.

[0081] Next, the distance from each spatial adjacent point to the first plane is calculated, and the spatial adjacent points whose distance to the first plane is less than or equal to the preset first distance threshold are screened out as the inner points corresponding to the first plane. The range of the first distance threshold can be 0.00m-0.25m, and preferably, the first distance threshold can be set to 0.10m. It should be noted here that according to the accuracy requirements of "CHT 8024-2011 Technical Specifications for Airborne LiDAR Data Acquisition", the elevation error limit of 1:500 scale and 1:1000 scale point cloud data is 0.15 meters; and the elevation error of 1:2000 scale is 0.25m. In order to meet the accuracy requirements of the 1:500 scale results, the point cloud density to be collected must be no less than 16 points / square meter, 1:1000 scale requires no less than 4 points / square meter, and 1:2000 scale requires no less than 1 point / square meter. That is to say, when using airborne laser point cloud to produce results at a scale of 1:500 and 1:1000, the elevation error of the obtained laser point cloud data cannot exceed 0.15 meters, and the elevation error of 1:2000 results cannot exceed 0.25 meters. Taking 1:2000 scale point cloud data as an example, if there are at least 100 laser points (laser foot points) distributed on a flat roof with an area of ​​100 square meters, these 100 points will be evenly and discretely distributed on the entire roof, and the horizontal distance between points is 1 meter on average. However, because the roof surface is not a smooth plane, when the laser sensor emits laser points to the roof, due to the influence of the rough surface of the roof and the influence of impurities in the air, the recorded position of the laser points when they are reflected back is different. In other words, these 100 points on the roof are not only discrete in plane, but also discrete in elevation. Some will just fall on the roof, and some will float a certain distance above the roof. According to the specification requirements, the point cloud data with a scale of 1:2000 has an elevation error of 0.25m. That is to say, the point cloud data floating within 0.25m above the real surface of the roof meets the specification requirements. Points exceeding 0.25m may be identified as noise points and need to be removed. By analogy, the same judgment can be made for the scales of 1:500 and 1:1000. In general, in order to accurately express the roof structure, a laser point cloud with sufficient density is required. Therefore, this method is mainly aimed at point cloud data with scales of 1:500, 1:1000, and 1:2000. Because the point cloud density is too low for scales lower than the above three types, point cloud data with this level of accuracy will not be used to express the roof of the building. Therefore, the distance threshold interval is set to 0.00-0.25m. That is, the maximum is the maximum error of the point cloud elevation at a scale of 1:2000. However, in order to find the best plane, the smaller the distance threshold is set, the closer the fitted plane is to the real plane. In order to improve the accuracy of the fitted plane, the first threshold is set to 0.10m.

[0082] Next, plane fitting is performed based on the inner points corresponding to the first plane to obtain the best plane for the current target point.

[0083] In this implementable method, the first plane grows based on the first sample patch with the largest area. After one round of growth, most of the spatial adjacent points have been divided into the first sample patch. Therefore, the first sample patch can become a typical representative of the flatness of the area to a large extent. In order to improve the accuracy of constructing the best plane, the inner points of the first plane are further screened out, and the best plane is fitted based on the inner points of the first plane, thereby improving the efficiency of constructing the best plane and improving the accuracy of constructing the best plane.

[0084] It should be noted here that the first plane constructed is not necessarily the plane with the most internal points. Therefore, in order to further improve the accuracy of constructing the optimal plane, in a possible implementation, after constructing the optimal plane of the current target point, the following steps are further performed:

[0085] First, the second largest area is selected from the triangular facets constituting the second Delaunay triangulation as the second sample facet, and the second plane is constructed based on the second sample facet. The specific steps refer to the construction process of the first plane, which will not be repeated here.

[0086] Next, the distance from each spatial adjacent point to the second plane is calculated, and the spatial adjacent points whose distance to the second plane is less than or equal to a preset first distance threshold are screened out as the inner points corresponding to the second plane.

[0087] Finally, determine whether the number of inner points corresponding to the second plane is less than the number of inner points corresponding to the first plane: if it is less than or equal to, the optimal plane of the current target point remains unchanged. If it is greater than, plane fitting is performed based on the inner points corresponding to the second plane, and the fitted plane is used as the final optimal plane of the current target point.

[0088] The method of this embodiment can further screen out the plane with the most inliers, and fit the best plane for the current target point based on the inliers in the plane with the most inliers, thereby further improving the accuracy of the best plane.

[0089] Fourth, based on the optimal plane of the current target point, calculate the normal vector and curvature corresponding to the current target point cloud.

[0090] In a possible implementation, the normal vector of the best plane may be calculated, and the normal vector of the best plane may be used as the normal vector corresponding to the current target point cloud.

[0091] In a possible implementation, when calculating the curvature corresponding to the current target point cloud based on the optimal plane, the following steps may be included:

[0092] In a possible implementation, when calculating the curvature corresponding to the current target point cloud based on the optimal plane, it includes:

[0093] First, the distance from each spatial adjacent point to the optimal plane is calculated, and the spatial adjacent points whose distance to the optimal plane is less than or equal to a preset second distance threshold are selected as the inner points corresponding to the optimal plane. The second distance threshold may range from 0.00m to 0.25m, and preferably, the second distance threshold may be set to 0.15m.

[0094] Secondly, the mean of the distances from the inner points corresponding to the optimal plane to the optimal plane is calculated, and the mean is used as the curvature corresponding to the current target point cloud.

[0095] In this embodiment, the mean value of the distance from the inner point corresponding to the optimal plane to the optimal plane is used as the curvature corresponding to the current target point cloud, so that the curvature has a specific physical meaning and unit, thereby making the subsequent comparison of the curvature size more accurate.

[0096] Fifth, after the traversal is completed, the normal vector, curvature and optimal plane of each target point cloud can be obtained.

[0097] Sixth, based on the normal vector, curvature and optimal plane of each target point cloud, region growth with point cloud as primitive is performed on each target point cloud to obtain the second roof point cloud segmentation patch. The specific steps are as follows:

[0098] First, the target point cloud with the smallest curvature is selected from the target point cloud as the seed point.

[0099] Secondly, traverse the adjacent points in the target point cloud that meet the proximity conditions with the seed point.

[0100] Next, for the current neighboring point traversed, calculate the normal vector angle between the current neighboring point and the seed point and the distance from the current neighboring point to the optimal plane corresponding to the seed point: when the normal vector angle between the current neighboring point and the seed point is less than or equal to the preset first normal vector threshold, and the distance from the current neighboring point to the optimal plane corresponding to the seed point is less than or equal to the preset third distance threshold, divide the current neighboring point into the optimal plane corresponding to the seed point. It should be noted here that the seed point is selected from the target point cloud. Therefore, the seed point is essentially also a target point cloud. The optimal planes of each target point cloud have been calculated in the above calculation steps. Therefore, the selected seed point also has a corresponding optimal plane. Among them, the range of the third distance threshold can be 0.00m-0.25m. Preferably, the third distance threshold can be set to 0.15m.

[0101] Then, after the traversal is completed, the current best plane corresponding to the seed point is used as the second roof point cloud segmentation patch corresponding to the seed point. It should be noted here that in the process of region growth based on the selected seed point, adjacent points that meet the conditions will be continuously divided into the best plane corresponding to the seed point, that is, the best plane corresponding to the seed point is continuously updated. After the traversal is completed, the last updated best plane is used as the second roof point cloud segmentation patch corresponding to the seed point.

[0102] Next, the target point cloud with the smallest curvature is selected from the unprocessed target point cloud as a new seed point, and region growth is performed based on the new seed point until all target point clouds are processed, and all second roof point cloud segmentation patches are output.

[0103] In a possible implementation, before calculating the normal vector angle between the current neighboring point and the seed point and the distance from the current neighboring point to the optimal plane where the seed point is located, the following steps can also be included: determining whether the current neighboring point has been processed, that is, whether it has been divided into the corresponding second roof point cloud segmentation patch.

[0104] When not processed, calculate the normal vector angle between the current neighbor point and the seed point and the distance from the current neighbor point to the optimal plane corresponding to the seed point. When the normal vector angle between the current neighbor point and the seed point is less than or equal to the preset first normal vector threshold, and the distance from the current neighbor point to the optimal plane corresponding to the seed point is less than or equal to the preset third distance threshold, divide the current neighbor point into the optimal plane corresponding to the seed point. When processed, calculate the distance from the current neighbor point to the optimal plane corresponding to the seed point; determine whether the distance from the current neighbor point to the optimal plane corresponding to the seed point is less than or equal to the preset fourth distance threshold. When it is less than or equal to the preset fourth distance threshold, divide the current neighbor point into the optimal plane corresponding to the seed point. When it is greater than the preset fourth distance threshold, the current neighbor point still belongs to the original divided second roof point cloud segmentation patch. The range of the fourth distance threshold can be 0.00m-0.25m. Preferably, the fourth distance threshold can be set to 0.25m.

[0105] The method of this embodiment can enable each target point cloud to be divided into the segmentation surface patch closest to it, thereby improving the accuracy of spatial adjacent point division.

[0106] S1500: taking the complete roof facets in the first roof point cloud segmentation facets and the second roof point cloud segmentation facets as the segmentation results of the building point cloud.

[0107] The present disclosure provides a method for segmenting a building point cloud, including obtaining a building point cloud to be processed; constructing a first Delaunay triangulation based on the building point cloud, and performing region growth with triangular facets in the first Delaunay triangulation as primitives to obtain multiple first roof point cloud segmentation facets; dividing each first roof point cloud segmentation facet into a complete roof facet and a triangular facet to be processed, wherein the triangular facet to be processed includes an isolated triangular facet and three edges of the same triangular facet divided into at least two different first roof point cloud segmentation facets; for the triangular facet to be processed, extracting the building point cloud constituting the triangular facet to be processed as a target point cloud, performing region growth with point cloud as primitives on the target point cloud, and obtaining a second roof point cloud segmentation facet; taking the complete roof facet in the first roof point cloud segmentation facet and the second roof point cloud segmentation facet as the segmentation result of the building point cloud. In the present disclosure, two different region growing algorithms are combined to segment the building point cloud, so that the result of the building point cloud segmentation is more accurate.

[0108] Combine the following Figure 3 The building point cloud segmentation method disclosed in the present invention is further described in detail with reference to a specific example. Figure 3 As shown, the segmentation method of the building point cloud includes the following steps:

[0109] S2001, input the classified building point cloud.

[0110] S2002, constructs Delaunay triangulation based on building point cloud.

[0111] S2003, calculating the area of ​​each triangular facet constituting the Delaunay triangulation.

[0112] S2004, sorting the triangular facets according to their area.

[0113] S2005, selecting a region growth seed face. Specifically, the unprocessed triangular face with the largest area is selected as the seed face.

[0114] S2006: Based on the seed facet, perform region growing with triangular facets as primitives.

[0115] S2007, determine whether there are adjacent face patches to the seed face, if so, execute step S2008, if not, return to execute S2005.

[0116] S2008, determine whether the first normal vector angle between the adjacent face and the seed face is less than the preset first angle threshold. If it is less than the preset first angle threshold (i.e., it meets the condition), execute S2009; if it is greater than or equal to the preset first angle threshold (i.e., it does not meet the condition), return to execute S2005.

[0117] S2009, dividing the adjacent facets that meet the conditions into the set where the seed facets are located, and repeating steps S2005-S2009 until all triangular facets are processed to form a plurality of first roof point cloud segmentation facets.

[0118] S2010: Determine the type of each first roof point cloud segmentation facet.

[0119] S2011, dividing the first roof point cloud segmented patches into segmented complete patches, isolated triangular patches and cross-face triangular patches according to their types, wherein the cross-face triangular patches are triangular patches in which different sides of the same triangular patch are divided into different patches.

[0120] S2012, for each isolated triangle patch and cross-face triangle patch, perform region growing using the point cloud as a primitive.

[0121] S2013, for the isolated triangular face or cross-face triangular face currently being processed, extract the point cloud constituting the isolated triangular face or cross-face triangular face currently being processed as the target point cloud.

[0122] S2014, establish the kd-tree structure of the target point cloud.

[0123] S2015 uses the K nearest neighbor algorithm to search for the spatial neighboring points of each target point cloud in the kd-tree structure.

[0124] S2016, performing plane fitting on the spatial adjacent points of each target point cloud to obtain the best plane for each target point cloud.

[0125] S2017, based on the best plane of each target point cloud, calculate the normal vector and curvature of each target point cloud. S2018, sort the target point clouds from small to large according to the curvature.

[0126] S2019, selecting a seed point for region growth. Specifically, the point with the smallest curvature is selected as the seed point from each unprocessed target point cloud.

[0127] S2020, extracting neighboring points of the seed point.

[0128] S2021, determine whether the adjacent points of the seed point have been marked, if not marked, execute step S2022, if marked, execute step S2024.

[0129] S2022, determine whether the normal vector angle between the adjacent point and the seed point is less than or equal to a preset first normal vector threshold, and whether the distance from the adjacent point to the optimal plane corresponding to the seed point is less than or equal to a preset third distance threshold. If both conditions are met, execute step S2023. If any of the conditions is not met, return to step S2019.

[0130] S2023, adding the adjacent points of the composite condition to the optimal plane corresponding to the seed point.

[0131] S2024, calculate the distance from the adjacent point to the optimal plane corresponding to the seed point; determine whether the distance from the adjacent point to the optimal plane corresponding to the seed point is less than or equal to a preset fourth distance threshold, and if it is less than or equal to the preset fourth distance threshold (i.e., meets the condition), execute step S2023. If it is greater than the preset fourth distance threshold (i.e., does not meet the condition), execute step S2025.

[0132] S2025, returning the adjacent points to the originally divided second roof point cloud segmentation patch.

[0133] S2026, return to step S2019, until all target point clouds are processed, and output a number of second roof point cloud segmentation patches.

[0134] S2027, outputting the segmented complete facets in the first roof point cloud segmentation facets and all the second roof point cloud segmentation facets as the final point cloud segmentation result.

[0135] It should be noted here that the detailed steps in this embodiment refer to the corresponding content above and will not be repeated here.

[0136] <Device Example>

[0137] Figure 4 FIG. 5 is a schematic block diagram of a device for segmenting a building point cloud according to an embodiment of the present disclosure. Figure 4 As shown, the building point cloud segmentation device 100 includes:

[0138] A point cloud reading module 110 is used to obtain a point cloud of a building to be processed;

[0139] The first point cloud segmentation module 120 is used to construct a first Delaunay triangulation network based on the building point cloud, and perform region growth using the triangular facets in the first Delaunay triangulation network as primitives to obtain a plurality of first roof point cloud segmentation facets;

[0140] A patch classification module 130 is used to divide each first roof point cloud segmentation patch into a complete roof patch and a to-be-processed triangular patch, wherein the to-be-processed triangular patch includes an isolated triangular patch and a triangular patch whose three edges are divided into at least two different first roof point cloud segmentation patches;

[0141] The first point cloud segmentation module 140 is used to extract the building point cloud constituting the to-be-processed triangular facet as the target point cloud, and perform region growth with the point cloud as the primitive on the target point cloud to obtain a second roof point cloud segmentation facet;

[0142] The result output module 150 is used to use the complete roof patch in the first roof point cloud segmentation patch and the second roof point cloud segmentation patch as the segmentation result of the building point cloud.

[0143] <Equipment Embodiment>

[0144] Figure 5 FIG. 1 is a schematic block diagram of a device for segmenting a building point cloud according to an embodiment of the present disclosure. Figure 5 As shown, the device 200 for segmenting a building point cloud includes: a processor 210 and a memory 220 for storing executable instructions of the processor 210. The processor 210 is configured to implement any of the above-mentioned methods for segmenting a building point cloud when executing the executable instructions.

[0145] Here, it should be noted that the number of processors 210 may be one or more. Meanwhile, in the device 200 for segmenting a building point cloud in the embodiment of the present disclosure, an input device 230 and an output device 240 may also be included. The processor 210, the memory 220, the input device 230 and the output device 240 may be connected via a bus or in other ways, which are not specifically limited here.

[0146] The memory 220 is a computer-readable storage medium that can be used to store software programs, computer executable programs, and various modules, such as the program or module corresponding to the building point cloud segmentation method of the embodiment of the present disclosure. The processor 210 executes various functional applications and data processing of the building point cloud segmentation device 200 by running the software program or module stored in the memory 220.

[0147] The input device 230 may be used to receive input numbers or signals. The signals may be key signals related to user settings and function control of the device / terminal / server. The output device 240 may include display devices such as display screens.

[0148] <Storage Medium Embodiment>

[0149] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium is also provided, on which computer program instructions are stored. When the computer program instructions are executed by the processor 210, any of the above-mentioned methods for segmenting a building point cloud is implemented.

[0150] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for segmenting a building point cloud, characterized in that: include: Obtain the building point cloud to be processed; Based on the building point cloud, a first Delaunay triangulation network is constructed, and triangular facets in the first Delaunay triangulation network are used as primitives to perform region growth to obtain a plurality of first roof point cloud segmentation facets; Divide each of the first roof point cloud segmentation patches into complete roof patches and to-be-processed triangular patches, wherein the to-be-processed triangular patches include isolated triangular patches and triangular patches whose three edges of the same triangular patch are divided into at least two different first roof point cloud segmentation patches; For the to-be-processed triangular facet, extract the building point cloud constituting the to-be-processed triangular facet as the target point cloud, perform region growing with the point cloud as the primitive on the target point cloud, and obtain a second roof point cloud segmentation facet; Using the complete roof facets in the first roof point cloud segmentation facets and the second roof point cloud segmentation facets as the segmentation result of the building point cloud; When performing region growing with point cloud as primitive on the target point cloud to obtain a second roof point cloud segmentation patch, the method includes: Traversing each of the target point clouds; For the traversed current target point cloud, a K nearest neighbor algorithm is used to filter out spatial adjacent points of the current target point cloud from each of the target point clouds; Performing plane fitting on the spatial adjacent points to obtain the optimal plane of the current target point; Based on the optimal plane, calculating the normal vector and curvature corresponding to the current target point cloud; After the traversal is completed, the normal vector, curvature and optimal plane of each target point cloud are obtained; Based on the normal vector, curvature and optimal plane of each target point cloud, region growing with point cloud as primitive is performed on each target point cloud to obtain a second roof point cloud segmentation patch.

2. The method according to claim 1, characterized in that When the triangular facets in the first Delaunay triangulation are used as primitives to perform region growth to obtain the first roof point cloud segmentation facets, the method includes: For each triangular facet constituting the first Delaunay triangulation, calculating the area of ​​each triangular facet; A seed surface is selected based on the area of ​​each of the triangular facets, and region growth is performed based on the selected seed surface to obtain the first roof point cloud segmentation facet.

3. The method according to claim 1, characterized in that When performing plane fitting on the spatial adjacent points to obtain the best plane for the current target point, it includes: Based on the spatial adjacent points, construct a second Delaunay triangulation network, and for each triangular facet constituting the second Delaunay triangulation network, calculate the area of ​​each triangular facet; Selecting the triangular facet with the largest area from each of the triangular facets as a first sample facet, and constructing a first plane based on the first sample facet; Calculating the distance between each of the spatial adjacent points and the first plane, and selecting the spatial adjacent points whose distance to the first plane is less than or equal to a preset first distance threshold as the inner points corresponding to the first plane; A plane fitting is performed based on the inner points corresponding to the first plane to obtain the optimal plane for the current target point.

4. The method according to claim 1, characterized in that: When calculating the curvature corresponding to the current target point cloud based on the optimal plane, it includes: Calculating the distance between each of the spatial adjacent points and the optimal plane, and selecting the spatial adjacent points whose distance to the optimal plane is less than or equal to a preset second distance threshold as the inner points corresponding to the optimal plane; The average value of the distances from the inner points corresponding to the optimal plane to the optimal plane is calculated, and the average value is used as the curvature corresponding to the current target point cloud.

5. The method according to claim 1, characterized in that When performing region growth with point clouds as primitives on each of the target point clouds based on the normal vectors and curvatures of each of the target point clouds to obtain a second roof point cloud segmentation patch, the method includes: Selecting a target point cloud with the smallest curvature from the target point cloud as a seed point; Traversing adjacent points in the target point cloud that meet proximity conditions with the seed point; For the traversed current adjacent point, calculate the normal vector angle between the current adjacent point and the seed point and the distance from the current adjacent point to the optimal plane where the seed point is located; When the normal vector angle between the current neighboring point and the seed point is less than or equal to a preset first normal vector threshold, and the distance from the current neighboring point to the optimal plane where the seed point is located is less than or equal to a preset third distance threshold, the current neighboring point is divided into the optimal plane where the seed point is located; After the traversal is completed, the current best plane where the seed point is located is used as the second roof point cloud segmentation patch; A target point cloud with the smallest curvature is selected from the unprocessed target point cloud as a new seed point, and region growth is performed based on the new seed point until all target point clouds are processed, and all second roof point cloud segmentation patches are output.

6. The method according to claim 5, characterized in that Before calculating the normal vector angle between the current neighboring point and the seed point and the distance from the current neighboring point to the optimal plane where the seed point is located, the method further includes: Determine whether the current adjacent point has been processed; When it is not processed, the operation of calculating the normal vector angle between the current neighboring point and the seed point and the distance from the current neighboring point to the optimal plane corresponding to the seed point is performed; When the current neighbor point has been processed, the distance from the optimal plane where the seed point is located is calculated; Determine whether the distance from the current neighboring point to the optimal plane where the seed point is located is less than or equal to a preset fourth distance threshold, and when the distance is less than or equal to the preset fourth distance threshold, divide the current neighboring point into the optimal plane where the seed point is located.

7. A device for segmenting a building point cloud, characterized in that: include: Point cloud reading module, used to obtain the building point cloud to be processed; A first point cloud segmentation module is used to construct a first Delaunay triangulation network based on the building point cloud, and perform region growth using triangular facets in the first Delaunay triangulation network as primitives to obtain a plurality of first roof point cloud segmentation facets; A patch classification module, used for dividing each of the first roof point cloud segmentation patches into complete roof patches and to-be-processed triangular patches, wherein the to-be-processed triangular patches include isolated triangular patches and triangular patches whose three edges of the same triangular patch are divided into at least two different first roof point cloud segmentation patches; A second point cloud segmentation module is used to extract the building point cloud constituting the to-be-processed triangular facet as a target point cloud, and perform region growth with point clouds as primitives on the target point cloud to obtain a second roof point cloud segmentation facet; A result output module, used for taking the complete roof facets in the first roof point cloud segmentation facets and the second roof point cloud segmentation facets as the segmentation results of the building point cloud; When performing region growing with point cloud as primitive on the target point cloud to obtain a second roof point cloud segmentation patch, the method includes: Traversing each of the target point clouds; For the traversed current target point cloud, a K nearest neighbor algorithm is used to filter out spatial adjacent points of the current target point cloud from each of the target point clouds; Performing plane fitting on the spatial adjacent points to obtain the optimal plane of the current target point; Based on the optimal plane, calculating the normal vector and curvature corresponding to the current target point cloud; After the traversal is completed, the normal vector, curvature and optimal plane of each target point cloud are obtained; Based on the normal vector, curvature and optimal plane of each target point cloud, region growing with point cloud as primitive is performed on each target point cloud to obtain a second roof point cloud segmentation patch.

8. A device for segmenting building point clouds, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the method described in any one of claims 1 to 6 when executing the executable instructions.

9. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Building roof facet segmentation method based on three-dimensional Voronoi graph

    CN107944383A

  • Multi-level building rapid three-dimensional reconstruction method based on laser radar point cloud

    CN108765568A