Building three-dimensional model construction method, system, intelligent terminal and storage medium

By extracting roof and facade primitives and combining building outline polygons for facade primitives, the difficulty in building a three-dimensional model caused by the lack of point cloud facades is solved, and efficient building three-dimensional model generation is achieved.

CN120374889BActive Publication Date: 2025-09-02SHENZHEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510878944.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-09-02
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

The prior art cannot effectively build a three-dimensional model when the point cloud facade of a building is missing, resulting in the inability to generate a closed Lod2 model, and the generated model has problems of roof height deformation and reduced geometric accuracy.

Method used

By obtaining the initial building point cloud and outline polygon, extracting the roof plane primitives and partial elevation primitives, deleting the point cloud corresponding to the partial elevation primitives, combining the building outline polygons to perform elevation primitive inference, generating a candidate primitive pool, and filtering the target candidate primitives according to preset constraints to generate a three-dimensional building model.

Benefits of technology

Even in the absence of partial point clouds on the facade, a three-dimensional building model can be constructed better, improving the success rate and geometric accuracy of the three-dimensional model construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120374889B_ABST
    Figure CN120374889B_ABST
Patent Text Reader

Abstract

The present application discloses a method, system, intelligent terminal, and storage medium for constructing a three-dimensional model of a building, relating to the technical field of three-dimensional model generation. The method comprises: obtaining an initial building point cloud and a building outline polygon corresponding to a target building; extracting primitives based on the initial building point cloud to obtain roof plane primitives and facade primitives; deleting point clouds corresponding to facade primitives from the initial building point cloud to obtain a processed building point cloud; inferring facade primitives based on the processed building point cloud and the building outline polygon to obtain vertical facade primitives corresponding to the inferred processed building point cloud; generating a candidate primitive pool based on the intersection relationship between the roof plane primitives and the vertical facade primitives; determining a target candidate primitive from the candidate primitive pool based on preset constraints, and generating a three-dimensional building model that matches the target building based on the target candidate primitive. This facilitates the construction of a three-dimensional building model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of three-dimensional model generation, and in particular to a method, system, intelligent terminal and storage medium for constructing a three-dimensional model of a building. Background Art

[0002] Currently, detailed 3D building models are increasingly being used, providing critical foundational information for a variety of applications, including urban management, planning, simulation, security, and emergency response. Existing point cloud-based building reconstruction methods typically directly utilize plane extraction algorithms to extract individual planar blocks, which are then assembled based on the topological relationships between the blocks to create a complete building model.

[0003] The problem with the existing technology is that when part of the building point cloud facade is missing, the corresponding plane cannot be extracted, which is not conducive to the construction of the three-dimensional model of the building.

[0004] Therefore, relevant technologies still need to be improved and developed. Summary of the Invention

[0005] The main purpose of this application is to provide a method, system, intelligent terminal and storage medium for constructing a three-dimensional model of a building, aiming to solve the technical problem in the related technology of directly using a plane extraction algorithm to obtain each plane block, and then assembling them according to the topological relationship between the plane blocks to generate a building model, which is not conducive to the construction of a three-dimensional model of the building when part of the building point cloud facade is missing.

[0006] In order to achieve the above-mentioned object, the first aspect of the present application provides a method for constructing a three-dimensional building model, wherein the method for constructing a three-dimensional building model comprises:

[0007] Obtain the initial building point cloud and building outline polygon corresponding to the target building;

[0008] Extracting primitives based on the initial building point cloud to obtain extracted roof plane primitives and extracted facade primitives;

[0009] Deleting the point cloud corresponding to the above-mentioned facade primitive from the above-mentioned initial building point cloud to obtain a processed building point cloud;

[0010] Inferring facade primitives based on the processed building point cloud and the building outline polygon to obtain the inferred vertical facade primitives corresponding to the processed building point cloud;

[0011] Generate a candidate primitive pool based on the intersection relationship between the roof plane primitive and the vertical facade primitive, wherein each candidate primitive in the candidate primitive pool is determined based on a sub-face obtained by cutting based on the intersection relationship;

[0012] According to preset constraints, a target candidate primitive is determined from the candidate primitive pool, and a three-dimensional building model matching the target building is generated based on the target candidate primitive, wherein the constraints include the degree of fit between the candidate primitive and the initial building point cloud, the fit constraint of the boundary line of the candidate primitive to the sharp features of the building, and the depth constraint of the candidate primitive to the building.

[0013] Optionally, the extraction of primitives based on the initial building point cloud to obtain extracted roof plane primitives and extracted facade primitives includes:

[0014] Calculate the local normal vector curvature of each initial point in the initial building point cloud;

[0015] Determine an initial seed point from the initial points according to a preset curvature threshold, mark the corresponding category for the initial seed point, and add the initial seed point to the current area;

[0016] Based on the seed point and the initial point, the current region is updated by a region growing algorithm until all points are processed, and then the region growing is stopped to obtain a target region after region growing, wherein the target region includes multiple point clusters of different classifications;

[0017] Determine the above-mentioned facade partial primitive according to the normal vector component of the plane corresponding to the above-mentioned point cluster;

[0018] The roof plane primitives are determined according to the remaining point clusters, wherein the remaining point clusters are other point clusters except the point clusters corresponding to the facade part primitives.

[0019] Optionally, determining the roof plane primitive according to the remaining point clusters includes:

[0020] Traverse all planes corresponding to the remaining point clusters, and determine the coplanar planes based on the normal vector angles between the planes and the overlap between the corresponding remaining point clusters;

[0021] Merge the remaining point clusters corresponding to the above coplanar planes, and update the fitting plane based on the merged remaining point clusters;

[0022] The fitting plane corresponding to the remaining point clusters after merging is used as the above-mentioned roof plane primitive.

[0023] Optionally, the above-mentioned performing facade primitive inference based on the above-mentioned processed building point cloud and the above-mentioned building outline polygon to obtain the inferred vertical facade primitive corresponding to the above-mentioned processed building point cloud includes:

[0024] Constructing a triangulated network based on the processed building point cloud, wherein each triangular face in the triangulated network is associated with an original three-dimensional vertex in the processed building point cloud;

[0025] Obtaining the bounding box size of the processed building point cloud on the horizontal plane, and calculating the grid resolution based on the bounding box size and a preset point cloud density parameter;

[0026] Obtaining the actual coordinates corresponding to each grid point, and determining whether each of the above grid points belongs to the interior of the above building outline polygon;

