Building structure extraction method and device based on point cloud data, equipment and medium

By performing planar fitting and attribute merging on point cloud data, the problem of redundant detail interference in 3D building modeling under the full-element acquisition mode of LiDAR was solved, achieving efficient and accurate extraction of the main structure of buildings and improving the automation level of city-level 3D modeling.

CN122156453APending Publication Date: 2026-06-05GUANGZHOU URBAN PLANNING & DESIGN SURVEY RES INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU URBAN PLANNING & DESIGN SURVEY RES INST
Filing Date
2026-02-02
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies are unable to effectively solve the problem of redundant details interfering with the extraction of the main structure in 3D building modeling under the full-element acquisition mode of LiDAR. Traditional methods lack intelligent filtering mechanisms, while deep learning methods rely on a large amount of labeled data and consume high computational resources, resulting in low efficiency of automated urban modeling.

Method used

By performing planar fitting on point cloud data, an initial set of planar primitives is constructed. Primitive attributes are calculated and a two-dimensional spatial adjacency graph is constructed. Based on the attribute set, merging is performed to remove redundant primitives and retain the main structural primitives, forming a structured set of planar primitives.

Benefits of technology

It improves the efficiency and accuracy of building structure extraction, reduces the amount of subsequent manual cleaning work, alleviates the contradiction between point cloud data and city-level modeling, and enhances the automation level of 3D modeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156453A_ABST
    Figure CN122156453A_ABST
Patent Text Reader

Abstract

The application discloses a building structure extraction method and device based on point cloud data, equipment and medium, and belongs to the field of surveying and geographic information technology. The method comprises the following steps: performing plane fitting processing on given building three-dimensional point cloud data to obtain an initial plane primitive set; performing attribute calculation processing on each primitive in the initial plane primitive set to obtain a primitive attribute set; constructing a two-dimensional space adjacency graph for representing the adjacency relationship between primitives based on the initial plane primitive set; and performing merging processing on the adjacent primitives in the two-dimensional space adjacency graph according to the primitive attribute set to obtain a structured plane primitive set for constructing a building three-dimensional model. The embodiment of the application can improve the efficiency and accuracy of extracting the building structure from the full-feature building point cloud.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of surveying and geographic information technology, and in particular to a method, apparatus, equipment and medium for extracting building structures based on point cloud data. Background Technology

[0002] LiDAR can efficiently acquire high-precision 3D point cloud data of building surfaces, but its full-element acquisition mode completely records rooftop ancillary facilities and fragmented features caused by obstruction and noise, which significantly contradicts the requirement for a concise and regular model in city-level 3D modeling. These redundant details interfere with the automatic extraction and reconstruction of the main building structure, and existing technologies struggle to effectively resolve this problem.

[0003] For example, traditional geometric reconstruction methods focus on the accuracy of data geometric fitting, reconstructing detected features indiscriminately, and lack an intelligent screening and generalization mechanism to distinguish between the main building and its ancillary facilities. While deep learning-based semantic segmentation methods can identify components, they rely on large amounts of labeled data, have limited generalization ability, and consume high computational power, making them unsuitable for the needs of low-cost, high-efficiency large-scale urban modeling. Currently, when dealing with complex real-world urban scenarios, automated solutions often produce fragmented outputs or contain non-main structures, requiring extensive manual post-processing, which severely restricts the overall automation level and efficiency of urban 3D reconstruction. Summary of the Invention

[0004] The purpose of this application is to provide a method, apparatus, device, and medium for extracting building structures based on point cloud data, which can effectively improve the efficiency and accuracy of extracting building structures from full-element building point clouds.

[0005] To achieve the above objectives, a first aspect of this application provides a method for extracting building structures based on point cloud data, comprising: The given 3D point cloud data of a building is subjected to planar fitting to obtain an initial set of planar primitives; Perform attribute calculations on each primitive in the initial set of planar primitives to obtain a primitive attribute set; Based on the initial set of planar primitives, a two-dimensional spatial adjacency graph is constructed to characterize the adjacency relationships between primitives; The adjacency primitives in the two-dimensional spatial adjacency graph are merged according to the primitive attribute set to obtain a structured planar primitive set for constructing a three-dimensional building model.

[0006] Compared with existing technologies, the building structure extraction method based on point cloud data provided in this application has the following advantages: Firstly, by performing planar fitting processing on the 3D point cloud data of the building to obtain an initial set of planar primitives, primitives with planar features can be initially screened from massive point cloud data, defining the basic scope for the extraction of the main structure of the building. Secondly, by calculating the attributes of each primitive in the initial set of planar primitives and constructing a two-dimensional spatial adjacency graph representing the adjacency relationship between primitives, the topological relationship between primitives can be explicitly expressed. Thirdly, based on the primitive attribute set, the adjacent primitives in the two-dimensional spatial adjacency graph are merged, achieving optimized integration of the initial planar primitives. This effectively eliminates fragmented and redundant primitives caused by ancillary facilities, occlusion, and noise in the 3D point cloud data of the building, and filters and retains primitives that can accurately represent the main structure of the building to form a structured set of planar primitives. This provides a concise and regular primitive foundation for the construction of the 3D model of the building, alleviating the contradiction between full-element point cloud acquisition and city-level 3D modeling regarding model simplicity and regularity, reducing the workload of subsequent manual cleaning and simplification, and improving the efficiency and reliability of building structure extraction.

