Building facade model reconstruction method, device, equipment and storage medium

By constructing rectangular grids and classifying grid cells using an integer programming model, the problem of reconstructing building facade models under low-quality point cloud data was solved, achieving geometrically accurate, topologically correct, and semantically complete building facade model reconstruction.

CN122156527APending 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 struggle to reconstruct geometrically accurate, topologically correct, and semantically informative building facade models from low-quality point cloud data. In particular, under conditions of low-density, unevenly distributed, and noisy point cloud data, existing methods are insufficient to meet engineering application standards.

Method used

By constructing a rectangular grid, calculating point coverage and area coverage, classifying grid cells using an integer programming model, and combining optimization objectives and constraints, the decision variables are solved to merge adjacent grid cells, thereby achieving automatic classification and reconstruction of walls and doors/windows.

Benefits of technology

It improves the robustness and semantic integrity of model reconstruction under low-quality point cloud data, ensures that the shapes of doors and windows are regular and the topological relationships are correct, and solves the problems of semantic missing and topological errors under low-quality point cloud data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156527A_ABST
    Figure CN122156527A_ABST
Patent Text Reader

Abstract

The application discloses a building facade model reconstruction method, device and equipment and a storage medium, and belongs to the technical field of surveying and geographic information. The method comprises the following steps: creating a rectangular grid according to obtained two-dimensional point cloud data of a building facade, and recording neighborhood information of each grid unit; calculating attribute information of each grid unit, wherein the attribute information comprises point coverage and surface coverage; constructing an integer programming model according to the neighborhood information and the attribute information of each grid unit, wherein the integer programming model comprises decision variables, an optimization target and constraint conditions; solving the integer programming model to obtain the value of the decision variables of each grid unit, and merging adjacent grid units with the same value of the decision variables to obtain a building facade model. The embodiment of the application can automatically reconstruct a geometrically accurate, topologically correct and semantically informative building facade model based on low-quality building facade point cloud data.
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 storage medium for reconstructing building facade models. Background Technology

[0002] Point cloud reconstruction of building facade models is crucial for upgrading Building Information Modeling (BIM) from low to high detail levels, and is of great significance for applications such as urban surveying and architectural heritage archiving. However, existing reconstruction methods have significant limitations: while manual interactive modeling can restore accurate geometry and correct topology, it is inefficient and costly, failing to meet large-scale demands; in automated reconstruction, model-driven methods rely on additional imagery and target recognition, with doors and windows often represented by bounding boxes, resulting in insufficient geometric accuracy; data-driven methods require high-quality input point clouds (high density, uniform distribution, and high signal-to-noise ratio), but low-quality point clouds commonly found in actual engineering (low point density, uneven distribution, and high noise and outliers) make it difficult for existing automated methods to stably reconstruct facade models that combine geometric accuracy, topological correctness, and semantic information. Summary of the Invention

[0003] The purpose of this application is to provide a method, apparatus, device, and storage medium for reconstructing building facade models, which can automatically reconstruct geometrically accurate, topologically correct, and semantically informative building facade models based on low-quality building facade point cloud data.

[0004] To achieve the above objectives, a first aspect of this application provides a method for reconstructing a building facade model, comprising: Based on the acquired two-dimensional point cloud data of the building facade, a rectangular grid is created, and the neighborhood information of each grid cell is recorded. Calculate the attribute information of each grid cell, including point coverage and area coverage; Based on the neighborhood information and attribute information of each grid cell, an integer programming model is constructed. The integer programming model includes decision variables, optimization objectives, and constraints. The decision variables are used to represent the category of each grid cell as a wall or door / window. The optimization objective is used to make the reconstructed model closely resemble the input point cloud and resist noise interference. The constraints are used to ensure the rectangular shape of the door / window area and the correctness of the model topology. Solve the integer programming model to obtain the decision variable values ​​of each grid cell, and merge adjacent grid cells with the same decision variable values ​​to obtain the building facade model.

[0005] Compared with existing technologies, the building facade model reconstruction method provided in this application has the following advantages: It constructs a rectangular grid from the two-dimensional point cloud data of the building facade and extracts point coverage, area coverage attributes, and neighborhood information. Based on an integer programming model, it achieves semantic classification of walls / doors and windows within the grid cells. The optimization objective ensures the model's fit with the point cloud and its resistance to noise interference. Constraints ensure the rectangular shape of the door and window areas matches the model's topological correctness. Finally, by merging adjacent grids with the same decision variables, it can automatically and accurately reconstruct a building facade model with clear semantic information (walls / doors and windows), regular door and window shapes, and correct topological relationships based on low-quality building facade point cloud data. Compared with traditional methods, it not only improves the robustness and semantic integrity of model reconstruction under low-quality point clouds but also ensures the geometric regularity of components such as doors and windows, effectively solving the problems of semantic loss, topological errors, or shape distortion in facade model reconstruction under low-quality point cloud data.