[0027] For an internal grid point within the building outline polygon, determine a triangular patch corresponding to the internal grid point in the triangulated network, construct a three-dimensional plane equation based on the vertices of the triangular patch, calculate a height value of the intersection point based on a target ray and the three-dimensional plane equation, use the height value as the pixel value corresponding to the internal grid point, and obtain a height map based on the pixel values ​​corresponding to all the internal grid points, wherein the target ray is a ray passing through the internal grid point and along the vertical direction;

[0028] Based on the height map, facade primitives are inferred to obtain the inferred vertical facade primitives corresponding to the processed building point cloud.

[0029] Optionally, performing facade primitive inference based on the height map to obtain the inferred vertical facade primitive corresponding to the processed building point cloud includes:

[0030] Perform linear mapping on the pixel values ​​in the height map according to a preset value range;

[0031] Constructing a morphological operation kernel, and performing a closing operation on the height map according to the morphological operation kernel;

[0032] Determine a high threshold and a low threshold according to the building height range, perform edge detection on the height map according to the high threshold and the low threshold, and generate a binary edge map;

[0033] According to the binary edge map, a polyline set corresponding to the facade contour polyline is extracted, line segments of the polyline set are clustered, and a representative line segment corresponding to each cluster in the clustering result is determined;

[0034] The main direction of the building is obtained, the direction of the representative line segment is adjusted according to the main direction of the building, and the adjusted representative line segment is projected in the vertical direction, and the obtained vertical plane is used as the vertical facade primitive.

[0035] Optionally, generating a candidate primitive pool according to the intersection relationship between the roof plane primitive and the vertical facade primitive includes:

[0036] Constructing an initial set based on the roof plane primitive and the vertical facade primitive, traversing each primitive in the initial set, determining all other primitives intersecting with the primitive, and constructing an initial intersection primitive set;

[0037] For each primitive in the initial set, a cutting surface is selected from the initial set of intersecting primitives corresponding to the primitive, and the primitive is cut. If a sub-primitive generated after the cutting has an intersection relationship with the remaining primitives in the initial set of intersecting primitives, the step of selecting a cutting surface from the initial set of intersecting primitives corresponding to the primitive and cutting the primitive is continued until a preset cutting termination condition is met, wherein for each cutting surface, mutual cutting is performed between the surfaces during cutting.

[0038] Merge all the sub-faces generated by cutting to obtain the above candidate primitive pool.

[0039] Optionally, the step of determining a target candidate primitive from the candidate primitive pool according to preset constraints, and generating a three-dimensional building model matching the target building according to the target candidate primitive, includes:

[0040] Constructing an energy equation according to the preset constraints, wherein the energy equation is used to represent the sum of the data values ​​constrained by each of the preset constraints;

[0041] With the goal of obtaining a minimum solution to the energy equation, a target candidate primitive is determined from the candidate primitive pool;

[0042] A three-dimensional building model matching the target building is generated based on the target candidate primitives.

[0043] A second aspect of the present application provides a system for constructing a three-dimensional building model, wherein the system comprises:

[0044] A data acquisition module is used to obtain the initial building point cloud and building outline polygon corresponding to the target building;

[0045] A primitive extraction module is used to extract primitives based on the initial building point cloud to obtain extracted roof plane primitives and extracted facade primitives;

[0046] a point cloud processing module, configured to delete the point cloud corresponding to the primitives of the facade portion from the initial building point cloud to obtain a processed building point cloud;

[0047] a primitive inference module, configured to infer elevation primitives based on the processed building point cloud and the building outline polygon, and obtain the inferred vertical elevation primitives corresponding to the processed building point cloud;

[0048] a candidate primitive pool generating module, configured to generate a candidate primitive pool based on the intersection relationship between the roof plane primitive and the vertical facade primitive, wherein each candidate primitive in the candidate primitive pool is determined based on a sub-face obtained by cutting based on the intersection relationship;

[0049] The three-dimensional model generation module is used to determine the target candidate primitive from the above-mentioned candidate primitive pool according to preset constraints, and generate a three-dimensional building model matching the above-mentioned target building based on the above-mentioned target candidate primitive, wherein the above-mentioned constraints include the fit degree constraint between the above-mentioned candidate primitive and the above-mentioned initial building point cloud, the fit constraint of the boundary line of the above-mentioned candidate primitive to the sharp features of the building, and the depth constraint of the above-mentioned candidate primitive to the building.

[0050] The third aspect of the present application provides an intelligent terminal, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, any one of the steps of the method for constructing a three-dimensional building model is implemented.

[0051] A fourth aspect of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, any one of the steps of the above-mentioned method for constructing a three-dimensional building model is implemented.

[0052] As can be seen from the above, in the present application scheme, the initial building point cloud and the building outline polygon corresponding to the target building are obtained; primitive extraction is performed based on the initial building point cloud to obtain the extracted roof plane primitive and the extracted facade part primitive; the point cloud corresponding to the facade part primitive is deleted from the initial building point cloud to obtain the processed building point cloud; the facade primitive is inferred based on the processed building point cloud and the building outline polygon to obtain the inferred vertical facade primitive corresponding to the processed building point cloud; the vertical facade primitive is inferred based on the roof plane primitive and the vertical facade primitive. The intersection relationship corresponding to the face primitives is used to generate a candidate primitive pool, wherein each candidate primitive in the candidate primitive pool is determined according to the sub-face patch obtained after cutting based on the above intersection relationship; according to the preset constraints, the target candidate primitive is determined from the candidate primitive pool, and a three-dimensional building model matching the target building is generated based on the target candidate primitive, wherein the constraints include the fit degree constraint between the candidate primitive and the initial building point cloud, the fit constraint of the boundary line of the candidate primitive to the sharp features of the building, and the depth constraint of the candidate primitive to the building.

[0053] Compared with the prior art, the method for constructing a three-dimensional building model provided by the present application does not directly extract the facade primitives from the initial building point cloud using a plane algorithm. Instead, the facade primitives are inferred by combining the building outline polygons after deleting the point clouds corresponding to the extracted facade primitives from the initial building point cloud. Furthermore, the extracted roof plane primitives and the inferred vertical facade primitives are screened according to preset constraints to better generate the three-dimensional building model. In this way, even in the case of a partial point cloud of the building facade missing, the construction of the three-dimensional building model can be well achieved. Therefore, the solution of the present application is conducive to the construction of a three-dimensional building model and improves the success rate of the construction of a three-dimensional building model. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0055] Figure 1 This is a flow chart of a method for constructing a three-dimensional building model provided in an embodiment of the present application;

[0056] Figure 2 This is a schematic diagram of a roof plane primitive provided in an embodiment of the present application;