[0007] In some embodiments, the primitive attribute set includes the height, shape profile, base area, planar parameters, projection point set, and coverage area of ​​each primitive.

[0008] In some embodiments, the step of merging the adjacency primitives in the two-dimensional spatial adjacency graph according to the primitive attribute set to obtain a structured planar primitive set for constructing a three-dimensional building model includes: Based on the primitive attribute set, a first merging process is performed on the adjacent primitive pairs in the two-dimensional spatial adjacency graph that satisfy the first condition to obtain an updated plane primitive set; wherein, the first condition includes: the angle between the plane normal vectors of two adjacent primitives is less than a first threshold, and the distance from the projection point set of two adjacent primitives to the plane where the other is located is less than a second threshold. Based on the primitive attribute set, a second merging process is performed on adjacent primitive pairs in the updated planar primitive set that satisfy the second condition to obtain a structured planar primitive set for constructing a three-dimensional building model; wherein, the second condition includes: the height difference between two adjacent primitives is less than a third threshold, and the ratio of the intersection area of ​​the shape contours of the two adjacent primitives on the horizontal plane to the smaller base area of ​​the two is greater than a fourth threshold.

[0009] In some embodiments, the step of performing planar fitting processing on the given 3D point cloud data of a building to obtain an initial set of planar primitives includes: For each point in the 3D point cloud data of the building, a local neighborhood is constructed, and flatness is calculated. Seed points are selected based on the calculated flatness, and region growing is performed based on the spatial geometric consistency criterion to obtain planar regions; The planar regions are filtered based on a threshold number of points to obtain planar regions that serve as initial planar primitives, thus forming the initial planar primitive set.

[0010] In some embodiments, the step of performing attribute calculations on each primitive in the initial set of planar primitives to obtain a primitive attribute set includes: The height of the primitive is obtained by performing height calculation on the three-dimensional point set corresponding to the primitive. Extract the horizontal coordinates of the three-dimensional point set, and perform two-dimensional concave hull construction and area calculation to obtain the shape outline and base area of ​​the primitive; The planar parameters of the primitive are obtained by performing plane equation fitting on the three-dimensional point set. The three-dimensional point set is projected onto the fitted plane, and the projection point set generation process is performed to obtain the projection point set of the primitive. Based on the set of projection points, a triangular mesh is constructed and the area is summed to obtain the coverage area of ​​the primitive.

[0011] In some embodiments, constructing a two-dimensional spatial adjacency graph to characterize the adjacency relationships between primitives based on the initial set of planar primitives includes: Extract the horizontal coordinates of the three-dimensional point set corresponding to each primitive in the initial planar primitive set, and perform two-dimensional point set construction processing; Based on the two-dimensional point set, a k-nearest neighbor graph is constructed. The k-nearest neighbor graph is traversed, and adjacency relationships are established between corresponding primitives based on the primitive information to which the points belong, thus forming the two-dimensional spatial adjacency graph.

[0012] To achieve the above objectives, a second aspect of this application provides a building structure extraction device based on point cloud data, the device comprising: The fitting module is used to perform planar fitting on the given 3D point cloud data of a building to obtain an initial set of planar primitives. The calculation module is used to perform attribute calculation processing on each primitive in the initial planar primitive set to obtain a primitive attribute set; A construction module is used to construct a two-dimensional spatial adjacency graph representing the adjacency relationships between primitives based on the initial set of planar primitives; The merging module is used to merge the adjacency primitives in the two-dimensional spatial adjacency graph according to the primitive attribute set, so as to obtain a structured planar primitive set for constructing a three-dimensional building model.

[0013] In some embodiments, the primitive attribute set includes the height, shape profile, base area, planar parameters, projection point set, and coverage area of ​​each primitive, and the merging module includes: The first merging unit is used to perform a first merging process on the adjacent primitive pairs in the two-dimensional spatial adjacency graph that satisfy the first condition based on the primitive attribute set, so as to obtain an updated planar primitive set; wherein, the first condition includes: the angle between the plane normal vectors of two adjacent primitives is less than a first threshold, and the distance from the projection point set of two adjacent primitives to the plane where the other is located is less than a second threshold. The second merging unit is used to perform a second merging process on adjacent primitive pairs in the updated planar primitive set that meet the second condition based on the primitive attribute set, to obtain a structured planar primitive set for constructing a three-dimensional building model; wherein, the second condition includes: the height difference between two adjacent primitives is less than a third threshold, and the ratio of the intersection area of ​​the shape contours of the two adjacent primitives on the horizontal plane to the smaller base area of ​​the two is greater than a fourth threshold.

[0014] To achieve the above objectives, a third aspect of this application provides an electronic device, the electronic device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the method described in the first aspect.

[0015] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium comprising a stored computer program, wherein the computer program, when executed, controls the device containing the computer-readable storage medium to perform the method described in the first aspect. Attached Figure Description