[0006] In some embodiments, the step of creating a rectangular grid based on the acquired two-dimensional point cloud data of the building facade and recording the neighborhood information of the grid cells includes: The acquired two-dimensional point cloud data of the building facade is converted into a raster image, and a boundary tracking algorithm is used to extract the door and window boundaries from the raster image to obtain the door and window boundary point set. Based on the random sampling consensus algorithm, straight line fitting is performed on the set of boundary points of the doors and windows to obtain the set of horizontal straight lines and the set of vertical straight lines respectively. The sets of horizontal and vertical lines intersect to generate grid vertices, and adjacent grid vertices are connected to form a rectangular grid; Record the row and column numbers of each grid cell, as well as the adjacent cells of each grid cell in the horizontal, vertical and diagonal directions, as the neighborhood information.

[0007] In some embodiments, the process of calculating the point coverage of each grid cell specifically includes: Calculate the ratio of the number of data points inside each grid cell to the area of ​​that grid cell, and use this ratio as the point density of each grid cell; Calculate the maximum point density of all grid cells; Calculate the ratio of the point density of each grid cell to the maximum point density, and use this ratio as the point coverage of that grid cell.

[0008] In some embodiments, the process of calculating the surface coverage of each grid cell specifically includes: Based on the two-dimensional point cloud data, an alpha-shape triangular mesh model is constructed; The ratio of the area of ​​the triangular mesh model within each mesh cell to the area of ​​that mesh cell is calculated as the surface coverage of that mesh cell.

[0009] In some embodiments, constructing an integer programming model based on the neighborhood information and attribute information of each grid cell includes: Define the decision variables, wherein the decision variables of each grid cell can only take the value of 0 or 1. A value of 1 indicates that the grid cell belongs to the wall category, and a value of 0 indicates that the grid cell belongs to the door and window category. The optimization objective is defined as a weighted sum of several sub-objectives, which include: The sub-objective of point coverage optimization is proportional to the negative of the sum of the products of the point coverage of each grid cell and its decision variables. The sub-objective of area coverage optimization is proportional to the negative of the sum of the products of the area coverage of each grid cell and its decision variables. The model complexity optimization sub-objective has a function value that is proportional to the average of the decision variables of all grid cells; The constraints are defined as follows: shape constraints to ensure that the door and window areas are rectangular, and topological constraints to ensure the topological correctness between door and window areas and between door and window areas and walls.

[0010] In some embodiments, the implementation process of the constraint conditions specifically includes: A two-row, two-column sliding window is used to traverse the rectangular grid with a step size of one grid cell. The sliding window covers four grid cells at a time. For each region covered by the sliding window, the sum of all decision variables in that region is calculated, and the value of the sum is defined to be only 0, 2, 3 or 4, as the shape constraint; For each region covered by the sliding window, when the sum of all decision variables in that region is 2, the sum of the two decision variables located on the diagonal in that region is further calculated, and the value of the sum of the diagonal decision variables is defined to be only 1, as the topological constraint.

[0011] In some embodiments, solving the integer programming model to obtain the decision variable values ​​of each grid cell, and merging adjacent grid cells with the same decision variable values ​​to obtain the building facade model includes: The branch and bound method is used to solve the integer programming model to obtain the optimal decision variable values ​​for each grid cell. Based on the neighborhood information, all adjacent grid cells with the same decision variable value are merged to form a building facade model containing a continuous wall model and several independent door and window models; wherein, grid cells with a decision variable value of 1 are merged into the wall model, and grid cells with a decision variable value of 0 are merged into the door and window models.

[0012] To achieve the above objectives, a second aspect of this application provides a building facade model reconstruction apparatus, the apparatus comprising: The network construction module is used to create rectangular grids based on the acquired two-dimensional point cloud data of the building facade and record the neighborhood information of each grid cell. The calculation module is used to calculate the attribute information of each grid cell, including point coverage and area coverage. An optimization module is used to construct an integer programming model based on the neighborhood information and attribute information of each grid cell. The integer programming model includes decision variables, optimization objectives, and constraints. The decision variables are used to represent the category of each grid cell as a wall or door / window. The optimization objective is used to make the reconstructed model closely resemble the input point cloud and resist noise interference. The constraints are used to ensure the rectangular shape of the door / window area and the correctness of the model topology. The solution module is used to solve the integer programming model, obtain the decision variable values ​​of each grid cell, merge adjacent grid cells with the same decision variable values, and obtain the building facade model.

