City building roof wireframe reconstruction method based on point cloud and related equipment

By extracting fast point features and multi-scale geometric descriptor features from roof point clouds, combined with DBSCAN and inflection point correction networks, the accuracy and versatility issues of existing roof wireframe reconstruction technology in complex scenes and large-scale applications are solved, achieving high-precision and low-cost roof wireframe reconstruction.

CN120599174APending Publication Date: 2025-09-05XI AN JIAOTONG UNIV
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510709795.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

Existing roof wireframe reconstruction technology has insufficient reconstruction accuracy in complex scenarios and large-scale applications, lacks cross-city universality, has high labor costs, and lacks adaptability to application scenarios, making it difficult to meet the market demand for high precision, low cost, and universality.

Method used

By acquiring building roof point cloud data, extracting fast point feature histograms and multi-scale roof geometric descriptor features, and combining the DBSCAN algorithm and inflection point correction network, robust point-by-point features are generated, and the topological connection of the roof wireframe is automatically inferred, reducing dependence on manual rules and improving the accuracy of inflection point positioning.

Benefits of technology

It achieves high-precision and robust roof wireframe reconstruction, enhances the generalization ability of complex roof structures, reduces labor costs, adapts to diverse urban environments, and improves reconstruction efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599174A_ABST
    Figure CN120599174A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of smart cities, and discloses a point cloud-based urban building roof wireframe reconstruction method, which comprises the following steps of: fusing a fast point feature histogram and a multi-scale roof geometric descriptor, generating robust point-by-point features, screening candidate angular point clusters in combination with a classification head, and adaptively segmenting the candidate point clusters based on density parameters by utilizing DBSCAN (Density-Based Spatial Clustering of Applications with Noise), so as to reconstruct a point cloud-based urban building roof wireframe. Initial inflection points are extracted through unsupervised clustering, noise is effectively suppressed, and irregular distribution is adapted; then multi-scale geometric information of an initial inflection point neighborhood is aggregated through an inflection point correction network, offset is learned to correct position deviation, and inflection point positioning precision is improved; and finally, the edge classification network automatically deduces the topological connection of the roof wireframe based on the geometrical relationship and feature relevance of prediction inflection points, so that error accumulation caused by dependence on manual rules in a traditional method is avoided, the generalization ability of a complex roof structure is enhanced, the correction network learns offset through a multi-scale context, and the inflection point positioning precision is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of smart city technology, and specifically provides a method for reconstructing urban building roof wireframes based on point clouds. Background Art

[0002] With the acceleration of urbanization and the deepening of smart city construction, the processing and analysis of building point cloud data are playing an increasingly important role in smart city planning, renewable energy development, disaster management and other fields. As an important branch of point cloud processing, roof wireframe reconstruction technology aims to extract the geometric structure of the roof (such as facets, edges, and corner points) from three-dimensional point cloud data, providing high-precision geometric information for applications such as rooftop solar energy potential assessment, urban digital twins, and architectural heritage protection. Existing roof reconstruction technologies mainly include geometric extraction methods based on satellite digital surface models (DSMs), traditional point cloud segmentation and fitting algorithms, and point cloud processing methods based on deep learning. These technologies support the digital transformation of urban planning, energy optimization and other fields by extracting the topological and geometric features of the roof, which is in line with the needs of smart cities and carbon peak and carbon neutrality goals.

[0003] Although existing roof wireframe reconstruction technology has met application requirements to a certain extent, it still has significant defects and shortcomings, which limit its effectiveness in complex scenes and large-scale applications: Inadequate reconstruction accuracy: Satellite-based DSM methods are limited by resolution and occlusion, making it difficult to accurately extract the geometric details of complex rooftops (such as multi-faceted and irregularly shaped roofs). This leads to large errors in solar energy potential assessment and urban planning. Traditional point cloud segmentation algorithms (such as RANSAC) are less robust to noise and sparse point clouds, making them difficult to meet high-precision requirements.

[0004] Lack of cross-city versatility: Existing deep learning methods usually require model fine-tuning for different cities or point cloud characteristics (such as density and noise level), which increases data annotation and training costs and limits the promotion and application of technology in diverse urban environments.

[0005] Limited processing capabilities for complex roofs: Existing methods often fail to effectively capture the topological relationships of roofs with multiple faces, special shapes, or irregular structures, resulting in incomplete or erroneous reconstruction results. This is particularly true in scenarios requiring high-fidelity geometry, such as cultural heritage protection and disaster stability analysis.

[0006] High labor costs: Existing technologies rely on large amounts of manually labeled data to train models or verify reconstruction results. Data preparation and post-processing are expensive, especially when processing large-scale point cloud data. Manual intervention further reduces efficiency.