[0016] Figure 1 This is a flowchart of a building structure extraction method based on point cloud data provided in an embodiment of this application; Figure 2 This is a schematic diagram of the given three-dimensional point cloud data of a building provided in the embodiments of this application; Figure 3 This is a schematic diagram showing the effect of urban area building summary data after being processed by the point cloud data-based building structure extraction method provided in the embodiments of this application; Figure 4 This is a schematic diagram of a building structure extraction device based on point cloud data provided in an embodiment of this application; Figure 5 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0018] In the description of this application, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0019] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0020] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0021] With the rapid development of smart city, digital twin, and city information modeling technologies, the rapid and automated construction of city-level 3D building models has become a major requirement in the surveying and geographic information field. LiDAR technology can efficiently acquire high-precision 3D point cloud data of building surfaces, providing a data foundation for automated modeling. However, its characteristic of collecting all elements—completely recording rooftop HVAC units, ventilation ducts, water tanks, low maintenance access routes, and other ancillary facilities, as well as fragmented features caused by various obstructions and noise—contradicts the requirements of city-level 3D modeling for model simplicity and regularity. These details, which are redundant information in macro-level city models, greatly interfere with the automatic extraction and reconstruction of the main building structure.

[0022] Existing technologies struggle to effectively address these contradictions. For instance, traditional geometric reconstruction methods prioritize the geometric fitting accuracy of data, tending to reconstruct all detected features indiscriminately, lacking intelligent screening and generalization mechanisms to distinguish between the main building structure and ancillary facilities. On the other hand, while deep learning-based semantic segmentation methods can identify components, they typically rely on large amounts of labeled data, have limited model generalization capabilities, and consume significant computational resources, making them impractical for large-scale urban modeling tasks that prioritize low cost and high efficiency. Consequently, current automated solutions, when dealing with complex and diverse real-world urban scenarios, often produce overly fragmented outputs or contain numerous non-main structures, ultimately requiring substantial manual intervention for post-construction cleaning and simplification, severely limiting the overall automation level and efficiency of urban 3D reconstruction.

[0023] Please see Figure 1 , Figure 1 This is an optional flowchart of the building structure extraction method based on point cloud data provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S101 to S104.

[0024] Step S101: Perform plane fitting processing on the given 3D point cloud data of the building to obtain an initial set of planar primitives; Step S102: Perform attribute calculation processing on each primitive in the initial planar primitive set to obtain the primitive attribute set; Step S103: Based on the initial set of planar primitives, construct a two-dimensional spatial adjacency graph to represent the adjacency relationship between primitives; Step S104: Merge the adjacency primitives in the two-dimensional spatial adjacency graph according to the primitive attribute set to obtain a structured planar primitive set for constructing the three-dimensional model of the building.

[0025] Steps S101 to S104 of this embodiment involve performing planar fitting on the 3D point cloud data of the building to obtain an initial set of planar primitives. This allows for the preliminary screening of primitives with planar features from massive point cloud data, defining the basic scope for extracting the main structure of the building. By calculating the attributes of each primitive in the initial set of planar primitives and constructing a two-dimensional spatial adjacency graph representing the adjacency relationship between primitives, the topological relationship between primitives can be explicitly expressed. Based on this, the adjacent primitives in the two-dimensional spatial adjacency graph are merged according to the primitive attribute set, which can optimize and integrate the initial planar primitives. This effectively eliminates fragmented and redundant primitives caused by ancillary facilities, occlusion, and noise in the 3D point cloud data of the building, and filters and retains primitives that can accurately represent the main structure of the building to form a structured set of planar primitives. This provides a concise and regular primitive foundation for the construction of the 3D model of the building, alleviating the contradiction between the full-element acquisition of point clouds and city-level 3D modeling in terms of model simplicity and regularity, reducing the workload of subsequent manual cleaning and simplification, and improving the efficiency and reliability of building structure extraction.

[0026] In step S101 of some embodiments, the building's three-dimensional point cloud data can be a dataset of three-dimensional coordinates (X, Y, Z) representing the spatial position of the building surface, collected by devices such as LiDAR, including information on all elements such as the building's main structure, ancillary facilities, and noise. In a specific embodiment, the building's three-dimensional point cloud data can mainly originate from airborne LiDAR point clouds acquired by an airborne platform and dense point clouds generated based on multi-view image matching (MVS), mainly including roof information of a single building; its average density is not less than 4 points / square meter.

[0027] Plane fitting is a process that uses algorithms to filter and cluster points that conform to planar features based on the geometric features of point cloud data, forming discrete planar regions. The initial set of planar primitives can be a set of discrete planar regions obtained after plane fitting, without merging and optimization. Each "planar primitive" is a single discrete planar region.

[0028] In some embodiments, a plane fitting process is performed on the given 3D point cloud data of a building to obtain an initial set of planar primitives, including: For each point in the 3D point cloud data of a building, a local neighborhood is constructed, and flatness is calculated. Seed points are selected based on the calculated flatness, and region growing is performed based on the spatial geometric consistency criterion to obtain planar regions; The planar regions are filtered based on the number of points to obtain the planar regions that serve as initial planar primitives, thus forming the initial planar primitive set.

[0029] Specifically, a k-dimensional tree (KD-tree) data structure is first constructed based on the input 3D point cloud data of the buildings. This structure is then used to retrieve the k nearest neighboring points for each point, thus completing the construction of the local neighborhood (k-neighborhood) for each point. Subsequently, based on principal component analysis, feature values ​​are extracted from the k-neighborhood of each point (the feature values ​​satisfy...). ), and through formula Calculate the flatness of this point. flatness The range of values ​​is , The closer the value is to 1, the closer the local surface of the point is to a plane, thus achieving quantitative calculation of the flatness of each point.