[0013] 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.

[0014] 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

[0015] Figure 1 This is a flowchart of a building facade model reconstruction method provided in an embodiment of this application; Figure 2 This is a schematic diagram illustrating the calculation of point coverage of the grid cell provided in an embodiment of this application; Figure 3 This is a schematic diagram illustrating the calculation of the surface coverage of the mesh cells provided in an embodiment of this application; Figure 4 This application embodiment provides all possible cases where the mesh area covered by the sliding window satisfies both shape and topology constraints. Figure 5 This represents all possible cases where the mesh area covered by the sliding window provided in this application embodiment does not satisfy shape constraints or topology constraints; Figure 6This is a schematic diagram of the effect of point cloud data of a building facade provided in an embodiment of this application; Figure 7 This is a schematic diagram illustrating the effect of a rectangular grid on the facade of a building provided in an embodiment of this application; Figure 8 This is a schematic diagram of the effect of a model of a building facade provided in an embodiment of this application; Figure 9 This is a schematic diagram illustrating the effect of point cloud data of another building facade provided in an embodiment of this application; Figure 10 This is a schematic diagram illustrating the effect of a rectangular grid on another building facade provided in an embodiment of this application; Figure 11 This is a schematic diagram illustrating the effect of a model of another building facade provided in an embodiment of this application; Figure 12 This is a schematic diagram of a building facade model reconstruction device provided in an embodiment of this application; Figure 13 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0016] 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.

[0017] 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.

[0018] 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.

[0019] 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.

[0020] Reconstructing building facade models based on point cloud data is a key step in driving the iterative upgrade of Building Information Modeling (BIM) from low-level to high-level detail, and has significant application value in fields such as urban surveying and digital archiving of architectural heritage. However, current mainstream reconstruction methods still have significant limitations in terms of efficiency, accuracy, and robustness.

[0021] While interactive modeling using point cloud data can accurately reconstruct the geometry and topology of building facades, it suffers from inherent problems of low efficiency and high cost, making it unsuitable for large-scale reconstruction scenarios. In automated reconstruction technologies, model-driven methods typically rely on additional image data and target recognition techniques. The resulting building facade models often present door and window structures as bounding boxes, resulting in geometric accuracy that fails to meet engineering application standards. Data-driven methods, on the other hand, have stringent requirements for input data quality, typically relying on high-density, uniformly distributed, and high signal-to-noise ratio point cloud data. However, in real-world engineering scenarios, point cloud data often suffers from low quality—such as insufficient point density, uneven distribution, and significant noise and outliers. This makes it difficult for existing automated methods to reconstruct building facade models that simultaneously achieve geometric accuracy, topological correctness, and semantic integrity.

[0022] Based on this, embodiments of this application provide a method, apparatus, device, and storage medium for reconstructing building facade models, aiming to solve the problems of semantic missingness, topological errors, and insufficient geometric accuracy in the reconstruction of building facade models based on low-quality point cloud data in the prior art. It can automatically reconstruct geometrically accurate, topologically correct, and semantically informative building facade models based on low-quality building facade point cloud data.

[0023] Please see Figure 1 , Figure 1 This is an optional flowchart of the building facade model reconstruction method 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: Based on the acquired two-dimensional point cloud data of the building facade, create a rectangular grid and record the neighborhood information of each grid cell; Step S102: Calculate the attribute information of each grid cell, including point coverage and area coverage; Step S103: Construct an integer programming model based on the neighborhood information and attribute information of each grid cell. The integer programming model includes decision variables, optimization objectives and constraints. The decision variables are used to represent the category of each grid cell belonging to the wall or door / window. The optimization objective is used to make the reconstructed model close to the input point cloud and resist noise interference. The constraints are used to ensure the rectangular shape of the door / window area and the correctness of the model topology. Step S104: Solve the integer programming model to obtain the decision variable values ​​of each grid cell, merge adjacent grid cells with the same decision variable values ​​to obtain the building facade model.