[0007] Insufficient adaptability to application scenarios: Existing methods perform poorly in sparse point clouds or high-noise environments, making it difficult to meet the diverse application needs of China's rapid urbanization, such as real-time geometric modeling in drone inspections or rapid rooftop analysis in disaster response.

[0008] The above-mentioned defects have limited the application of existing technologies in smart cities, green energy, cultural protection, disaster management and other fields, making it difficult to meet the market demand for high precision, low cost and universality. Summary of the Invention

[0009] The present invention provides a point cloud-based urban building roof wireframe reconstruction method and related equipment, which solves the problems of insufficient reconstruction accuracy and limited complex roof processing capabilities of existing roof wireframe reconstruction technologies.

[0010] To achieve the above object, the present invention provides the following technical solutions: A method for reconstructing urban building roof wireframes based on point clouds, comprising: Obtain building roof point cloud data and perform preprocessing; Extract fast point feature histogram features and multi-scale roof geometry descriptor features from the preprocessed point cloud data; The fast point feature histogram features and multi-scale roof geometry descriptor features are fused to obtain point-by-point features; Extract point-by-point features and then classify them through the classification head to obtain candidate corner point clusters; Use the DBSCAN algorithm to cluster the candidate corner point clusters, take each cluster center as the initial inflection point, and use the inflection point correction network to correct the position of the initial inflection point to generate the predicted inflection point; The topological relationship between the predicted inflection points is learned through the edge classification network to reconstruct the building roof wireframe.

[0011] Preferably, the pretreatment includes: The building roof point cloud data is sampled and processed. For point clouds with point number N>2048, a random downsampling algorithm is used to randomly select 2048 points from N points to retain the overall geometric characteristics of the point cloud. For point clouds with point number N<2048, a random repeated sampling algorithm is used to randomly select points from N points until the number of points reaches 2048 to ensure the consistency of the input scale. Then, Gaussian noise enhancement and random rigid transformation are performed on the sampled point cloud.

[0012] Preferably, the step of extracting fast point feature histogram features from the preprocessed point cloud data is specifically as follows: Determine the local neighborhood range of the target point through the nearest neighbor algorithm; Calculating a normal vector spatial relationship feature set between the target point and each neighboring point, including a normal vector angle feature, a curvature difference feature, and a spatial distance feature; quantizing the spatial relationship feature set into a multidimensional histogram vector; Adopting a neighborhood weighted fusion strategy to optimize the multidimensional histogram vector; The multidimensional histogram vector is subjected to dimensionality reduction processing through a feature selection mechanism, the feature dimension with the highest discrimination is retained, and fast point feature histogram features are obtained.

[0013] Preferably, the step of extracting multi-scale roof geometry descriptor features from the pre-processed point cloud data is specifically as follows: A dual-scale neighborhood strategy is used to capture the local and global geometric information of the point cloud, and then the k-nearest neighbor algorithm is used to extract geometric features at different scales. Extract curvature contrast features, height variance contrast features and spectral feature contrast features based on geometric characteristics at different scales; The curvature contrast feature, the height variance contrast feature and the spectrum feature contrast feature are spliced ​​to generate a composite geometric description vector; The composite geometric description vector is normalized to obtain multi-scale roof geometric descriptor features.

[0014] Preferably, the steps of fusing the fast point feature histogram features and the multi-scale roof geometry descriptor features to obtain point-by-point features are as follows: According to the fast point feature histogram features and the multi-scale roof geometry descriptor features, the self-attention weighted value vector of the fast point feature histogram features, the self-attention weighted value vector of the multi-scale roof geometry descriptor features, the cross-attention weighted value vector from the fast point feature histogram features to the multi-scale roof geometry descriptor features, and the cross-attention weighted value vector from the multi-scale roof geometry descriptor features to the fast point feature histogram features are obtained, and the above vectors are spliced ​​to obtain point-by-point features.

[0015] Preferably, the steps of extracting point-by-point features and then obtaining candidate corner point clusters through classification head classification are as follows: Point-by-point feature extraction is performed based on the Point Transformer v3 framework. Based on the extracted data, for the classification and regression tasks of candidate corner points, a spherical neighborhood with a radius of r centered on the true corner point is first defined. The points in the neighborhood are screened as positive samples through Euclidean distance, and the rest are negative samples to achieve binary classification label assignment. At the same time, the three-dimensional offset from the positive sample point to the nearest true corner point is calculated and normalized with the radius r as the regression target to ensure scale invariance of displacement prediction. On this basis, two independent task heads are designed. The classification head predicts the probability of candidate corner points based on point-by-point features and screens potential corner point positions. The regression head predicts a normalized offset vector based on the same features and superimposes the offset with the original coordinates of the candidate corner point cluster to optimize its spatial position to approach the true corner point. The classification head coarsely screens the candidate area, and the regression head fine-tunes the position. Finally, the roof point cloud is organized into candidate corner point clusters.