[0030] When selecting seed points, priority is given to selecting points that have not been assigned to any planar region and have the highest flatness, and these points are added to the seed point list. During the region growth process, for each seed point, it is determined whether the points in its k-neighborhood meet the spatial geometric consistency criteria (i.e., the distance from the nearest neighbor to the current plane is less than a preset distance threshold, and the angle between the normal vector of the nearest neighbor and the normal vector of the current plane is less than a preset angle threshold). If they meet the criteria, the nearest neighbor is included in the current planar block and added to the seed point list, while the planar model is updated. Then, the seed points that have been traversed are removed from the list, and the above growth process is repeated until the seed point list is empty (the growth of a single planar block is completed). Then, the growth of other planar blocks is carried out in a loop until all point cloud data is traversed, and finally multiple discrete planar regions are obtained.

[0031] Since point cloud data may contain noise and tiny invalid regions formed by outliers, a threshold for the number of points is set, and only planar regions containing more than the threshold are retained. These planar regions that meet the requirements are the initial planar primitives, and all initial planar primitives together form the initial planar primitive set.

[0032] In step S102 of some embodiments, the primitive attribute set can be a multi-dimensional data set used to describe the features of each planar primitive, including height, shape profile, base area, planar parameters (planar equation, normal vector), projection point set, and coverage area.

[0033] In some embodiments, attribute calculations are performed on each primitive in the initial set of planar primitives to obtain a primitive attribute set, including: The height of the primitive is obtained by performing height calculation on the three-dimensional point set corresponding to the primitive. Extract the horizontal coordinates of the 3D point set, and perform 2D concave hull construction and area calculation to obtain the shape outline and base area of ​​the primitive; The plane equations of the three-dimensional point set are fitted to obtain the plane parameters of the primitives. The three-dimensional point set is projected onto the fitted plane, and the projection point set generation process is performed to obtain the projection point set of the primitive. The triangular mesh is constructed and the area is summed based on the projection point set to obtain the coverage area of ​​the primitive.

[0034] Specifically, first obtain the three-dimensional point set corresponding to each initial planar primitive. From this three-dimensional point set Extract the vertical coordinates (i.e., Z-values) of all points, sort these Z-values, and take the median value to calculate the height. The final median value is the height of the primitive. This method effectively avoids interference from individual outliers on the high-level representation of primitives. Then, from the three-dimensional point set of the primitives... Extract the horizontal coordinates (i.e., X and Y coordinates) of all points; then perform the Chi-Shape concave hull algorithm on these two-dimensional coordinates to generate a compact, non-convex polygon that is simply connected and has no internal holes. This polygon is the shape outline of the primitive. Simultaneously calculate the area of ​​the concave polygon; this area is the base area of ​​the primitive. The concave hull algorithm can accurately fit the actual contour features of the primitive in the horizontal direction.

[0035] Next, the random sampling consensus algorithm is used to process the three-dimensional point set corresponding to the primitive. By performing plane model fitting and leveraging the robust fitting capability of this algorithm, the plane equation is ultimately obtained. and the normal vector of the plane The plane equation and the normal vector together constitute the plane parameters that characterize the plane features of the primitive space.

[0036] After obtaining the fitting plane, the three-dimensional point set corresponding to the primitive is... All points along the normal vector of the fitted plane. The points are projected onto the fitted 3D plane, and this projection operation generates a new set of points, which is the projection point set of the primitive. This lays the foundation for subsequent calculations of the coverage area.

[0037] Finally, the Alpha-Shape algorithm (or the Delaunay triangulation algorithm with distance threshold) is used to project the point set. A triangulation network is constructed, a process that allows for the creation of internal holes in sparse point cloud regions to match the actual point cloud distribution characteristics. The sum of the areas of all triangles in the constructed triangulation network is then calculated; this sum represents the coverage area of ​​the primitives. .

[0038] In step S103 of some embodiments, the two-dimensional spatial adjacency graph can be a graph structure constructed with planar primitives as vertices and the proximity relationship between primitives as edges. The proximity is determined only based on the horizontal coordinates (X,Y) of the point cloud, which is used to quickly locate merging adjacent primitives.

[0039] In some embodiments, a two-dimensional spatial adjacency graph is constructed based on an initial set of planar primitives to characterize the adjacency relationships between primitives, including: Extract the horizontal coordinates of the three-dimensional point set corresponding to each primitive in the initial planar primitive set, and perform two-dimensional point set construction processing; K-nearest neighbor graph construction based on two-dimensional point sets; Traverse the k-nearest neighbor graph and establish adjacency relationships between corresponding primitives based on the primitive information of the points to form a two-dimensional spatial adjacency graph.

[0040] Specifically, we first traverse each planar primitive in the initial set of planar primitives to obtain the corresponding three-dimensional point set for each primitive. Then, we extract the horizontal coordinates (i.e., X and Y coordinates) of all points from these three-dimensional point sets. Finally, we summarize and integrate the horizontal coordinates of all primitives to construct a unified two-dimensional point set. This provides basic data for determining the relationships between neighbors in the future.