[0025] Steps S101 to S104 of this embodiment involve constructing a rectangular grid from the two-dimensional point cloud data of the building facade and extracting point coverage, area coverage attributes, and neighborhood information. A semantic classification of walls / doors / windows within the grid cells is achieved based on an integer programming model. The optimization objective ensures the model's fit with the point cloud and its resistance to noise interference. Constraints ensure the rectangular shape of the door / window area matches the model's topological correctness. Finally, by merging adjacent grids with the same decision variables, a building facade model with clear semantic information (walls / doors / windows), regular door / window shapes, and correct topological relationships can be automatically and accurately reconstructed from low-quality building facade point cloud data. Compared to traditional methods, this not only improves the robustness and semantic integrity of model reconstruction under low-quality point cloud data but also ensures the geometric regularity of components such as doors and windows, effectively solving the problems of semantic loss, topological errors, or shape distortion in facade model reconstruction under low-quality point cloud data.

[0026] In step S101 of some embodiments, the two-dimensional point cloud data of the building facade can be obtained by conventional surveying and mapping methods such as laser scanning and photogrammetry, which allows for low-quality features such as low point density, uneven distribution, noise, and outliers.

[0027] In some embodiments, a rectangular grid is created based on the acquired two-dimensional point cloud data of the building facade, and neighborhood information of the grid cells is recorded, including: The acquired 2D point cloud data of the building facade is converted into a raster image. A boundary tracking algorithm is used to extract the door and window boundaries from the raster image to obtain the door and window boundary point set. Based on the random sampling consensus algorithm, straight lines are fitted to the boundary point set of doors and windows to obtain the set of horizontal straight lines and the set of vertical straight lines respectively. By combining sets of horizontal and vertical lines, grid vertices are generated, and adjacent grid vertices are connected to form a rectangular grid. Record the row and column numbers of each grid cell, as well as the adjacent cells of each grid cell in the horizontal, vertical and diagonal directions, as neighborhood information.

[0028] It should be noted that when converting the acquired 2D point cloud data into raster images, the raster resolution can be adaptively set according to the point cloud density. For example, when the point density is low, a resolution of 0.1m × 0.1m can be used. A boundary tracking algorithm (such as the eight-neighbor boundary tracking method) is used to traverse the raster image, identify the edge pixels of the door and window areas, and extract the door and window boundary point set (excluding isolated noise points and retaining continuous boundary points). Furthermore, a random sampling consensus algorithm can be used to perform line fitting on the door and window boundary point set. Two boundary points are randomly selected to generate candidate lines, and the distance from other points to the line is calculated. A distance threshold is set (such as 0.05m), and the number of interior points that satisfy "distance ≤ threshold" is counted. After multiple iterations (such as 100 times), the line with the highest proportion of interior points is retained and classified into a set of horizontal lines (parallel to the X-axis) and a set of vertical lines (parallel to the Y-axis). Furthermore, all intersection points of the horizontal and vertical line sets are calculated as grid vertices. A rectangular grid covering the entire building facade is generated according to the rule of connecting adjacent vertices in sequence (the grid cell size varies with the line spacing to adapt to the actual size of the doors and windows). Finally, each grid cell is uniquely labeled with a "row-column number" (e.g., row i, column j), and its neighboring cells are recorded: Horizontal neighborhood: the left and right adjacent cells in the i-th row (j-1) and i-th row (j+1) columns; Vertical neighborhood: the vertically adjacent cells in the (i-1)th row and jth column, and the (i+1)th row and jth column; Diagonal neighborhood: the diagonally adjacent cells in the (i-1)th row and (j-1)th column, the (i-1)th row and (j+1)th column, the (i+1)th row and (j-1)th column, and the (i+1)th row and (j+1)th column; neighborhood information can be stored in tabular form.

[0029] In step S102 of some embodiments, the attribute information includes point coverage and area coverage.

[0030] Please see Figure 2 In some embodiments, the process of calculating the point coverage of each grid cell specifically includes: Calculate the ratio of the number of data points inside each grid cell to the area of ​​that grid cell, and use this ratio as the point density of each grid cell; Calculate the maximum point density of all grid cells; Calculate the ratio of the point density of each grid cell to the maximum point density, and use this ratio as the point coverage of that grid cell.

[0031] Specifically, first, the area of ​​each grid cell is calculated; then, each data point in the 2D point cloud data of the building facade is traversed to determine the grid cell to which the data point belongs; further, the number of data points within each grid cell is counted, and the point density of each grid cell is calculated using the following formula: ; in, Let be the point density of the grid cell in the i-th row and j-th column (unit: cells / m²). This represents the number of data points located within this grid cell. This represents the area of ​​the grid cell.

[0032] Iterate through the point density of all grid cells and determine the maximum point density. ; The point coverage of each grid cell is calculated using the following formula: ; in, Let be the point coverage of the grid cell in the i-th row and j-th column, with a value ranging from 0 to 1. The closer the value is to 1, the denser the point cloud distribution within that unit. Let be the point density of the grid cell in the i-th row and j-th column (unit: cells / m²). This represents the maximum point density.