[0016] Preferably, the DBSCAN algorithm is used to cluster the candidate corner points, each cluster center is used as the initial inflection point, and the position of the initial inflection point is corrected by the inflection point correction network. The steps of generating the predicted inflection point are specifically as follows: The candidate corner clusters are segmented using the DBSCAN algorithm to identify corner clusters of arbitrary shapes and suppress noise, and the centroid of each cluster is extracted as the initial corner point; To address the corner point position deviation that may be caused by DBSCAN unsupervised segmentation, a corner point refinement network is further designed: multi-scale contextual features are aggregated from the local neighborhood of the initial corner point; then the three-dimensional offset vector from the initial corner point position to the true corner point is learned through the regression task head, and this offset is superimposed on the initial coordinates to correct the corner point position so that it is aligned with the true geometry to generate predicted corner points.

[0017] A point cloud-based urban building roof wireframe reconstruction system, including: Data processing module: used to obtain building roof point cloud data and perform preprocessing; Extraction module: used to extract fast point feature histogram features and multi-scale roof geometry descriptor features from preprocessed point cloud data; Fusion module: used to fuse the fast point feature histogram features and the multi-scale roof geometry descriptor features to obtain point-by-point features; Classification module: used to extract point-by-point features and then obtain candidate corner clusters through classification head; Prediction module: used to cluster candidate corner point clusters using the DBSCAN algorithm, taking each cluster center as the initial inflection point, correcting the position of the initial inflection point through the inflection point correction network, and generating predicted inflection points; Reconstruction module: used to learn the topological relationship between the predicted inflection points through the edge classification network and reconstruct the building roof wireframe.

[0018] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the processor implements the steps of a method for reconstructing a wireframe of an urban building roof based on a point cloud.

[0019] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for reconstructing a wireframe of an urban building roof based on a point cloud.

[0020] Compared with the prior art, the present invention has the following beneficial effects: the present invention provides a method for reconstructing the wireframe of urban building roofs based on point clouds, which generates robust point-by-point features by fusing fast point feature histograms with multi-scale roof geometry descriptors, screens candidate corner point clusters with a classification head, and then adaptively segments the candidate point clusters based on density parameters using DBSCAN, extracts initial inflection points through unsupervised clustering, effectively suppresses noise and adapts to irregular distributions; then, an inflection point correction network aggregates multi-scale geometric information of the initial inflection point neighborhood, learns offsets to correct position deviations, and improves the accuracy of inflection point positioning; finally, an edge classification network automatically infers the topological connection of the roof wireframe based on the geometric relationship and feature correlation of the predicted inflection points, avoiding the error accumulation caused by traditional methods relying on artificial rules. Multi-feature fusion and adaptive clustering reduce dependence on artificial predefined rules and enhance the generalization ability of complex roof structures. The correction network learns offsets through multi-scale context, significantly improving the accuracy of inflection point positioning. The edge classification network reconstructs the topology in a data-driven manner, ensuring the consistency of wireframe geometry with the real structure, and providing high-precision and robust reconstruction results for building modeling. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is a flow chart of a method for reconstructing urban building roof wireframes based on point cloud according to the present invention; Figure 2 This is a block diagram of a point cloud-based urban building roof wireframe reconstruction system of the present invention; DETAILED DESCRIPTION To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.

[0022] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort shall fall within the scope of protection of the present invention.

[0023] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0024] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0025] like Figure 1 As shown, the present invention provides a method for reconstructing urban building roof wireframes based on point clouds, comprising: S1 obtains building roof point cloud data and performs preprocessing; S2 extracts fast point feature histogram features and multi-scale roof geometry descriptor features from the preprocessed point cloud data; S3 fuses the fast point feature histogram features and the multi-scale roof geometry descriptor features to obtain point-by-point features; S4 extracts point-by-point features and then obtains candidate corner clusters through classification head classification; S5 uses the DBSCAN algorithm to cluster the candidate corner point clusters, takes each cluster center as the initial inflection point, corrects the position of the initial inflection point through the inflection point correction network, and generates a predicted inflection point; S6 uses an edge classification network to learn the topological relationship between the predicted inflection points and reconstruct the building roof wireframe.

[0026] Specifically: S1: Obtain building roof point cloud data and perform preprocessing.

[0027] To obtain building roof point cloud data, the input building roof point cloud is first sampled. Random downsampling: For point clouds with N points greater than 2048, a random downsampling algorithm is used to randomly select 2048 points from N points, preserving the overall geometric characteristics of the point cloud. Random resampling: For point clouds with N points less than 2048, a random resampling algorithm is used to randomly select points from N points repeatedly until the number of points reaches 2048, ensuring consistent input scale.