[0041] Based on the constructed two-dimensional point set Construct a KD-tree data structure and leverage its efficient nearest neighbor search capability to traverse the two-dimensional point set. For each point in the graph, the k nearest neighbors of each point are found by querying the KD-tree, and then a point-level nearest neighbor list containing information about all points and their nearest neighbors is generated. This completes the construction of the k-nearest neighbor graph and realizes the initial association of nearest neighbor relationships at the point level.

[0042] Next, iterate through each planar primitive and all the points contained within that primitive; for each point Check each of its nearest neighbors in the k-nearest neighbor graph in turn. Query and confirm nearest neighbor points To which the primitive index belongs If the nearest neighbor point There is an explicit primitive index. And the index Unlike the primitive index to which the current point belongs, that is Then in the current primitive and the primitive to which the nearest neighbor belongs An undirected adjacent edge is recorded between each primitive; finally, all recorded undirected adjacent edges are summarized to form a graph structure with planar primitives as vertices and the adjacency relationships between primitives as edges. This graph structure is the two-dimensional spatial adjacency graph used to represent the adjacency relationships between primitives. , where the vertex set For all planar primitives, the set of edges This represents the adjacency relationship between primitives.

[0043] In step S104 of some embodiments, the merging process can be an optimization process that filters adjacent primitives that meet the merging conditions based on primitive attributes and integrates them into a single primitive. This includes two types: coplanar consistency merging and structural generalization merging. The structured planar primitive set can be a regular planar primitive set obtained after merging optimization, which retains the main skeleton of the building and removes redundant details. It can be directly used to construct a three-dimensional model of the building.

[0044] In some embodiments, the primitive attribute set includes the height, shape profile, base area, planar parameters, projection point set, and coverage area of ​​each primitive. Adjacent primitives in the two-dimensional spatial adjacency graph are merged according to the primitive attribute set to obtain a structured planar primitive set for constructing the three-dimensional model of the building, including: Based on the primitive attribute set, the first merging process is performed on the adjacent primitive pairs in the two-dimensional spatial adjacency graph that satisfy the first condition to obtain the updated plane primitive set; wherein, the first condition includes: the angle between the plane normal vectors of two adjacent primitives is less than a first threshold, and the distance from the projection point set of two adjacent primitives to the plane where the other is located is less than a second threshold. Based on the primitive attribute set, the adjacent primitive pairs in the updated planar primitive set that meet the second condition are processed by performing a second merging process to obtain a structured planar primitive set for constructing a three-dimensional building model; wherein, the second condition includes: the height difference between two adjacent primitives is less than a third threshold, and the ratio of the intersection area of ​​the shape contours of the two adjacent primitives on the horizontal plane to the smaller base area of ​​the two is greater than a fourth threshold.

[0045] Specifically, the first merging process can be coplanar consistency merging, mainly used to repair coplanar structures that are spatially continuous but logically separated due to excessive segmentation or occlusion, while avoiding merging spatially independent adjacent structures. In practice, it first determines the coverage area of ​​the primitives. Sort the primitives in the initial planar primitive set in descending order, and select the primitive with the largest coverage area as the reference primitive. Then in the two-dimensional adjacency graph Searching for the reference primitive in the middle Directly connected primitives are used as candidate primitives .

[0046] Furthermore, it is determined whether the reference primitive and the candidate primitive satisfy the first condition—the angle between the plane normal vectors of two adjacent primitives is less than a first threshold, and the distance from the projection point set of the two adjacent primitives to the plane of the other is less than a second threshold. Here, the first threshold is the normal vector angle threshold, ranging from 5 to 15 degrees. Specifically, it can be determined by calculating the absolute value of the dot product of the plane normal vectors of the two primitives. For example, by obtaining the plane normal vectors of the two primitives... and Calculate the absolute value of their dot product. Determine whether the absolute value is greater than a preset angle cosine threshold (e.g., ...). This means that the angle between the corresponding normal vectors is less than a preset angle threshold. This ensures that the directions of both are basically consistent. This first threshold allows for reasonable errors in the normal vector calculation process while effectively distinguishing adjacent planes with clear design transitions, such as those on both sides of the ridge line. If the building surface is severely damaged or uneven, this threshold can be appropriately increased.

[0047] The second threshold is the distance threshold from a point to a surface, preset to 0.1-0.2 meters. This value comprehensively considers the typical measurement errors in the vertical direction of airborne lidar or multi-view image matching point clouds, as well as the thickness fluctuations of building roof tiles and waterproof layers. For multi-view image matching point clouds with greater noise, this threshold can be relaxed to 0.3-0.4 meters to enhance the robustness of the fit. The specific determination method is to cross-calculate the distance from the projection point sets of two adjacent primitives to the plane where the other is located, and confirm whether it is less than the threshold; for example, cross-calculate candidate primitives. Projection point set to reference primitive Distance to the plane in which it is located, and reference primitive. To candidate primitives If the distance between a point and a plane meets a preset threshold constraint (e.g., less than 0.2m), then the two are determined to be spatially adjacent.

[0048] If reference element With candidate primitives If the first condition is met simultaneously, then the candidate primitive will be... Merging into reference primitives In this process, the sorting, retrieval, judgment, and merging operations described above are executed repeatedly until all primitives in the initial planar primitive set have been traversed, ultimately resulting in an updated planar primitive set that has completed coplanar repair.