[0057] Figure 3 This is a schematic diagram of an inference process of a vertical facade primitive provided in an embodiment of the present application;

[0058] Figure 4 This is a schematic diagram of constructing a candidate primitive pool provided in an embodiment of the present application;

[0059] Figure 5 This is a schematic diagram of voxel weight assignment provided in an embodiment of the present application;

[0060] Figure 6 This is a schematic diagram of a specific process of a method for constructing a three-dimensional building model provided in an embodiment of the present application;

[0061] Figure 7 This is a schematic diagram of the components of a building three-dimensional model construction system provided in an embodiment of the present application;

[0062] Figure 8 This is a block diagram of the internal structure principle of a smart terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it should be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0064] It will be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0065] It should also be understood that the terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0066] It should be further understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0067] As used in this specification and the appended claims, the term "if" can be interpreted as meaning "when" or "upon" or "in response to determining" or "in response to being classified into," depending on the context. Similarly, the phrase "if it is determined" or "if it is classified into [described condition or event]" can be interpreted as meaning "upon determination" or "in response to determining" or "upon classification into [described condition or event]" or "in response to being classified into [described condition or event]," depending on the context.

[0068] The following is a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0069] In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application may also be implemented in other ways different from those described herein. Those skilled in the art may make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.

[0070] In the construction of new smart cities, detailed three-dimensional building models are a core component, providing critical foundational information for various applications such as urban management, planning, simulation, security, and emergency response. Existing point cloud-based building reconstruction methods typically assume that a building is a polyhedron composed of planes. Plane extraction algorithms are used to extract individual plane blocks, which are then assembled based on the topological relationships between them to create a complete building model. This approach is well suited for modeling buildings with complex geometries and unknown types.

[0071] However, this method also has some drawbacks. For example, when a building's facade is partially missing from the point cloud, the corresponding plane cannot be extracted, hindering the construction of the building's 3D model and improving the success rate of building 3D model construction. Specifically, when a building's facade is partially missing from the point cloud, the corresponding plane cannot be extracted, resulting in the inability to generate a closed Lod2 (Level of Detail 2) building model, which uses the second level of detail. Furthermore, the generated Lod2 model will also have significant roof height deformation, resulting in loss of structural features and reduced geometric accuracy, significantly reducing the building model's value in subsequent applications.

[0072] In order to solve at least one of the above-mentioned technical problems, in the solution of the present application, an initial building point cloud and a building outline polygon corresponding to the target building are obtained; primitives are extracted based on the initial building point cloud to obtain extracted roof plane primitives and extracted facade part primitives; point clouds corresponding to the facade part primitives are deleted from the initial building point cloud to obtain a processed building point cloud; facade primitives are inferred based on the processed building point cloud and the building outline polygon to obtain the inferred vertical facade primitives corresponding to the processed building point cloud; and the vertical facade primitives are inferred based on the roof plane primitives. The intersection relationship between the primitive and the vertical facade primitives is used to generate a candidate primitive pool, wherein each candidate primitive in the candidate primitive pool is determined according to the sub-facet obtained after cutting based on the above intersection relationship; according to the preset constraints, the target candidate primitive is determined from the candidate primitive pool, and a three-dimensional building model matching the target building is generated based on the target candidate primitive, wherein the constraints include the fit degree constraint between the candidate primitive and the initial building point cloud, the fit constraint of the boundary line of the candidate primitive to the sharp features of the building, and the depth constraint of the candidate primitive to the building.

[0073] Compared with the prior art, the method for constructing a three-dimensional building model provided by the present application does not directly extract the facade primitives from the initial building point cloud using a plane algorithm. Instead, the facade primitives are inferred by combining the building outline polygons after deleting the point clouds corresponding to the extracted facade primitives from the initial building point cloud. Furthermore, the extracted roof plane primitives and the inferred vertical facade primitives are screened according to preset constraints to better generate the three-dimensional building model. In this way, even in the case of a partial point cloud of the building facade missing, the construction of the three-dimensional building model can be well achieved. Therefore, the solution of the present application is conducive to the construction of a three-dimensional building model and improves the success rate of the construction of a three-dimensional building model.

[0074] like Figure 1 As shown, the embodiment of the present application provides a method for constructing a three-dimensional model of a building. Specifically, the method includes the following steps:

[0075] Step S100, obtaining an initial building point cloud and a building outline polygon corresponding to a target building;

[0076] Step S200, extracting primitives based on the initial building point cloud to obtain extracted roof plane primitives and extracted facade primitives;

[0077] Step S300, deleting the point cloud corresponding to the facade primitive from the initial building point cloud to obtain a processed building point cloud;

[0078] Step S400, performing facade primitive inference based on the processed building point cloud and the building outline polygon, to obtain the inferred vertical facade primitive corresponding to the processed building point cloud;

[0079] Step S500: generating a candidate primitive pool based on the intersection relationship between the roof plane primitive and the vertical facade primitive, wherein each candidate primitive in the candidate primitive pool is determined based on a sub-face obtained by cutting based on the intersection relationship;

[0080] Step S600: According to preset constraints, a target candidate primitive is determined from the candidate primitive pool, and a three-dimensional building model matching the target building is generated based on the target candidate primitive, wherein the constraints include the fit constraint between the candidate primitive and the initial building point cloud, the fit constraint of the boundary line of the candidate primitive to the sharp features of the building, and the depth constraint of the candidate primitive to the building.

[0081] The target building is a building for which a three-dimensional building model needs to be constructed. The generated three-dimensional building model matches the target building and can represent the three-dimensional features of the target building.

[0082] Specifically, the input data required for this application includes a single building point cloud (i.e., the initial building point cloud corresponding to the target building) and building outline polygons. A Lod2 model of the building is generated through four steps: roof plane primitive extraction from the building point cloud, vertical facade primitive inference, candidate primitive pool construction, and voxel-constrained candidate primitive pool optimization. It should be noted that in the examples of this application, the Lod2 model of the 3D building is used as an example for specific description, but this is not intended to be a limitation.

[0083] In the embodiment of the present application, plane primitives are detected from the point cloud of a single building. Specifically, the primitive extraction is performed based on the initial building point cloud to obtain the extracted roof plane primitives and the extracted facade primitives, including:

[0084] Calculate the local normal vector curvature of each initial point in the initial building point cloud;

[0085] Determine an initial seed point from the initial points according to a preset curvature threshold, mark the corresponding category for the initial seed point, and add the initial seed point to the current area;