[0028] To improve the model's robustness and cross-city generalization, this paper introduces a data augmentation strategy during the training phase. By simulating point cloud noise and geometric transformations, the model's adaptability to sparse point clouds, high-noise environments, and diverse urban environments is enhanced. Gaussian noise augmentation: Gaussian noise is added to the spatial coordinates (x, y, z) of each point, with a noise standard deviation σ randomly sampled from a uniform distribution [0.005, 0.010] (unit: meters). Noise augmentation is applied to each sample with an 80% probability to ensure a balance between data diversity and training stability. Random rigid transformation: A random rigid transformation is applied to the point cloud, rotating it around the vertical Z axis with a rotation angle θ randomly sampled from a uniform distribution [-5°, 5°]. The point cloud coordinates are transformed using a rotation matrix, preserving the point cloud's geometric structure.

[0029] S2: Extract fast point feature histogram features and multi-scale roof geometry descriptor features from preprocessed point cloud data This paper generates an enhanced feature representation of roof geometry through a two-stage feature extraction process: first, fast point feature histogram (FPFH) features are extracted to capture local geometric information; then, multi-scale context is fused through the multi-scale roof geometry descriptor (MRGD) to generate global topology enhancement features. The specific steps are as follows: Specifically, the FPFH feature is used to capture the local geometric characteristics of the point cloud, providing basic features for the initial topological analysis of complex roofs. First, the neighborhood selection is performed, and for each point , determine the local neighborhood based on the k-nearest neighbor algorithm (recommended k=30) or radius search (recommended radius r=0.1m) Then the normal vector difference is calculated. and its neighboring points , calculate the normal vector angle 、 and distance . Histogram construction: 、 、 Quantized into a 33-dimensional FPFH feature vector (11×3). Finally, feature optimization is performed, fusing neighborhood histograms via weighted averaging. After obtaining a 33-dimensional FPFH feature vector for each point, to reduce feature dimensionality and speed up model training, only the five FPFH feature vectors with the largest variance are retained as the final output.

[0030] This paper addresses the limitations of the Fast Point Feature Histogram (FPFH) in describing the complex multi-scale structural characteristics of roof point clouds. It proposes a Multi-Scale Roof Geometry Descriptor (MRGD) to efficiently capture geometric features such as sharp edges, flat areas, and subtle height variations on rooftops. While FPFH can effectively extract local variations in point cloud surfaces, it often falls short in expressing the multi-scale topological characteristics of complex rooftops (such as edges, flat areas, and height transitions), making it difficult to meet the requirements of high-precision reconstruction. MRGD fully utilizes the spatial structure of 3D point clouds by integrating curvature contrast, height variance contrast, and spectral feature contrast to generate a robust geometric descriptor. This significantly improves the performance of subsequent tasks such as corner segmentation and edge classification.

[0031] MRGD feature extraction for point clouds Conduct, among which Indicates the The three-dimensional coordinates of the points, is the total number of points in the point cloud. The MRGD feature is represented as a three-dimensional vector , corresponding to curvature comparison, height variance comparison and spectral feature comparison, respectively, are generated through multi-scale neighborhood analysis. The present invention adopts a dual-scale neighborhood strategy to capture local and global geometric information at the same time. For each point , construct a small-scale neighborhood using the k-nearest neighbor algorithm (Neighborhood points ) and large-scale neighborhood (Neighborhood points ) to extract geometric features at different scales.

[0032] Curvature contrast feature It is used to quantify local surface changes by comparing curvature estimates at different scales. First, the normal vector estimation function of Open3D is used based on the kd tree search (with parameters and ) Calculate the normal vectors of small-scale and large-scale neighborhoods and The curvature at each scale and The standard deviation of the projection distance from the neighborhood point to the normal vector is calculated using the following formula:

[0033] in, represents the standard deviation, Used to normalize the curvature to [0, 1]. The curvature contrast is defined by Gaussian kernel weighting:

[0034] in, Controls contrast sensitivity. This feature effectively distinguishes between sharp edges and flat areas of rooftops.

[0035] High variance contrast features It is designed to capture height differences across scales and is particularly useful for identifying roof edges and flat areas. , the height variance is obtained by calculating the standard deviation of the z coordinates within the neighborhood:

[0036] The height variance comparison is weighted by Gaussian kernel:

[0037] This design highlights local height changes through multi-scale comparison, while suppressing noise interference, thereby improving the robustness of slope analysis.