[0033] Please see Figure 3 In some embodiments, the process of calculating the surface coverage of each grid cell specifically includes: Construct an alpha-shape triangular mesh model based on two-dimensional point cloud data; Calculate the ratio of the area of ​​the triangular mesh model inside each mesh cell to the area of ​​that mesh cell, and use this ratio as the surface coverage of that mesh cell.

[0034] Specifically, an alpha-shape triangular mesh model is constructed based on the two-dimensional point cloud data of the building facade; Cut the triangular mesh model according to the boundary of the rectangular mesh to obtain the triangular mesh model that falls inside each mesh cell, and calculate the sum of the areas of all triangular mesh models contained in each mesh cell. The surface coverage of each grid cell is calculated using the following formula: ; in, Let be the surface coverage of the grid cell in the i-th row and j-th column, with a value ranging from 0 to 1. The closer it is to 1, the more complete the planar structure formed by the point cloud within the unit; This is the sum of the areas of all the triangular mesh models contained within this mesh cell. This represents the area of ​​the grid cell.

[0035] In step S103 of some embodiments, an integer programming model is constructed based on the neighborhood information and attribute information of each grid cell, including: Define decision variables, where the decision variable for each grid cell can only take the value of 0 or 1. A value of 1 indicates that the grid cell belongs to the wall category, and a value of 0 indicates that the grid cell belongs to the door and window category. The optimization objective is defined as a weighted sum of several sub-objectives, which include: The sub-objective of point coverage optimization is proportional to the negative of the sum of the products of the point coverage of each grid cell and its decision variables. The sub-objective of area coverage optimization is proportional to the negative of the sum of the products of the area coverage of each grid cell and its decision variables. The model complexity optimization sub-objective has a function value that is proportional to the average of the decision variables of all grid cells; Define constraints, including shape constraints to ensure that the door and window areas are rectangular, and topological constraints to ensure the topological correctness between door and window areas and between door and window areas and walls.

[0036] Specifically, for each grid cell Define a decision variable , where i and j are the row and column numbers of the grid cell, respectively. Decision variables The value of is limited to 0 or 1, when the decision variable is obtained by solving When, it indicates the grid cell Belonging to the wall category, when the obtained decision variables are solved When, it indicates the grid cell It belongs to the category of doors and windows, that is: ; According to the rectangular grid Construct the corresponding set of decision variables , where R is the total number of rows in the grid and C is the total number of columns, and both R and C are integers not less than 2.

[0037] According to each grid unit Point coverage Define the sub-objective of point coverage optimization. The calculation formula is: ; According to each grid unit Surface coverage Define the sub-objective of surface coverage optimization. The calculation formula is: ; Calculate the average of all decision variables and define the model complexity optimization sub-objective. The calculation formula is: ; The point coverage optimization sub-objective encourages high point coverage for wall-type mesh cells, while the area coverage optimization sub-objective encourages high area coverage for wall-type mesh cells. In other words, the point coverage optimization and area coverage optimization sub-objectives encourage wall cells in the reconstructed building facade model to have a sufficient number of points and a sufficiently distributed set of data points. The model complexity optimization sub-objective combats noise points and outliers located in the door and window areas of the building facade point cloud data, encouraging model simplicity.

[0038] Based on each optimization sub-objective, the optimization objective is defined as minimizing the weighted sum of the optimization sub-objectives, and the calculation formula is as follows: ; in, These are the weights corresponding to the point coverage optimization sub-objective, the area coverage optimization sub-objective, and the model complexity optimization sub-objective, respectively, and they satisfy the following conditions: ; It should be noted that, in one specific embodiment, the weights corresponding to each optimization sub-objective can be set to... , , In other embodiments, the weight settings may be adjusted according to the actual situation, and are not limited thereto.

[0039] Constraints are constructed based on the decision variables of each grid cell and its adjacent grid cells, including shape constraints and topological constraints. Shape constraints ensure that the shape of each door and window area in the reconstructed building facade model is rectangular to avoid irregular door and window shapes. Topological constraints ensure the topological correctness of the reconstructed building facade model, that is, each door and window area has no intersection with another door and window area to avoid topological errors.