[0086] Based on the seed point and the initial point, the current region is updated by a region growing algorithm until all points are processed, and then the region growing is stopped to obtain a target region after region growing, wherein the target region includes multiple point clusters of different classifications;

[0087] Determine the above-mentioned facade partial primitive according to the normal vector component of the plane corresponding to the above-mentioned point cluster;

[0088] The roof plane primitives are determined according to the remaining point clusters, wherein the remaining point clusters are other point clusters except the point clusters corresponding to the facade part primitives.

[0089] Specifically, the local normal vector curvature of each initial point in the initial building point cloud is calculated by principal component analysis (PCA). Then, all points are sorted in ascending order of curvature, and the points with curvature values ​​less than the preset curvature threshold are selected. ( ) are used as initial seed points for region growth. The above curvature threshold can be set and adjusted according to actual needs and is not specifically limited here.

[0090] Add the initial seed point to the current area, mark it as classified, find the neighboring points of the seed point (through k nearest neighbors), and traverse these points from small to large distances, screening candidate points that meet the following conditions: normal vector angle constraint, the angle between the candidate point normal vector and the average normal vector of the current area ; Plane distance constraint, distance from candidate point to current fitting plane . Add the candidate points that meet the conditions to the queue as the seed points for the next round of expansion, and add them to the current area, that is, update the seed point set corresponding to the current area. Among them, the above-mentioned current area is an empty set in the initial state, which is used to store points that meet the conditions when the seed point grows outward; the seed point is the first data, and the point data is gradually increased during the growth process. K-nearest neighbor refers to the K-nearest neighbor (KNN, K-Nearest Neighbor) algorithm. Query the nearest k points around the seed point by distance, and traverse them in order by distance. The specific value of k can be adjusted according to actual needs. It should be further explained that and It is a preset threshold value, and its value can also be set and adjusted according to actual needs, and is not specifically limited here.

[0091] With each new point added, the plane equation is refitted using the least squares method to update the fitted plane, ensuring that the constraints are dynamically adjusted as the region expands. At the same time, the average normal vector of the region is calculated by combining the existing points in the set with the newly added points to prevent the initial seed from affecting the expansion direction.

[0092] The above steps are iterated until no new points can be added. The marked points are then treated as a category and the next round of region growing is performed. When all points have been processed, the region growing stops. Specifically, the region grows from the initially selected seed point to the surrounding area. When the surrounding points do not meet the above two constraints, the growth ends and the points in the region are treated as a category and the next round of region growing is performed. This process is repeated multiple times until all points have a category.

[0093] After the region growing algorithm, each point cluster corresponds to a plane. For planes whose normal vector z component is less than 0.1 (the specific value can be set and adjusted according to actual needs), they are considered to be vertical structural facades and are deleted.

[0094] Specifically, determining the roof plane primitive according to the remaining point clusters includes:

[0095] Traverse all planes corresponding to the remaining point clusters, and determine the coplanar planes based on the normal vector angles between the planes and the overlap between the corresponding remaining point clusters;

[0096] Merge the remaining point clusters corresponding to the above coplanar planes, and update the fitting plane based on the merged remaining point clusters;

[0097] The fitting plane corresponding to the remaining point clusters after merging is used as the above-mentioned roof plane primitive.

[0098] In order to improve the geometric rationality and consistency of the segmentation results, all planes are traversed and the point clusters of coplanar planes are merged. If the angle between the normal vectors of two planes is (The specific value can be set and adjusted according to actual needs) and the overlap between the point clusters meets a certain threshold (the specific value can be set and adjusted according to actual needs), the two point clusters are merged and the fitting plane is updated using the least squares algorithm. Figure 2 This is a schematic diagram of a roof plane primitive provided by an embodiment of the present application. The plane corresponding to each point cluster after merging is used as a roof plane primitive to obtain Figure 2 The roof plane primitive shown is prepared for the subsequent construction of the candidate primitive pool.

[0099] Furthermore, the above-mentioned performing facade primitive inference based on the above-mentioned processed building point cloud and the above-mentioned building outline polygon to obtain the inferred vertical facade primitive corresponding to the above-mentioned processed building point cloud includes:

[0100] Constructing a triangulated network based on the processed building point cloud, wherein each triangular face in the triangulated network is associated with an original three-dimensional vertex in the processed building point cloud;

[0101] Obtaining the bounding box size of the processed building point cloud on the horizontal plane, and calculating the grid resolution based on the bounding box size and a preset point cloud density parameter;

[0102] Obtaining the actual coordinates corresponding to each grid point, and determining whether each of the above grid points belongs to the interior of the above building outline polygon;

[0103] For an internal grid point within the building outline polygon, determine a triangular patch corresponding to the internal grid point in the triangulated network, construct a three-dimensional plane equation based on the vertices of the triangular patch, calculate a height value of the intersection point based on a target ray and the three-dimensional plane equation, use the height value as the pixel value corresponding to the internal grid point, and obtain a height map based on the pixel values ​​corresponding to all the internal grid points, wherein the target ray is a ray passing through the internal grid point and along the vertical direction;

[0104] Based on the height map, facade primitives are inferred to obtain the inferred vertical facade primitives corresponding to the processed building point cloud.

[0105] The above-mentioned process of inferring facade primitives based on the height map to obtain the inferred vertical facade primitives corresponding to the processed building point cloud includes:

[0106] Perform linear mapping on the pixel values ​​in the height map according to a preset value range;

[0107] Constructing a morphological operation kernel, and performing a closing operation on the height map according to the morphological operation kernel;

[0108] Determine a high threshold and a low threshold according to the building height range, perform edge detection on the height map according to the high threshold and the low threshold, and generate a binary edge map;

[0109] According to the binary edge map, a polyline set corresponding to the facade contour polyline is extracted, line segments of the polyline set are clustered, and a representative line segment corresponding to each cluster in the clustering result is determined;

[0110] The main direction of the building is obtained, the direction of the representative line segment is adjusted according to the main direction of the building, and the adjusted representative line segment is projected in the vertical direction, and the obtained vertical plane is used as the vertical facade primitive.

[0111] Specifically, in this application, a Delaunay triangulation technique is used to construct an irregular triangulated network (TIN) from the processed building point cloud obtained by extracting plane primitives and removing the point cloud corresponding to the facade primitives. The TIN model is then rasterized at a specified resolution to generate a height map. A graphic morphology algorithm is then used to mitigate the hole problem caused by the uneven distribution of the point cloud. The Canny operator is then used to extract a set of discrete pixel outlines from the height map as an initial estimate of the vertical facade. Finally, a set of optimal polylines is extracted from the outlines using the optimal transfer method, and the resulting planes projected along the z-axis are used as facade primitives. The z-axis (or vertical direction) in this application refers to the z-axis corresponding to the initial building point cloud data, as do the other coordinate axis directions. The horizontal direction refers to the x-axis corresponding to the initial building point cloud data.