[0038] Spectral feature comparison The structural connectivity of the encoded point cloud is analyzed by graph analysis. For small-scale and large-scale neighborhoods and , respectively construct the adjacency matrix and (Based on edge index and ), and calculate the degree matrix and , thus obtaining the Laplace matrix and . Solved by sparse eigenvalue decomposition and The smallest non-zero eigenvalue of and , the calculation formula is:

[0039] in, and They are and The eigenvector corresponding to the smallest non-zero eigenvalue of . The spectral feature contrast is defined as:

[0040] This feature enhances the global structure expression of point clouds through topological analysis.

[0041] Final MRGD characteristics Aggregated into a three-dimensional vector for each point. To ensure scale independence, the present invention performs minimum-maximum normalization on the feature vector:

[0042] in, Avoid division by zero errors. The normalized features improve compatibility with deep learning models and enhance feature robustness. The MRGD feature comprehensively describes the multi-scale geometric and topological properties of roof point clouds in a compact and efficient manner, providing reliable support for high-precision wireframe reconstruction.

[0043] S3: Fuse the fast point feature histogram features and multi-scale roof geometry descriptor features to obtain point-by-point features Specifically, in point cloud-based roof wireframe reconstruction, feature fusion is a key step in ensuring the seamless integration of local geometric details and multi-scale structural features, especially addressing the challenges of point cloud noise and sparsity. To this end, this paper proposes a hypergraph attention fusion (HAF) module to fuse fast point feature histogram (FPFH) features with multi-scale roof geometry descriptor (MRGD) features into a robust feature representation. The HAF module describes the neighborhood connectivity of point clouds by constructing a hypergraph model and adopts a dual attention mechanism for feature optimization: the intra-feature attention mechanism enhances the local consistency of each feature type by focusing on the key neighborhood points; the inter-feature attention mechanism promotes the mutual enhancement of FPFH and MRGD, connecting local geometry with the global structural domain, thereby improving the completeness and robustness of feature representation.

[0044] HAF module processes input point cloud coordinates , FPFH features and MRGD characteristics ,in Indicates the batch size, Represents the number of points. The input features are mapped to a shared embedding space through a linear layer with a dimension of , generate embedded FPFH features and MRGD characteristics The present invention is based on the Euclidean distance of point cloud coordinates and constructs the hyperedge of the hypergraph through the k-nearest neighbor algorithm: for FPFH features, the number of neighborhood points is used Connect local geometric neighborhoods; for MRGD features, the number of neighborhood points is used Associate with a wider structural area and generate the corresponding edge index and This multi-scale connection method reflects the hierarchical nature of roof features, from subtle edges to broad planes, providing structural support for feature fusion. The intra-feature attention mechanism first optimizes FPFH and MRGD features within their respective hypergraphs. For FPFH features, the query ,key Sum , and generate the attention score by the following formula:

[0045] Then the polymerization Similarly, for the MRGD feature, the query ,key Sum , generate the attention score:

[0046] And aggregate to get This mechanism enhances the local consistency of each feature by focusing on the most representative neighborhood points.

[0047] The inter-feature attention mechanism further optimizes the mutual optimization of FPFH and MRGD. For the enhancement from FPFH to MRGD, the query is calculated. ,key Sum , generate the attention score:

[0048] and get For the enhancement from MRGD to FPFH, calculate the query ,key Sum , generate the attention score:

[0049] and get The final fusion feature is concatenated Generate and map to the output dimension through two linear layers , to support subsequent tasks. The dual attention design of the HAF module significantly improves the quality and robustness of feature representation, providing efficient support for roof wireframe reconstruction.

[0050] S4: Extract point-by-point features and then classify them through the classification head to obtain candidate corner clusters.

[0051] After obtaining fused features through the hypergraph attention fusion module, the present invention further extracts point-by-point features to achieve candidate corner detection. To this end, the advanced point cloud processing framework Point Transformer v3 (PTv3) is employed. Designed with efficiency and scalability at its core, this framework emphasizes simplicity and performance optimization. This framework significantly improves feature extraction through scalable processing, making it more practical than complex model designs.

[0052] Subsequently, the present invention assigns labels for the candidate corner point classification and regression tasks. In the classification task, for each true corner point, a radius of The points in the spherical neighborhood are marked as positive samples (i.e., candidate corner points) and assigned a label value of 1, while other points are marked as negative samples (i.e., non-candidate corner points) and assigned a label value of 0. This process can be expressed by the following formula:

[0053] in, Indicates a point The binary label, is a corner point in the set of true corner points, represents the Euclidean distance.

[0054] In the regression task, the present invention calculates the offset of each candidate corner point to its nearest real corner point, along 、 、 Axis is calculated separately and the spherical neighborhood radius is calculated by Normalization is performed to ensure scale independence, thereby providing continuous target values ​​for the regression task. The offset target of the candidate corner point is defined as follows:

[0055] in, Indicates a point The normalized offset vector of For distance The nearest true corner point. This design enables the model to simultaneously predict the probability of a point being a corner point and its precise displacement to the true corner point, thereby achieving robust candidate corner point detection and optimization.

[0056] To complete the classification and regression tasks of candidate corner point detection, this paper designs two independent task heads to process point-by-point features. The classification task head takes the point-by-point feature vector as input and outputs a binary label: a value of 1 indicates that the point is predicted to be a candidate corner point, and a value of 0 indicates that it is not a candidate corner point. At the same time, the regression task head processes the same point-by-point features and predicts an offset vector, which represents the displacement of each point to its nearest true corner point. This offset vector is proportional to the original value of the candidate corner point. The coordinates are added and their positions are adjusted to make them closer to the real corner positions. Thus, the roof point cloud is organized into several corner point clusters, which provide the basis for subsequent refinement and wireframe reconstruction.

[0057] S5: Use the DBSCAN algorithm to cluster the candidate corner point clusters, take each cluster center as the initial inflection point, correct the position of the initial inflection point through the inflection point correction network, and generate the predicted inflection point.

[0058] Specifically, after processing the original roof point cloud through the candidate corner detection stage, the present invention obtains several candidate corner clusters, each cluster representing a potential corner point. To accurately extract these corner points, the DBSCAN algorithm is first used to segment the candidate corner clusters. DBSCAN is a density-based unsupervised clustering method that relies on two key parameters: neighborhood radius and and the minimum number of points required to form a cluster The algorithm can identify clusters of arbitrary shapes without pre-defining the number of clusters. It is robust to noise and outliers and is particularly well-suited for handling the irregular distribution characteristics commonly found in rooftop point clouds. After segmentation, the centroid of each cluster is used as the initial detection corner point.

[0059] However, because DBSCAN uses an unsupervised approach, the initial corner positions may deviate from their true locations. To address this issue, we design a corner refinement network to accurately learn the corner positions. This network leverages PointNet++'s multi-scale aggregate abstraction (SA) module to aggregate multi-scale contextual information from the local neighborhood of the initial corner points and extract features. These features are then fed into a regression task head to learn the offsets from the initial corner points to their corresponding true locations. The regression task head outputs a three-dimensional offset vector, which corrects the initial corner positions to align them with the true corner positions, significantly improving the accuracy of corner extraction in roof wireframe reconstruction.

[0060] S6: Reconstruct the building roof wireframe by learning the topological relationship between the predicted inflection points through the edge classification network Specifically, this module aims to predict whether the refined corner pairs extracted from the point cloud correspond to valid edges of the building structure. To achieve robust edge classification, this paper proposes a novel neural network architecture to simultaneously capture the local geometric relationship and global contextual dependency between the refined corner points. The main goal of edge classification is to classify the edges formed by the refined corner pairs, where each corner point is associated with a high-dimensional feature vector obtained from the previous feature extraction stage. Formally, given a set of refined corner points and its corresponding feature vector set ,in Represents the feature dimension. The goal of this invention is to provide each corner point pair Predict a binary label to indicate whether edges exist in the building structure.

[0061] The local geometric relationships between corner pairs are crucial in edge classification because they contain the spatial proximity and structural consistency required to identify valid edges. To this end, this paper uses EdgeConv operations to capture the spatial relationships and feature differences between connection points and learn edge-specific geometric patterns, thereby enhancing the discriminative power of feature representation. and its eigenvector , the EdgeConv layer calculates edge features , to encode the relationship between corner pairs. Specifically, edge features are generated by concatenating feature vectors and processing them through a series of one-dimensional convolutional layers. The EdgeConv layer is applied to all possible corner pairs in the batch to generate a set of edge features. These edge features encode local geometric information, such as the relative orientation and distance between corner points, which are crucial for distinguishing valid edges from invalid edges.

[0062] While local geometric features are effective in capturing pairwise relationships, understanding global contextual dependencies is also necessary for edge classification in building reconstruction. To model these long-range dependencies, we integrate a Transformer-based layer that uses its self-attention mechanism to capture the interactions between all refined corner pairs. This design enables the network to contextualize local edge predictions within the global building structure, thereby improving the overall accuracy and consistency of the reconstruction model. The Transformer layer uses the standard Transformer encoder layer architecture to process the edge feature set generated by the EdgeConv layer. , treating each edge feature as a token in the sequence. This layer updates the edge features through a multi-head self-attention mechanism so that each Ability to dynamically interact with other edge features in the collection.