[0049] After obtaining the updated set of planar primitives, the second merging process can be a structural generalization merging, the purpose of which is to generalize the building's roof-level structure and merge small auxiliary components or redundant overlapping parts attached to the main structure. In practice, this is first performed based on the coverage area of ​​the primitives. Sort the primitives in the updated planar primitive set in descending order, and select the primitive with the largest coverage area as the reference primitive. and in the two-dimensional adjacency graph The directly connected primitives are retrieved as candidate primitives. Then determine the reference primitive. With candidate primitives The second condition is met: the height difference between two adjacent primitives is less than the third threshold, and the ratio of the intersection area of ​​the shapes of the two adjacent primitives on the horizontal plane to the area of ​​the smaller of the two bases is greater than the fourth threshold. The third threshold is the height difference threshold, preset to 3.0 meters. This value can be set with reference to standard architectural floor heights. Protruding structures with a height difference less than this threshold are usually auxiliary components that need to be generalized, such as HVAC units, water tanks, and parapet walls. Structures with a height difference greater than this threshold generally correspond to main features that need to be retained, such as floors or blocks. In practical applications, the required modeling detail can be adjusted accordingly. Adjustments can be made to the height. If fine structures such as parapet walls need to be preserved, the height can be lowered to 1.0-1.5 meters. If only the main body blocks need to be preserved, the height can be raised to 3.0 meters or more. The fourth threshold is the area ratio threshold, which is preset to 0.5. The specific calculation method is the ratio of the intersection area of ​​the outlines of two adjacent primitives on the horizontal plane to the smaller base area of ​​the two. This threshold is used to determine the topological attachment relationship between candidate primitives and reference primitives, ensuring that only candidate primitives whose area falls within the outline range of the reference primitive will be judged as subordinate structures, avoiding the erroneous merging of independent structures with only a small overlap at the edges.

[0050] Furthermore, the reference primitive is calculated. With candidate primitives absolute value of the difference in height attribute Determine whether it is less than the third threshold (e.g., 3.0m); calculate the area of ​​the intersection region of the two shapes on the horizontal plane, and determine whether the ratio of the intersection area to the smaller base area of ​​the two is greater than the preset area ratio threshold (e.g., 0.5).

[0051] Finally, if both the reference primitive and the candidate primitive satisfy the second condition mentioned above, then the candidate primitive is... Merging into reference primitives In the process, the merged candidate primitives are marked as "merged" and no longer participate in the merging calculation of other reference primitives, thus ensuring the uniqueness and determinism of the merging result. The above operation is repeated until all primitives in the updated planar primitive set are traversed, and finally a structured planar primitive set that retains the main skeleton of the building is obtained.

[0052] In some embodiments, the three-dimensional point sets corresponding to the candidate primitives that are determined to meet the conditions in this merging are all added to the three-dimensional point set corresponding to the reference primitive, which serves as the merging benchmark, to jointly constitute the updated three-dimensional point set of the reference primitive, providing a data foundation for subsequent updates of attributes and adjacency relationships.

[0053] Furthermore, differentiated update operations are performed on the attributes of the reference primitive, specifically covering all attributes including height, shape profile, base area, planar parameters, projection point set, and coverage area. During attribute updates, if the first merging process (i.e., coplanar consistency merging) is performed, the median elevation is recalculated based on the updated 3D point set and used as the updated height of the reference primitive. If the second merging process (i.e., structural generalization merging) is performed, the original height of the reference primitive is directly retained to maintain the building's main structural height position without shift. For the shape profile and base area, based on the horizontal coordinates (X,Y) of all points in the updated 3D point set, the Chi-Shape concave hull algorithm is executed to regenerate a single-connected, compact, non-convex polygon without internal holes. This polygon is used as the updated shape profile of the reference primitive, and its area is calculated simultaneously to obtain the updated base area of ​​the reference primitive. For planar parameters, the planar equations are refitted based on the updated 3D point set to obtain the updated planar parameters of the reference primitive.

[0054] Based on this, the updated 3D point set is projected onto the refitted plane, and a triangulation network is reconstructed using the Alpha-Shape algorithm (or the Delaunay triangulation algorithm with distance threshold). The total area of ​​all triangles in the triangulation network is calculated to determine the updated coverage area of ​​the reference primitive. Subsequently, an update operation is performed on the connectivity relationships in the 2D spatial adjacency graph. Specifically, all existing adjacency relationships between candidate primitives and other primitives are merged into the adjacency relationships of the reference primitive. At the same time, the connectivity relationships between other primitives and candidate primitives in the 2D spatial adjacency graph are adjusted, changing all connections that originally pointed to candidate primitives to points to the reference primitive. This ensures that the 2D spatial adjacency graph accurately reflects the proximity relationships between the merged primitives.

[0055] It should be noted that the planar fitting method used in this paper has strong noise resistance, so there is no need to perform independent noise removal or filtering preprocessing steps on the input 3D point cloud data of buildings in advance. This allows more original feature information in the point cloud data to be preserved, while simplifying the overall processing flow.