[0112] Specifically, the processed building point cloud is subjected to a two-dimensional Delaunay triangulation to construct an irregular triangulated network, in which each triangle face is associated with the original three-dimensional vertex to prepare for the subsequent height estimation.

[0113] Calculate the size of the building point cloud's bounding box in the XOY plane, and calculate the grid resolution based on the preset point cloud density parameters (the specific value can be set and adjusted according to actual needs) as the subsequent height map resolution.

[0114] For each grid point, its actual coordinates—the corresponding (x, y) coordinates in the point cloud coordinate system—are calculated. A ray method is then used to determine whether the point is within the building outline polygon. If so, the triangle patch containing the current pixel is located in the Delaunay triangulation. The vertices of the triangle patch are used to construct a 3D plane equation. A ray is then emitted along the vertical direction (the z-axis) to calculate the height of the intersection with the plane. This height is recorded as the value for the grid point. By traversing all grid points, a corresponding height map is obtained.

[0115] Traverse all valid pixels, record the minimum and maximum height values, and linearly map the height values ​​to 0-255 to enhance the visual distinguishability of the image.

[0116] The morphological kernel size is dynamically calculated based on the image size, with a minimum of 3. A closing operation is performed to fill holes caused by the sparse point cloud and smooth edges. Specifically, a morphological kernel is created and the height map is closed by performing a dilation followed by an erosion operation. Two thresholds are calculated based on the building height range: a high threshold and a low threshold. Points above the high threshold are considered strong edges, while those above the low threshold are potential edge candidates and require further verification to determine if they are connected to a strong edge. Points below the low threshold are considered non-edges. The Canny operator is then applied for edge detection to generate a binary edge map. The two thresholds are parameters of the Canny operator, which are adaptively calculated based on the point cloud height.

[0117] Furthermore, contour lines are extracted from the binary edge map by an optimal transmission method. First, a two-dimensional Delaunay triangulation is performed on the discrete contour points in the binary edge map to generate an initial triangulated network. Among them, the optimal transmission method is a mathematical framework for efficiently converting one probability distribution (or geometric structure) into another distribution while minimizing a certain transmission cost (such as distance, energy, etc.). In the embodiment of the present application, the role of the optimal transmission method can be understood as: converting a discrete set of edge pixel points into a continuous contour line while maintaining the optimality of the geometric shape. It should be noted that in the embodiment of the present application, the calculation is performed in a manner that minimizes the distance.

[0118] An optimal transmission method is used to extract a polyline diagram of the facade outline. First, the grid points in the binary image are converted to vector points and subjected to a two-dimensional Delaunay triangulation to construct an initial polyline diagram. Next, the number of edges is reduced through edge folding, which is governed by two constraints: a) the maximum Hausdorff distance from the original point to the simplified edge set must be within a certain threshold; b) the maximum incremental transmission cost allowed for each fold must be within a certain threshold. The final polyline set is obtained by iteratively folding edges.

[0119] We cluster the polyline set into segments using the density-based spatial clustering of applications with noise (DBSCAN). We then calculate the weighted average direction of the segments within each cluster. We then generate a bounding box for the points within the cluster, and use the segment that passes through the center of the bounding box along the average direction as the representative segment.

[0120] Analyze the building's ground contours for deformation and extract the building's main orientation. Adjust the representative line segment generated by each cluster to align with the building's main orientation, while keeping the segment's midpoint unchanged.

[0121] The obtained line segment is projected toward the z-axis direction of the original point cloud, and the obtained vertical plane is the inferred vertical facade primitive.

[0122] Figure 3 This is a schematic diagram of the inference process of a vertical facade primitive provided in an embodiment of the present application. Figure 3 As shown, based on the above steps, the inference of vertical facade primitives is achieved.

[0123] Specifically, the candidate primitive pool is generated according to the intersection relationship between the roof plane primitive and the vertical facade primitive, including:

[0124] Constructing an initial set based on the roof plane primitive and the vertical facade primitive, traversing each primitive in the initial set, determining all other primitives intersecting with the primitive, and constructing an initial intersection primitive set;

[0125] For each primitive in the initial set, a cutting surface is selected from the initial set of intersecting primitives corresponding to the primitive, and the primitive is cut. If a sub-primitive generated after the cutting has an intersection relationship with the remaining primitives in the initial set of intersecting primitives, the step of selecting a cutting surface from the initial set of intersecting primitives corresponding to the primitive and cutting the primitive is continued until a preset cutting termination condition is met, wherein for each cutting surface, mutual cutting is performed between the surfaces during cutting.

[0126] Merge all the sub-faces generated by cutting to obtain the above candidate primitive pool.

[0127] Figure 4 This is a schematic diagram of a candidate primitive pool construction provided in the embodiment of the present application. For details, refer to Figure 4 In the embodiment of the present application, a candidate primitive pool is constructed by intersecting plane primitives and building facade primitives in pairs.

[0128] Specifically, the roof plane primitives and the facade primitives are placed in a set (i.e., the initial set), each primitive is traversed, and all other primitives intersecting with it are dynamically detected to form an initial intersecting primitive set (i.e., the initial intersecting primitive set).

[0129] Traverse each primitive, selecting a cutting plane from the corresponding initial set of intersecting primitives in order of area, and then cut it. The intersection relationship between the sub-primitives generated after each cut and the remaining primitives in the intersecting primitive set is re-evaluated. If there is intersection, the cut is continued, and the iteration is continued until the initial set of intersecting primitives is empty. It should be noted that the order of area is used to ensure that each one can be traversed. In actual applications, other orders can also be used, such as numbering each primitive and then traversing in order of number. After selecting the cutting plane, the primitive is split into two smaller sub-primitives along the intersection line with the cutting plane.

[0130] For each cutting surface, mutual cutting between surfaces is performed to ensure that the cutting surface and the cut surface are geometrically consistent.

[0131] All sub-faces generated by cutting are merged to form a candidate primitive pool, and each primitive is assigned a unique identifier and random color code to facilitate subsequent calling and display of each primitive.

[0132] Specifically, the above-mentioned determining a target candidate primitive from the candidate primitive pool according to preset constraints, and generating a three-dimensional building model matching the target building according to the target candidate primitive, includes:

[0133] Constructing an energy equation according to the preset constraints, wherein the energy equation is used to represent the sum of the data values ​​constrained by each of the preset constraints;

[0134] With the goal of obtaining a minimum solution to the energy equation, a target candidate primitive is determined from the candidate primitive pool;

[0135] A three-dimensional building model matching the target building is generated based on the target candidate primitives.

[0136] In order to select the optimal primitive cluster with high fidelity to the original building structure from the candidate primitive pool, this application constructs an energy equation to comprehensively consider the degree of fit between the candidate primitives and the original point cloud (i.e., the initial building point cloud). , the fit of the candidate primitive boundary line to the sharp features of the original building , the candidate primitives have depth constraints on the original building Three factors. Specifically, an energy equation is shown in the following formula (1):

[0137] ;

[0138] in, Represents the value of the energy equation. In the embodiment of the present application, optimization is performed with the goal of obtaining a solution to the minimum value of the energy equation to determine the target candidate primitive.

[0139] For the degree of fit between the candidate primitives and the point cloud, this application defines the fit energy term based on the weighted sum of the point cloud confidences contained in a certain buffer range of each candidate primitive. Traverse the points within a certain range of the candidate primitives, construct the covariance matrix according to different neighborhood ranges, and define the confidence of the point as :

[0140] ;

[0141] ;

[0142] ;

[0143] in, is the Euclidean distance from point p to the candidate primitive, is the dynamic distance threshold, is the eigenvalue of the covariance matrix of the neighborhood of point p at the i-th scale. Represents the total number of point clouds, Represents the total number of candidate primitives; Represents the indicator function, which is used to indicate whether the corresponding candidate primitive (i.e., the corresponding i-th candidate primitive) is selected. If the candidate primitive is selected = 1, otherwise = 0; represents a candidate primitive, Represents the i-th candidate primitive.

[0144] Regarding the fit of the candidate primitive boundary line to the sharp features of the original building, this application quantifies the model complexity by the sharp edge ratio If two candidate primitives intersect and there is a certain angle between them, it is a sharp edge. The more complex the model is, the more sharp edges there are. higher:

[0145] ;

[0146] in, is the total number of boundaries in the candidate primitive set, is the indicator function, Representing boundaries The two connected candidate primitives form a sharp feature, 0 means the two candidate primitives are coplanar.

[0147] For candidate primitives, the original building depth constraint , this application constructs a voxelized model based on the original point cloud data and constrains each candidate primitive in terms of depth. First, based on the generated height map, expand in the Z-axis direction to obtain a voxelized bounding box (Box). Then, based on the building ground contour polygon, the valid voxel column is determined, as shown in the following formula (7), that is, the voxel column within the polygon range. The voxel weight of the invalid voxel column is assigned to 0. For the valid voxel column, the peak voxel of each column is calculated according to the height map value, as shown in the following formula (8), Figure 5 This is a schematic diagram of voxel weight assignment provided by an embodiment of the present application, such as Figure 5 As shown, the peak voxel weight of each column is assigned to 1, with the peak voxel As the boundary, the weights of the upward and downward voxels decrease linearly to 0, as shown in the following formula (9). Traverse each voxel column to obtain a weighted voxel model. For each candidate primitive, detect the voxel column covered by its projection to the XOY plane, and then extract the first weighted non-empty voxel below the candidate primitive in each voxel column. The sum of these voxel weights is normalized as the energy term of the candidate primitive:

[0148] ;

[0149] ;

[0150] ;

[0151] ;

[0152] ;

[0153] ;

[0154] ;

[0155] in, represents the number of voxels in the x-axis direction, Represents the number of voxels in the y-axis direction, Represents the number of voxels in the z-axis direction; Represents the maximum coordinate value of the x-axis direction of the bounding box where the point cloud is located. Represents the minimum coordinate value of the x-axis direction of the bounding box where the point cloud is located. Represents the maximum coordinate value of the y-axis direction of the bounding box where the point cloud is located. Represents the minimum coordinate value of the y-axis direction of the bounding box where the point cloud is located. Represents the maximum coordinate value of the z-axis direction of the bounding box where the point cloud is located. Represents the minimum coordinate value of the z-axis direction of the bounding box where the point cloud is located. Represents the resolution of the voxel in the xoy plane. Used to indicate whether the voxel column is a valid voxel column, Represents the building heat map range. Represents the z height value corresponding to the height map pixel, Represents the voxel resolution in the z-axis direction. represents the weight value of the voxel, voxels representing the surface layer below the candidate primitive, Represents the voxel in a certain voxel column below the candidate primitive that is closest to the candidate primitive. Represents a set of voxels in a certain voxel column below the candidate primitive, represents a candidate primitive, represents the weight of the candidate primitive, Represents the number of voxel columns covered by the candidate primitive, Represents the weight value of the surface voxel below the candidate primitive, represents the total number of candidate primitives, Represents the indicator function (if the candidate primitive is selected = 1, otherwise = 0).

[0156] Furthermore, the minimum energy solution of formula (1) is calculated by binary integer programming to obtain the corresponding target candidate primitives, and a high-fidelity building lod2 model with high structural feature preservation is further constructed.

[0157] In the method for constructing a three-dimensional building model provided by the present application, the acquisition of facade primitives is not done by directly extracting the initial building point cloud using a plane algorithm. Instead, the point cloud corresponding to the extracted facade primitives is deleted from the initial building point cloud, and then the facade primitives are inferred in combination with the building outline polygons. Furthermore, the extracted roof plane primitives and the inferred vertical facade primitives are screened according to preset constraints to better generate the three-dimensional model of the building. In this way, even in the case of a partial point cloud of the building facade, the construction of the three-dimensional model of the building can be well achieved. Therefore, the solution of the present application is conducive to the construction of a three-dimensional building model and improves the success rate of the construction of a three-dimensional building model.

[0158] Figure 6 This is a schematic diagram of a specific process of constructing a three-dimensional building model provided by an embodiment of the present application. Figure 6As shown, this application first extracts plane primitives from the building point cloud using a region growing algorithm, and discards the primitives and corresponding point clouds extracted from the facade. Discarding removes the vertical plane primitives and point clouds extracted by region growing, replacing them with facade primitives extracted using subsequent facade primitive inference. The z-axis component of the plane primitive's normal vector is extracted, and those below a certain threshold are discarded.