[0063] Although the Transformer layer effectively captures global dependencies, it may weaken the focus on specific pairwise interactions, which are crucial for accurate edge classification. To address this limitation, this paper introduces the Pairwise Point Attention (PPA) module, which optimizes and refines the feature representation of corner pairs by directly applying the attention mechanism to the concatenated features of corner pairs. This module uses the original feature vectors of corner pairs as the As input, we compute the attention-enhanced feature representation. First, we form a joint representation by adding the features: This joint representation is then processed through two parallel attention branches, each of which contains a sequence of linear layers, batch normalization, ReLU activations, and sigmoid activations to generate attention weights and These weights are used to re-weight the original features to generate attention-enhanced features:

[0064] Finally, the enhanced features are concatenated along the channel dimension and fused through a max pooling operation to generate the output features. Furthermore, the multi-scale fusion module gradually integrates the multi-scale input feature representations through a series of linear transformations, concatenating cross-scale features and enhancing the geometric expression capabilities of point cloud processing.

[0065] Table 1 Parameter explanation

[0066] like Figure 2 As shown, the present invention provides a point cloud-based urban building roof wireframe reconstruction system, comprising: Data processing module: used to obtain building roof point cloud data and perform preprocessing; Extraction module: used to extract fast point feature histogram features and multi-scale roof geometry descriptor features from preprocessed point cloud data; Fusion module: used to fuse the fast point feature histogram features and the multi-scale roof geometry descriptor features to obtain point-by-point features; Classification module: used to extract point-by-point features and then obtain candidate corner clusters through classification head; Prediction module: used to cluster candidate corner point clusters using the DBSCAN algorithm, taking each cluster center as the initial inflection point, correcting the position of the initial inflection point through the inflection point correction network, and generating predicted inflection points; Reconstruction module: used to learn the topological relationship between the predicted inflection points through the edge classification network and reconstruct the building roof wireframe.

[0067] An embodiment of the present invention provides a terminal device. The terminal device of this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of each of the aforementioned method embodiments are implemented. Alternatively, when the processor executes the computer program, the functions of each module / unit in each of the aforementioned device embodiments are implemented.

[0068] The computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to accomplish the present invention.

[0069] The terminal device may be a computing device such as a desktop computer, a notebook computer, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0070] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0071] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the terminal device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.

[0072] If the module / unit integrated in the terminal device is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention can implement all or part of the process steps in the above-mentioned method embodiments by instructing the relevant hardware through a computer program. The 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 computer program includes computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard drive, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content of the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electric carrier signal and telecommunication signal.

[0073] Although the embodiments of the present invention have been described above with reference to the accompanying drawings, the present invention is not limited to the above-mentioned specific embodiments and application fields. The above-mentioned specific embodiments are merely illustrative and instructive, and are not restrictive. A person skilled in the art, guided by the description, may devise various forms without departing from the scope of protection of the claims of the present invention, all of which fall within the scope of protection of the present invention.

Claims

1. A method for reconstructing urban building roof wireframes based on point cloud, characterized in that: include: Obtain building roof point cloud data and perform preprocessing; Extract fast point feature histogram features and multi-scale roof geometry descriptor features from the preprocessed point cloud data; The fast point feature histogram features and multi-scale roof geometry descriptor features are fused to obtain point-by-point features; Extract point-by-point features and then obtain candidate corner clusters through classification head classification; Use the DBSCAN algorithm to cluster the candidate corner point clusters, take each cluster center as the initial inflection point, and use the inflection point correction network to correct the position of the initial inflection point to generate the predicted inflection point; The topological relationship between the predicted inflection points is learned through the edge classification network to reconstruct the building roof wireframe.

2. The method for reconstructing urban building roof wireframes based on point cloud according to claim 1, characterized in that: The pretreatment includes: The building roof point cloud data is sampled and processed. For point clouds with point number N > 2048, a random downsampling algorithm is used to randomly select 2048 points from N points to retain the overall geometric characteristics of the point cloud. For point clouds with point number N < 2048, a random repeated sampling algorithm is used to randomly select points from N points until the number of points reaches 2048 to ensure the consistency of the input scale. Then, Gaussian noise enhancement and random rigid transformation are performed on the sampled point cloud.

3. The method for reconstructing urban building roof wireframes based on point cloud according to claim 1, characterized in that: The steps for extracting fast point feature histogram features from preprocessed point cloud data are as follows: Determine the local neighborhood range of the target point through the nearest neighbor algorithm; Calculating a normal vector spatial relationship feature set between the target point and each neighboring point, including a normal vector angle feature, a curvature difference feature, and a spatial distance feature; quantizing the spatial relationship feature set into a multidimensional histogram vector; Adopting a neighborhood weighted fusion strategy to optimize the multidimensional histogram vector; The multidimensional histogram vector is subjected to dimensionality reduction processing through a feature selection mechanism, the feature dimension with the highest discrimination is retained, and fast point feature histogram features are obtained.