[0040] In some embodiments, the process of implementing the constraint conditions specifically includes: A two-row, two-column sliding window is used, which slides across the rectangular grid with a step size of one grid cell. The sliding window covers four grid cells at a time. For each region covered by the sliding window, the sum of all decision variables in that region is calculated, and the value of the sum is defined to be only 0, 2, 3 or 4, as a shape constraint; For each region covered by the sliding window, when the sum of all decision variables in that region is 2, the sum of the two decision variables located on the diagonal in that region is further calculated, and the value of the sum of the diagonal decision variables is defined to be only 1, as a topological constraint.

[0041] Specifically, a two-row, two-column sliding window is used, which slides across the rectangular grid from left to right and from top to bottom, with a total number of traversals. The distance between each slide is one grid cell, and each area slid over covers four grid cells. Since the size of each grid cell is different, the coverage area of ​​the sliding window also changes with the area slid over.

[0042] It should be noted that the sliding method of the sliding window can be set from left to right or from top to bottom. In other embodiments, the sliding method can be adjusted or set according to the actual situation, as long as it can traverse the rectangular grid area.

[0043] For each region traversed by the sliding window, shape constraints and topological constraints are defined by statistically analyzing the decision variable values ​​of the four covered grid cells, requiring each region to satisfy both constraints. Figure 4 This application embodiment provides all possible cases where the mesh area covered by the sliding window satisfies both shape and topology constraints. Figure 5 This refers to all possible cases where the mesh area covered by the sliding window provided in this application embodiment does not meet shape constraints or topology constraints.

[0044] Let's take the k-th sliding window covering the grid cells in the i-th row and j-th column, the grid cells in the i-th row and j+1-th column, the grid cells in the i+1-th row and j-th column, and the grid cells in the i+1-th row and j+1-th column as an example:

[0045] Where k is an integer not less than 1, and for an R-row, C-column rectangular grid, where R and C are both integers not less than 2, then the maximum value of k is... .

[0046] Calculate the sum of decision variables in the grid regions covered by each sliding window: ; Define the shape constraint as: ; Calculate the sum of the diagonal decision variables located on the diagonal of the grid region covered by each sliding window: ; Define topological constraints as: ; It should be noted that in this embodiment, the sum of the diagonal decision variables is set as the sum of the decision variables at the top left and bottom right corners of the grid area covered by the sliding window. In other embodiments, the sum of the diagonal decision variables can also be set as the sum of the decision variables at the top right and bottom left corners, i.e. .

[0047] Finally, the branch and bound method is used to find the optimal decision variables (i.e., the optimal decision variables for each grid cell) that maximize the objective function while satisfying the constraints. If the optimal decision variable for a grid cell is 1, it is a wall cell; if the optimal decision variable for a grid cell is 0, it is a door or window cell.

[0048] In step S104 of some embodiments, the integer programming model is solved to obtain the decision variable values ​​of each grid cell, and adjacent grid cells with the same decision variable values ​​are merged to obtain the building facade model, including: The branch and bound method is used to solve the integer programming model and obtain the optimal decision variable values ​​for each grid cell; Based on neighborhood information, all adjacent grid cells with the same decision variable value are merged to form a building facade model containing a continuous wall model and several independent door and window models; among them, grid cells with a decision variable value of 1 are merged into the wall model, and grid cells with a decision variable value of 0 are merged into the door and window models.

[0049] Specifically, the branch and bound method is used to solve the model, including: relaxing all decision variables into continuous variables (taking values ​​from 0 to 1), solving the linear programming relaxation problem, and obtaining the initial lower bound; selecting "non-integer decision variables" from the relaxed solution, and dividing them into... ≤0 and For each subproblem, solve two subproblems. If a subproblem has no feasible solution or its objective value is greater than or equal to the current upper bound, prune the subproblem. If the solution is an integer and better than the current upper bound, update the upper bound. If the solution is a non-integer and the objective value is less than the current upper bound, continue branching. When the upper and lower bounds are equal, obtain the optimal integer solution (for each grid cell). (Select values) to ensure that the optimization objective and constraints are met.

[0050] Based on neighborhood information, adjacent grid cells with the same decision variable values ​​are merged; wall merging: all... Adjacent mesh cells with a value of 1 are merged to form a continuous wall model (no isolated wall cells); Doors and windows are merged: all... Adjacent mesh cells with a value of 0 are merged to form independent door and window models (each door and window area is a complete rectangle with no intersections); the final output is a building facade model with correct topology that includes "wall semantics + door and window semantics".