[0159] Based on this, the rooftop point cloud is triangulated to generate a height map. From this height map, a set of polylines is extracted as facade primitives. The resulting plane and facade primitives are then intersected pairwise to form a pool of candidate plane primitives. A voxelized model is constructed from the original building point cloud, and the selection of candidate primitives is constrained by depth. Finally, an energy equation is constructed, taking into account the geometric accuracy of the original building point cloud, the building's regularity, and the voxel depth constraint. An optimal subset of the candidate plane primitives is selected from the pool to generate a high-fidelity lod2 building model.

[0160] To address the problems of existing lod2 model reconstruction methods, which suffer from loss of reconstructed building structural features and reduced geometric accuracy when facing limited point cloud data quality and high building complexity, this method constructs a height map from the point cloud and infers the building facades from this map. Furthermore, in the energy equation generated by the model, a voxelized model of the original building point cloud is constructed to constrain the building at the depth level. This ensures that the optimized subset of candidate primitives is highly consistent with the original building point cloud at the height level, better preserving some prominent structural features of the building. Specifically, when inferring facade primitives from missing point clouds, a height map is constructed from the point cloud and the Canny operator is used to infer the facade primitives for the missing building sections. A voxel-based depth constraint is constructed to enforce depth constraints on the candidate primitive pool during optimization, ensuring that the selected candidate primitives maintain high depth consistency with the original building and that some detailed structural features of the building are preserved.

[0161] like Figure 7 As shown in , corresponding to the above-mentioned building three-dimensional model construction method, the embodiment of the present application further provides a building three-dimensional model construction system, and the above-mentioned building three-dimensional model construction system includes:

[0162] The data acquisition module 710 is used to obtain the initial building point cloud and building outline polygon corresponding to the target building;

[0163] The primitive extraction module 720 is used to extract primitives based on the initial building point cloud to obtain extracted roof plane primitives and extracted facade primitives;

[0164] A point cloud processing module 730 is configured to delete the point cloud corresponding to the facade primitive from the initial building point cloud to obtain a processed building point cloud;

[0165] The primitive inference module 740 is configured to perform facade primitive inference based on the processed building point cloud and the building outline polygon, and obtain the inferred vertical facade primitive corresponding to the processed building point cloud;

[0166] A candidate primitive pool generating module 750 is configured to generate a candidate primitive pool based on the intersection relationship between the roof plane primitive and the vertical facade primitive, wherein each candidate primitive in the candidate primitive pool is determined based on a sub-face obtained by cutting based on the intersection relationship;

[0167] The three-dimensional model generation module 760 is used to determine the target candidate primitive from the above-mentioned candidate primitive pool according to preset constraints, and generate a three-dimensional building model matching the above-mentioned target building based on the above-mentioned target candidate primitive, wherein the above-mentioned constraints include the fit degree constraint between the above-mentioned candidate primitive and the above-mentioned initial building point cloud, the fit constraint of the boundary line of the above-mentioned candidate primitive to the sharp features of the building, and the depth constraint of the above-mentioned candidate primitive to the building.

[0168] In this way, the acquisition of facade primitives is not done by directly extracting the initial building point cloud using a plane algorithm. Instead, the point cloud corresponding to the extracted facade primitives is deleted from the initial building point cloud, and then the facade primitives are inferred in combination with the building outline polygons. Furthermore, the extracted roof plane primitives and the inferred vertical facade primitives are screened according to preset constraints to better generate a three-dimensional model of the building. In this way, even in the case of a partial point cloud of the building facade, the construction of the three-dimensional model of the building can be well achieved. Therefore, the present application solution is conducive to the construction of a three-dimensional building model and improves the success rate of the construction of a three-dimensional building model.

[0169] It should be noted that the specific structure and implementation of the above-mentioned building three-dimensional model construction system and its various modules or units can refer to the corresponding description in the above-mentioned method embodiment, and will not be repeated here.

[0170] It should be noted that the division method of the various modules of the above-mentioned building three-dimensional model construction system is not unique and is not used as a specific limitation here.

[0171] Based on the above embodiment, the present application also provides a smart terminal, whose principle block diagram can be as follows: Figure 8As shown. The above-mentioned intelligent terminal includes a processor, a memory, a network interface and a display screen connected via a system bus. The processor of the intelligent terminal is used to provide computing and control capabilities. The memory of the intelligent terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the intelligent terminal is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the steps of any one of the above-mentioned methods for constructing a three-dimensional building model are implemented. The display screen of the intelligent terminal can be a liquid crystal display or an electronic ink display.

[0172] Those skilled in the art will understand that Figure 8 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the smart terminal to which the solution of the present application is applied. The specific smart terminal may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0173] In one embodiment, a smart terminal is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of any one of the methods for constructing a three-dimensional building model provided in the embodiments of the present application are implemented.

[0174] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the methods for constructing a three-dimensional building model provided in the embodiments of the present application are implemented.

[0175] It should be understood that the serial numbers of the steps in the above embodiments do not imply the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0176] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0177] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0178] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0179] In the embodiments provided herein, it should be understood that the disclosed systems / terminal devices and methods can be implemented in other ways. For example, the system / terminal device embodiments described above are merely illustrative. For example, the division of the modules or units described above is merely a logical functional division. In actual implementation, other division methods may be used, such as combining or integrating multiple units or components into another system, or omitting or not implementing certain features.

[0180] If the above-mentioned integrated modules / units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the present application can also implement all or part of the process steps in the above-mentioned method embodiments by using a computer program to instruct the relevant hardware. The above-mentioned computer program can be stored in a computer-readable storage medium. When executed by a processor, the computer program can implement the steps of each of the above-mentioned method embodiments. The above-mentioned computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The above-mentioned computer-readable medium can include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, and software distribution medium. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.

[0181] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for constructing a three-dimensional model of a building, characterized in that: The method comprises: Obtain the initial building point cloud and building outline polygon corresponding to the target building; Extracting primitives based on the initial building point cloud to obtain extracted roof plane primitives and extracted facade primitives; Deleting the point cloud corresponding to the facade primitive from the initial building point cloud to obtain a processed building point cloud; Performing facade primitive inference based on the processed building point cloud and the building outline polygon to obtain the inferred vertical facade primitive corresponding to the processed building point cloud; generating a candidate primitive pool according to the intersection relationship between the roof plane primitive and the vertical facade primitive, wherein each candidate primitive in the candidate primitive pool is determined according to a sub-facet obtained by cutting based on the intersection relationship; According to preset constraints, a target candidate primitive is determined from the candidate primitive pool, and a three-dimensional building model matching the target building is generated based on the target candidate primitive, wherein the constraints include a fit constraint between the candidate primitive and the initial building point cloud, a fit constraint on the boundary line of the candidate primitive to the sharp features of the building, and a depth constraint on the candidate primitive to the building.