[0056] To address the potential data gaps caused by occlusion in point cloud data acquired by airborne platforms (e.g., data gaps created by the partial obstruction of low-rise building rooftops by tall tree canopies), this method adheres to the principle of "generalization based on existing data." Specifically, this method only performs structured generalization and simplification on the actual roof structures in the point cloud. For areas completely uncovered by data points due to occlusion, no geometric completion or speculative reconstruction operations are performed, thus ensuring that the final output 3D building model accurately reflects the structural features of the actual scene.

[0057] In one embodiment provided in this application, the building structure extraction method based on point cloud data proposed in this application is applied to the processing of real urban area building point cloud data to verify its ability to extract building structures based on point cloud data. See also Figure 2 This is a schematic diagram of the given three-dimensional point cloud data of a building provided in an embodiment of this application. For example... Figure 2 As shown, although the given 3D point cloud data of the building fully records the scene information, the building's roof surface is filled with numerous non-structural elements, such as ventilation ducts, gaps in the parapet wall, and various temporary facilities—a lot of fragmented and redundant geometric features. (See also...) Figure 3 This is a schematic diagram illustrating the effect of urban area building summary data processed by the point cloud data-based building structure extraction method provided in this application embodiment. This solution solves the technical problem of automatically and efficiently filtering and summarizing regular main structures from full-element building point clouds without relying on complex semantic segmentation or extensive manual intervention by calculating the geometric and topological attributes of planar primitives and based on attribute-driven two-stage adaptive merging rules.

[0058] and Figure 2 As can be seen from the comparison, the method provided in this application successfully filters out the minor ancillary facilities on the roof and integrates them into the main roof plane or removes them. The processed data clearly preserves the main framework and key outline of the building, which can directly support high-efficiency urban 3D model reconstruction.

[0059] Please see Figure 4 This application also provides a building structure extraction device based on point cloud data, which can implement the above-mentioned building structure extraction method based on point cloud data. The device includes: The fitting module 401 is used to perform planar fitting processing on the given 3D point cloud data of buildings to obtain an initial set of planar primitives. Calculation module 402 is used to perform attribute calculation processing on each primitive in the initial planar primitive set to obtain a primitive attribute set; Module 403 is used to construct a two-dimensional spatial adjacency graph representing the adjacency relationship between primitives based on an initial set of planar primitives; The merging module 404 is used to merge the adjacency primitives in the two-dimensional spatial adjacency graph according to the primitive attribute set, so as to obtain a structured planar primitive set for constructing the three-dimensional model of the building.

[0060] The specific implementation of the building structure extraction device based on point cloud data is basically the same as the specific implementation of the building structure extraction method based on point cloud data described above, and will not be repeated here.

[0061] In some embodiments, the primitive attribute set includes the height, shape profile, base area, planar parameters, projection point set, and coverage area of ​​each primitive; the merging module includes: The first merging unit is used to perform a first merging process on the adjacent primitive pairs in the two-dimensional spatial adjacency graph that satisfy the first condition based on the primitive attribute set, so as to obtain an updated plane primitive set; wherein, the first condition includes: the angle between the plane normal vectors of the two adjacent primitives is less than a first threshold, and the distance from the projection point set of the two adjacent primitives to the plane where the other is located is less than a second threshold. The second merging unit is used to perform a second merging process on adjacent primitive pairs in the updated planar primitive set that meet the second condition based on the primitive attribute set, so as to obtain a structured planar primitive set for constructing a three-dimensional building model; wherein, the second condition includes: the height difference between two adjacent primitives is less than a third threshold, and the ratio of the intersection area of ​​the shape contours of the two adjacent primitives on the horizontal plane to the smaller base area of ​​the two is greater than a fourth threshold.

[0062] The specific implementation of this merging module is basically the same as the specific embodiment of step S104 above, and will not be repeated here.

[0063] Thirdly, embodiments of this application provide an electronic device, see [link to relevant documentation]. Figure 5 The diagram shown is a structural schematic of an electronic device provided in this application.

[0064] like Figure 5 As shown, the device includes: Memory 31 is used to store computer programs; Processor 32 is used to execute computer programs; When the processor 32 executes the computer program, it implements the building structure extraction method based on point cloud data as described in any of the above embodiments.

[0065] For example, a computer program may be divided into one or more modules / units, one or more of which are stored in memory 31 and executed by processor 32 to complete this application. One or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in an electronic device.

[0066] The processor 32 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0067] The memory 31 can be used to store computer programs and / or modules. The processor 32 implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory 31 and calling the data stored in the memory 31. The memory 31 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory 31 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0068] It should be noted that the aforementioned electronic devices include, but are not limited to, processors and memory, as will be understood by those skilled in the art. Figure 5 The structural diagram is merely an example of the electronic device described above and does not constitute a limitation on the electronic device. It may include more components than shown in the diagram, or combine certain components, or use different components.

[0069] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed, implements the building structure extraction method based on point cloud data of any of the above embodiments.

[0070] It should be understood that the implementation of all or part of the above-described method for extracting building structures based on point cloud data can also be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above-described method for extracting building structures based on point cloud data. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content of the computer-readable medium can be appropriately added to or subtracted according to the requirements of legislation and patent practice in the relevant jurisdiction. For example, in some relevant jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0071] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0072] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications are also considered to be within the scope of protection of this application.

Claims