[0051] In another embodiment provided in this application, the method proposed in this application is used to reconstruct a building facade model from point cloud data of a building facade. See also Figure 6 This is a schematic diagram of the point cloud data of the building facade provided in an embodiment of this application. In this data, there are obvious outliers in the door and window areas, a large area of ​​data points is missing on the horizontal walls separating the door and window areas, and the data point density on the vertical walls separating the door and window areas is uneven and the upper part of the data is incomplete. See also... Figure 7 This is a schematic diagram illustrating the effect of a rectangular grid on a building facade provided in an embodiment of this application. See also... Figure 8 This is a schematic diagram of the building facade model provided in the embodiments of this application. The building facade model reconstructed using this method accurately reflects all door and window areas of the building facade.

[0052] In another embodiment provided in this application, the method proposed in this application is used to reconstruct a building facade model from two-dimensional point cloud data of another building facade. See also Figure 9 This is a schematic diagram of the point cloud data of the building facade provided in this embodiment of the application. The point density of this data is low and unevenly distributed. The lower edge of the door and window area appears as noise points without obvious straight lines. Significant data loss occurs on the right side of the facade, and some walls separating the door and window areas only show a few vertically distributed points. Reconstructing this building facade data is still quite difficult, even with manual visual judgment, requiring the inference of the missing data area on the right side based on the symmetry of the door and window distribution. See also... Figure 10 This is a schematic diagram illustrating the effect of the rectangular grid on the building facade provided in this embodiment of the application. See also... Figure 11 This is a schematic diagram of the effect of the building facade model provided in the embodiments of this application.

[0053] Of the 159 door and window areas on this facade, the facade model reconstructed by this method correctly reflects 155 of them, with 2 missing and 1 incorrectly reconstructed. The building facade model reconstructed by this method from this extreme data has an accuracy of 99.4%, a recall of 97.5%, and an F1 score of 98.4% for its door and window areas, demonstrating the good adaptability and robustness of this method.

[0054] Experimental tests showed that for building facade point cloud data with 100,000 points, the method reconstructed the building model in only about 6 seconds, indicating that the method has good operating efficiency.

[0055] Please see Figure 12 This application also provides a building facade model reconstruction device, which can realize the above-mentioned building facade model reconstruction method. The device includes: The network module 1201 is used to create a rectangular grid based on the acquired two-dimensional point cloud data of the building facade and record the neighborhood information of each grid cell. The calculation module 1202 is used to calculate the attribute information of each grid cell, including point coverage and area coverage. The optimization module 1203 is used to construct an integer programming model based on the neighborhood information and attribute information of each grid cell. The integer programming model includes decision variables, optimization objectives and constraints. The decision variables are used to represent the category of each grid cell belonging to the wall or door / window. The optimization objective is used to make the reconstructed model close to the input point cloud and resist noise interference. The constraints are used to ensure the rectangular shape of the door / window area and the correctness of the model topology. Solver module 1204 is used to solve the integer programming model, obtain the decision variable values ​​of each grid cell, merge adjacent grid cells with the same decision variable values, and obtain the building facade model.

[0056] The specific implementation method of the building facade model reconstruction device is basically the same as the specific implementation method of the building facade model reconstruction method described above, and will not be repeated here.

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

[0058] like Figure 13 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 facade model reconstruction method as described in any of the above embodiments.

[0059] 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.

[0060] 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.

[0061] 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.

[0062] 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 13 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.

[0063] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed, implements the building facade model reconstruction method of any of the above embodiments.

[0064] It should be understood that all or part of the processes in the above-described building facade model reconstruction method can also be implemented 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 building facade model reconstruction method. 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 contained in the computer-readable medium can be appropriately added or removed 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.

[0065] 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.

[0066] 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 reconstructing a building facade model, characterized in that, include: Based on the acquired two-dimensional point cloud data of the building facade, a rectangular grid is created, and the neighborhood information of each grid cell is recorded. Calculate the attribute information of each grid cell, including point coverage and area coverage; Based on the neighborhood information and attribute information of each grid cell, an integer programming model is constructed. The integer programming model includes decision variables, optimization objectives, and constraints. The decision variables are used to represent the category of each grid cell as a wall or door / window. The optimization objective is used to make the reconstructed model closely resemble the input point cloud and resist noise interference. The constraints are used to ensure the rectangular shape of the door / window area and the correctness of the model topology. Solve the integer programming model to obtain the decision variable values ​​of each grid cell, and merge adjacent grid cells with the same decision variable values ​​to obtain the building facade model.