2. The method for constructing a three-dimensional building model according to claim 1, wherein: The step of extracting primitives based on the initial building point cloud to obtain extracted roof plane primitives and extracted facade primitives includes: Calculating the local normal vector curvature of each initial point in the initial building point cloud; Determining an initial seed point from the initial points according to a preset curvature threshold, marking a corresponding category for the initial seed point, and adding the initial seed point to the current region; According to the seed point and the initial point, the current region is updated by a region growing algorithm until all points are processed, the region growing is stopped, and a target region after region growing is obtained, wherein the target region includes a plurality of point clusters of different classifications; Determining the facade portion primitive according to the normal vector component of the plane corresponding to the point cluster; The roof plane primitive is determined according to the remaining point clusters, wherein the remaining point clusters are other point clusters except the point cluster corresponding to the facade part primitive.

3. The method for constructing a three-dimensional building model according to claim 2, wherein: The determining of the roof plane primitive according to the remaining point clusters includes: Traversing all planes corresponding to the remaining point clusters, and determining coplanar planes according to the normal vector angles between the planes and the overlap between the corresponding remaining point clusters; Merging the remaining point clusters corresponding to the coplanar planes, and updating the fitting plane according to the merged remaining point clusters; The fitting plane corresponding to the remaining point clusters after merging is used as the roof plane primitive.

4. The method for constructing a three-dimensional building model according to claim 1, wherein: The step of inferring facade primitives based on the processed building point cloud and the building outline polygon to obtain the inferred vertical facade primitives corresponding to the processed building point cloud comprises: Constructing a triangulated network based on the processed building point cloud, wherein each triangular facet in the triangulated network is associated with an original three-dimensional vertex in the processed building point cloud; Obtaining the size of a bounding box of the processed building point cloud on a horizontal plane, and calculating a grid resolution based on the bounding box size and a preset point cloud density parameter; Obtaining the actual coordinates corresponding to each grid point, and determining whether each grid point belongs to the interior of the building outline polygon; For an internal grid point within the building outline polygon, determine a triangular patch corresponding to the internal grid point in the triangulated network, construct a three-dimensional plane equation based on the vertices of the triangular patch, calculate a height value of an intersection point based on a target ray and the three-dimensional plane equation, use the height value as a pixel value corresponding to the internal grid point, and obtain a height map based on the pixel values ​​corresponding to all the internal grid points, wherein the target ray is a ray passing through the internal grid point and along a vertical direction; According to the height map, facade primitives are inferred to obtain inferred vertical facade primitives corresponding to the processed building point cloud.

5. The method for constructing a three-dimensional building model according to claim 4, wherein: The step of inferring facade primitives based on the height map to obtain inferred vertical facade primitives corresponding to the processed building point cloud includes: Performing linear mapping on the pixel values ​​in the height map according to a preset value range; Constructing a morphological operation kernel, and performing a closing operation on the height map according to the morphological operation kernel; Determine a high threshold and a low threshold according to the building height range, and perform edge detection on the height map according to the high threshold and the low threshold to generate a binary edge map; Extracting a polyline set corresponding to the facade contour polyline according to the binary edge map, performing line segment clustering on the polyline set, and determining a representative line segment corresponding to each cluster in the clustering result; The main direction of the building is obtained, the direction of the representative line segment is adjusted according to the main direction of the building, and the adjusted representative line segment is projected in the vertical direction, and the obtained vertical plane is used as the vertical facade primitive.

6. The method for constructing a three-dimensional building model according to claim 1, wherein: The generating a candidate primitive pool according to the intersection relationship between the roof plane primitive and the vertical facade primitive includes: Constructing an initial set based on the roof plane primitive and the vertical facade primitive, traversing each primitive in the initial set, determining all other primitives intersecting with the primitive, and constructing an initial intersecting primitive set; For each primitive in the initial set, a cutting surface is selected from the initial set of intersecting primitives corresponding to the primitive, and the primitive is cut. If a sub-primitive generated after the cutting has an intersection relationship with the remaining primitives in the initial set of intersecting primitives, the step of selecting a cutting surface from the initial set of intersecting primitives corresponding to the primitive and cutting the primitive is continued until a preset cutting termination condition is met, wherein for each cutting surface, mutual cutting is performed between the surfaces during cutting; All sub-faces generated by cutting are merged to obtain the candidate primitive pool.

7. The method for constructing a three-dimensional building model according to any one of claims 1 to 6, characterized in that: The step of determining a target candidate primitive from the candidate primitive pool according to preset constraints, and generating a three-dimensional building model matching the target building according to the target candidate primitive, comprises: Constructing an energy equation according to the preset constraint conditions, wherein the energy equation is used to represent the sum of the data values ​​constrained by each of the preset constraint conditions; With the goal of obtaining a minimum solution to the energy equation, determining a target candidate primitive from the candidate primitive pool; A three-dimensional building model matching the target building is generated according to the target candidate primitives.

8. A building three-dimensional model construction system, characterized in that: The system comprises: A data acquisition module is used to obtain the initial building point cloud and building outline polygon corresponding to the target building; A primitive extraction module, configured to extract primitives based on the initial building point cloud to obtain extracted roof plane primitives and extracted facade primitives; a point cloud processing module, configured to delete the point cloud corresponding to the facade primitive from the initial building point cloud to obtain a processed building point cloud; a primitive inference module, configured to infer a facade primitive based on the processed building point cloud and the building outline polygon, and obtain an inferred vertical facade primitive corresponding to the processed building point cloud; a candidate primitive pool generating module, configured to generate a candidate primitive pool based on the intersection relationship between the roof plane primitive and the vertical facade primitive, wherein each candidate primitive in the candidate primitive pool is determined based on a sub-facet obtained by cutting based on the intersection relationship; A three-dimensional model generation module is used to determine a target candidate primitive from the candidate primitive pool according to preset constraints, and generate a three-dimensional building model that matches the target building based on the target candidate primitive, wherein the constraints include the degree of fit between the candidate primitive and the initial building point cloud, the fit constraint of the boundary line of the candidate primitive to the sharp features of the building, and the depth constraint of the candidate primitive to the building.

9. An intelligent terminal, characterized in that: The smart terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the method for constructing a three-dimensional building model are implemented as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for constructing a three-dimensional building model according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Building point cloud segmentation and vector contour line extraction method and device

    CN116485821A

  • Enhanced three-dimensional point cloud rendering

    US20180247447A1