4. The method for reconstructing urban building roof wireframes based on point cloud according to claim 1, characterized in that: The steps for extracting multi-scale roof geometry descriptor features from the pre-processed point cloud data are as follows: A dual-scale neighborhood strategy is used to capture the local and global geometric information of the point cloud, and then the k-nearest neighbor algorithm is used to extract geometric features at different scales. Extract curvature contrast features, height variance contrast features and spectral feature contrast features based on geometric characteristics at different scales; The curvature contrast feature, the height variance contrast feature and the spectrum feature contrast feature are spliced ​​to generate a composite geometric description vector; The composite geometric description vector is normalized to obtain multi-scale roof geometric descriptor features.

5. The method for reconstructing urban building roof wireframe based on point cloud according to claim 1, characterized in that: The steps for fusing the fast point feature histogram features and the multi-scale roof geometry descriptor features to obtain point-by-point features are as follows: According to the fast point feature histogram features and the multi-scale roof geometry descriptor features, the self-attention weighted value vector of the fast point feature histogram features, the self-attention weighted value vector of the multi-scale roof geometry descriptor features, the cross-attention weighted value vector from the fast point feature histogram features to the multi-scale roof geometry descriptor features, and the cross-attention weighted value vector from the multi-scale roof geometry descriptor features to the fast point feature histogram features are obtained, and the above vectors are spliced ​​to obtain point-by-point features.

6. The method for reconstructing urban building roof wireframes based on point cloud according to claim 1, characterized in that: The steps of extracting point-by-point features and then obtaining candidate corner clusters through classification heads are as follows: Point-by-point feature extraction is performed based on the Point Transformer v3 framework. Based on the extracted data, for the classification and regression tasks of candidate corner points, a spherical neighborhood with a radius of r centered on the true corner point is first defined. The points in the neighborhood are screened as positive samples through Euclidean distance, and the rest are negative samples to achieve binary classification label assignment. At the same time, the three-dimensional offset from the positive sample point to the nearest true corner point is calculated and normalized with the radius r as the regression target to ensure scale invariance of displacement prediction. On this basis, two independent task heads are designed. The classification head predicts the probability of candidate corner points based on point-by-point features and screens potential corner point positions. The regression head predicts a normalized offset vector based on the same features and superimposes the offset with the original coordinates of the candidate corner point cluster to optimize its spatial position to approach the true corner point. The classification head coarsely screens the candidate area, and the regression head fine-tunes the position. Finally, the roof point cloud is organized into candidate corner point clusters.

7. The method for reconstructing urban building roof wireframes based on point cloud according to claim 1, characterized in that: Use the DBSCAN algorithm to cluster the candidate corner points, take each cluster center as the initial inflection point, and use the inflection point correction network to correct the position of the initial inflection point. The specific steps to generate the predicted inflection point are as follows: The candidate corner clusters are segmented using the DBSCAN algorithm to identify corner clusters of arbitrary shapes and suppress noise, and the centroid of each cluster is extracted as the initial corner point; To address the corner position deviation that may be caused by DBSCAN unsupervised segmentation, a corner refinement network is further designed to aggregate multi-scale contextual features from the local neighborhood of the initial corner points. The regression task head then learns the three-dimensional offset vector from the initial corner point position to the real corner point, superimposes the offset to the initial coordinates, corrects the corner point position to align it with the real geometry, and generates the predicted corner point.

8. A point cloud-based urban building roof wireframe reconstruction system, characterized by: include: Data processing module: used to obtain building roof point cloud data and perform preprocessing; Extraction module: used to extract fast point feature histogram features and multi-scale roof geometry descriptor features from preprocessed point cloud data; Fusion module: used to fuse the fast point feature histogram features and the multi-scale roof geometry descriptor features to obtain point-by-point features; Classification module: used to extract point-by-point features and then obtain candidate corner clusters through classification head; Prediction module: used to cluster candidate corner point clusters using the DBSCAN algorithm, taking each cluster center as the initial inflection point, correcting the position of the initial inflection point through the inflection point correction network, and generating predicted inflection points; Reconstruction module: used to learn the topological relationship between the predicted inflection points through the edge classification network and reconstruct the building roof wireframe.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for reconstructing urban building roof wireframe based on point cloud as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for reconstructing urban building roof wireframes based on point cloud as described in any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Three-dimensional model reconstruction method and device for building roof, storage medium and computer equipment

    CN122199833A

  • Methods, devices, storage media, and computer equipment for reconstructing 3D models of building roofs

    CN122199833B

  • Point cloud semantic segmentation method and system based on multi-scale feature fusion and attention mechanism

    CN122336305A

  • A point cloud semantic segmentation method and system based on multi-scale feature fusion and attention mechanism

    CN122336305B