1. A method for extracting building structures based on point cloud data, characterized in that, include: The given 3D point cloud data of a building is subjected to planar fitting to obtain an initial set of planar primitives; Perform attribute calculations on each primitive in the initial set of planar primitives to obtain a primitive attribute set; Based on the initial set of planar primitives, a two-dimensional spatial adjacency graph is constructed to characterize the adjacency relationships between primitives; The adjacency primitives in the two-dimensional spatial adjacency graph are merged according to the primitive attribute set to obtain a structured planar primitive set for constructing a three-dimensional building model.

2. The method according to claim 1, characterized in that, The primitive attribute set includes the height, shape profile, base area, planar parameters, projection point set, and coverage area of ​​each primitive.

3. The method according to claim 2, characterized in that, The step of merging adjacent primitives in the two-dimensional spatial adjacency graph according to the primitive attribute set to obtain a structured planar primitive set for constructing a three-dimensional building model includes: Based on the primitive attribute set, a first merging process is performed on the adjacent primitive pairs in the two-dimensional spatial adjacency graph that satisfy the first condition to obtain an updated plane primitive set; wherein, the first condition includes: the angle between the plane normal vectors of two adjacent primitives is less than a first threshold, and the distance from the projection point set of two adjacent primitives to the plane where the other is located is less than a second threshold. Based on the primitive attribute set, a second merging process is performed on adjacent primitive pairs in the updated planar primitive set that satisfy the second condition to obtain a structured planar primitive set for constructing a three-dimensional building model; wherein, the second condition includes: the height difference between two adjacent primitives is less than a third threshold, and the ratio of the intersection area of ​​the shape contours of the two adjacent primitives on the horizontal plane to the smaller base area of ​​the two is greater than a fourth threshold.

4. The method according to claim 1, characterized in that, The process of performing planar fitting on the given 3D point cloud data of a building to obtain an initial set of planar primitives includes: For each point in the 3D point cloud data of the building, a local neighborhood is constructed, and flatness is calculated. Seed points are selected based on the calculated flatness, and region growing is performed based on the spatial geometric consistency criterion to obtain planar regions; The planar regions are filtered based on a threshold number of points to obtain planar regions that serve as initial planar primitives, thus forming the initial planar primitive set.

5. The method according to claim 1 or 2, characterized in that, The step of performing attribute calculations on each primitive in the initial set of planar primitives to obtain a primitive attribute set includes: The height of the primitive is obtained by performing height calculation on the three-dimensional point set corresponding to the primitive. Extract the horizontal coordinates of the three-dimensional point set, and perform two-dimensional concave hull construction and area calculation to obtain the shape outline and base area of ​​the primitive; The planar parameters of the primitive are obtained by performing plane equation fitting on the three-dimensional point set. The three-dimensional point set is projected onto the fitted plane, and the projection point set generation process is performed to obtain the projection point set of the primitive. Based on the set of projection points, a triangular mesh is constructed and the area is summed to obtain the coverage area of ​​the primitive.

6. The method according to claim 1, characterized in that, The construction of a two-dimensional spatial adjacency graph to characterize the adjacency relationships between primitives based on the initial set of planar primitives includes: Extract the horizontal coordinates of the three-dimensional point set corresponding to each primitive in the initial planar primitive set, and perform two-dimensional point set construction processing; Based on the two-dimensional point set, a k-nearest neighbor graph is constructed. The k-nearest neighbor graph is traversed, and adjacency relationships are established between corresponding primitives based on the primitive information to which the points belong, thus forming the two-dimensional spatial adjacency graph.

7. A building structure extraction device based on point cloud data, characterized in that, include: The fitting module is used to perform planar fitting on the given 3D point cloud data of a building to obtain an initial set of planar primitives. The calculation module is used to perform attribute calculation processing on each primitive in the initial planar primitive set to obtain a primitive attribute set; A construction module is used to construct a two-dimensional spatial adjacency graph representing the adjacency relationships between primitives based on the initial set of planar primitives; The merging module is used to merge the adjacency primitives in the two-dimensional spatial adjacency graph according to the primitive attribute set, so as to obtain a structured planar primitive set for constructing a three-dimensional building model.

8. The apparatus according to claim 7, characterized in that, The primitive attribute set includes the height, shape profile, base area, planar parameters, projection point set, and coverage area of ​​each primitive. The merging module includes: The first merging unit is used to perform a first merging process on the adjacent primitive pairs in the two-dimensional spatial adjacency graph that satisfy the first condition based on the primitive attribute set, so as to obtain an updated planar primitive set; wherein, the first condition includes: the angle between the plane normal vectors of two adjacent primitives is less than a first threshold, and the distance from the projection point set of two adjacent primitives to the plane where the other is located is less than a second threshold. The second merging unit is used to perform a second merging process on adjacent primitive pairs in the updated planar primitive set that meet the second condition based on the primitive attribute set, to obtain a structured planar primitive set for constructing a three-dimensional building model; wherein, the second condition includes: the height difference between two adjacent primitives is less than a third threshold, and the ratio of the intersection area of ​​the shape contours of the two adjacent primitives on the horizontal plane to the smaller base area of ​​the two is greater than a fourth threshold.

9. An electronic device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the building structure extraction method based on point cloud data as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the building structure extraction method based on point cloud data as described in any one of claims 1 to 6.