2. The method for reconstructing a building facade model as described in claim 1, characterized in that, The step of creating a rectangular grid based on the acquired two-dimensional point cloud data of the building facade and recording the neighborhood information of the grid cells includes: The acquired two-dimensional point cloud data of the building facade is converted into a raster image, and a boundary tracking algorithm is used to extract the door and window boundaries from the raster image to obtain the door and window boundary point set. Based on the random sampling consensus algorithm, straight line fitting is performed on the set of boundary points of the doors and windows to obtain the set of horizontal straight lines and the set of vertical straight lines respectively. The sets of horizontal and vertical lines intersect to generate grid vertices, and adjacent grid vertices are connected to form a rectangular grid; Record the row and column numbers of each grid cell, as well as the adjacent cells of each grid cell in the horizontal, vertical and diagonal directions, as the neighborhood information.

3. The method for reconstructing a building facade model as described in claim 1, characterized in that, The process of calculating the point coverage of each grid cell specifically includes: Calculate the ratio of the number of data points inside each grid cell to the area of ​​that grid cell, and use this ratio as the point density of each grid cell; Calculate the maximum point density of all grid cells; Calculate the ratio of the point density of each grid cell to the maximum point density, and use this ratio as the point coverage of that grid cell.

4. The method for reconstructing a building facade model as described in claim 1, characterized in that, The process of calculating the surface coverage of each grid cell specifically includes: Based on the two-dimensional point cloud data, an alpha-shape triangular mesh model is constructed; The ratio of the area of ​​the triangular mesh model within each mesh cell to the area of ​​that mesh cell is calculated as the surface coverage of that mesh cell.

5. The method for reconstructing a building facade model as described in claim 1, characterized in that, The step of constructing an integer programming model based on the neighborhood information and attribute information of each grid cell includes: Define the decision variables, wherein the decision variables of each grid cell can only take the value of 0 or 1. A value of 1 indicates that the grid cell belongs to the wall category, and a value of 0 indicates that the grid cell belongs to the door and window category. The optimization objective is defined as a weighted sum of several sub-objectives, which include: The sub-objective of point coverage optimization is proportional to the negative of the sum of the products of the point coverage of each grid cell and its decision variables. The sub-objective of area coverage optimization is proportional to the negative of the sum of the products of the area coverage of each grid cell and its decision variables. The model complexity optimization sub-objective has a function value that is proportional to the average of the decision variables of all grid cells; The constraints are defined as follows: shape constraints to ensure that the door and window areas are rectangular, and topological constraints to ensure the topological correctness between door and window areas and between door and window areas and walls.

6. The method for reconstructing a building facade model as described in claim 5, characterized in that, The implementation process of the constraints specifically includes: A two-row, two-column sliding window is used to traverse the rectangular grid with a step size of one grid cell. The sliding window covers four grid cells at a time. For each region covered by the sliding window, the sum of all decision variables in that region is calculated, and the value of the sum is defined to be only 0, 2, 3 or 4, as the shape constraint; For each region covered by the sliding window, when the sum of all decision variables in that region is 2, the sum of the two decision variables located on the diagonal in that region is further calculated, and the value of the sum of the diagonal decision variables is defined to be only 1, as the topological constraint.

7. The method for reconstructing a building facade model as described in claim 1, characterized in that, Solving the integer programming model yields the decision variable values ​​for each grid cell. Adjacent grid cells with the same decision variable values ​​are then merged to obtain the building facade model, including: The branch and bound method is used to solve the integer programming model to obtain the optimal decision variable values ​​for each grid cell. Based on the neighborhood information, all adjacent grid cells with the same decision variable value are merged to form a building facade model containing a continuous wall model and several independent door and window models; wherein, grid cells with a decision variable value of 1 are merged into the wall model, and grid cells with a decision variable value of 0 are merged into the door and window models.

8. A device for reconstructing a building facade model, characterized in that, include: The network construction module is used to create rectangular grids based on the acquired two-dimensional point cloud data of the building facade and record the neighborhood information of each grid cell. The calculation module is used to calculate the attribute information of each grid cell, including point coverage and area coverage. An optimization module is used to construct an integer programming model based on the neighborhood information and attribute information of each grid cell. The integer programming model includes decision variables, optimization objectives, and constraints. The decision variables are used to represent the category of each grid cell as a wall or door / window. The optimization objective is used to make the reconstructed model closely resemble the input point cloud and resist noise interference. The constraints are used to ensure the rectangular shape of the door / window area and the correctness of the model topology. The solution module is used to solve the integer programming model, obtain the decision variable values ​​of each grid cell, merge adjacent grid cells with the same decision variable values, and obtain the building facade model.

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 facade model reconstruction method as described in any one of claims 1 to 7.

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 facade model reconstruction method as described in any one of claims 1 to 7.