Roof geometry and semantic feature joint extraction method, electronic device and storage medium

By combining the geometric and semantic features of the roof with the α-Shape algorithm and the Delaunay triangulation acceleration mechanism, we have achieved efficient and accurate extraction of roof feature corner points and contour lines. This solves the problem of low efficiency in roof point cloud data processing in existing technologies and meets the accuracy requirements of LoD2 level building 3D modeling.

CN122156668APending Publication Date: 2026-06-05SHANGHAI URBAN CONSTR VOCATIONAL COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI URBAN CONSTR VOCATIONAL COLLEGE
Filing Date
2026-02-05
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies are inefficient at extracting feature corner points of building tops from rooftop point cloud data, especially when processing large-scale urban point cloud data, where the computational load is too high and cannot meet the needs of practical applications.

Method used

A method combining roof geometric and semantic features is adopted, including roof point cloud facet fitting, α-Shape algorithm combined with Delaunay triangulation acceleration mechanism, adaptive corner detection and bidirectional geometric verification. Through Gaussian smoothing denoising, boundary line segment fitting and line segment intersection verification, the accurate extraction of feature corners and contour lines is achieved.

Benefits of technology

It improves the efficiency of obtaining building top feature corner points from roof point cloud data, outputs higher precision contour lines and roof feature corner points, and meets the accuracy requirements of LoD2 level building 3D modeling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156668A_ABST
    Figure CN122156668A_ABST
Patent Text Reader

Abstract

The application discloses a method for extracting roof geometry and semantic features, an electronic device and a storage medium, and relates to the technical field of computing; the method comprises the following steps: S1, roof point cloud surface fitting; S2, accelerating initial extraction of the boundary by using alpha-shape and Delaunay triangular net, wherein the alpha value is reversely and adaptively adjusted according to the local point cloud density in the alpha-shape algorithm; S3, Gaussian smoothing denoising; S4, adaptive corner point detection; S5, boundary line segment fitting, bidirectional geometry verification and accurate extraction. The core logic is initial extraction-optimization-accurate extraction, the acceleration calculation and geometry verification mechanism are integrated, the combination of reversely and adaptively adjusting the alpha value and the Delaunay triangular net reduces the calculation redundancy, improves the working efficiency of obtaining the building top feature corner points from the roof point cloud data, and can output higher-precision contour lines and roof feature corner points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computing technology, and in particular to a method, electronic device, and storage medium for the joint extraction of roof geometric and semantic features. Background Technology

[0002] Accurate extraction of point cloud roof information is of great significance in areas such as emergency rescue escape route design, protection and restoration of historical buildings and cultural anomalies, and research on the potential of rooftop photovoltaics. However, rooftops come in a variety of forms and have complex and diverse structures, and point cloud data is irregularly distributed, making it difficult to process with a unified algorithm or model. Furthermore, differences in the resolution and density of point cloud data can also affect the accurate capture of detailed rooftop features.

[0003] Since the widespread adoption of 3D laser scanning technology in the surveying and mapping field, research on automatically extracting semantic information from building roofs based on point clouds has gradually become a hot topic, and various effective algorithms have been explored. Li Liang et al. (2016) proposed extracting roof information based on airborne laser point clouds, determining ground elevation according to DTM, and setting elevation thresholds. However, this method has a low accuracy rate and suffers from many omissions. Zhao Chuan (2017) proposed two methods for extracting roof point cloud information: one based on normal vector density clustering and the other using point cloud neighborhood information. The former solves the problem of incomplete point cloud information extraction at the ridge line in the RANSAC algorithm using point cloud normal vectors and distance weighting, but it is not complete for information extraction near the ridge line where point clouds are relatively sparse. The latter is based on the former, performing neighborhood expansion and patch verification to reduce the proportion of omissions and errors. Zhu Qin et al. (2018) used the Canny operator to extract roof edges from aerial images and then combined it with point clouds for edge optimization, resulting in better edge information. Huo et al. (2019) sorted out the common problems and solutions in the process of roof information extraction, as well as the impact of different methods on the results, and formed a universal technical system.

[0004] In urban 3D modeling, a large amount of point cloud data needs to be processed, which places high demands on the efficiency and real-time performance of roof point extraction algorithms. Traditional algorithms may perform well when processing small-scale data, but when faced with large-scale urban point cloud data, the computational load is too large and the processing time is too long, which cannot meet the needs of practical applications.

[0005] Therefore, the low efficiency of extracting characteristic corner points of building tops from rooftop point cloud data has become a pressing technical problem that needs to be solved. Summary of the Invention

[0006] This invention provides a method, electronic device, and storage medium for the joint extraction of roof geometric and semantic features, solving the technical problem of low efficiency in extracting feature corner points of the building top from roof point cloud data.

[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:

[0008] A method for jointly extracting roof geometric and semantic features includes the following steps:

[0009] Step S1: Perform facet fitting on the roof point cloud to obtain the point set of each plane of the roof, thus obtaining the initial plane point set;

[0010] Step S2: Combining the Delaunay triangulation acceleration mechanism, the initial boundary point set of the roof is obtained from the initial planar point set through the α-Shape algorithm. In the α-Shape algorithm, the α value is adaptively adjusted in reverse according to the local point cloud density.

[0011] Step S3: Obtain the smoothed boundary point set by Gaussian smoothing and denoising the initial boundary point set;

[0012] Step S4: Based on the adaptive corner detection algorithm, from the smoothed boundary point set The detection process yields a candidate set of corner points;

[0013] Step S5: Fit the smoothed boundary point set to the boundary line segments to obtain ordered straight line segments that conform to the structural logic of the roof building, forming an ordered straight line segment set; extract the roof feature corner points and roof outline from the ordered straight line segment set through a two-way geometric mechanism of straight line segment intersection verification + outline topology consistency verification.

[0014] A further technical solution is as follows: In step S2, the steps of the Delaunay triangulation acceleration mechanism include: projecting each plane point set of the roof obtained in step S1 onto a two-dimensional plane to construct a Delaunay triangulation, with the outer boundary of the Delaunay triangulation as the starting calculation area; in the α-Shape algorithm, the α value is set as the adaptive range of the average distance between points in the roof point cloud, and α is a dynamic value. During the calculation process, the α value is adaptively adjusted in reverse according to the local point cloud density.

[0015] A further technical solution is that step S4 is specifically divided into the following steps:

[0016] Step S401: Employ a multi-scale adaptive neighborhood algorithm to support the region radius. From the smoothed boundary point set Extract the support region point set of the boundary points. ;

[0017] Step S402: Set the support region points The curvature k of the boundary points is calculated using the three-point concyclic method.

[0018] Step S403: Set curvature threshold With the range of varicose angle threshold When the boundary points satisfy And varicose angle At that time, candidate corner points are obtained, forming a corner point candidate set. .

[0019] A further technical solution is as follows: In step S5, the step of fitting the smoothed boundary point set with boundary line segments to obtain ordered straight line segments that conform to the structural logic of the roof building, forming an ordered set of straight line segments, is step S501. Step S501 specifically includes the following steps.

[0020] Step S5011: Using the candidate corner point set as the segmentation node, segment the smoothed boundary point set according to the spatial order of the boundary points, and segment adjacent candidate corner points. and All boundary points between them are divided into an independent set of line segment points S. i Obtain all the point sets of the line segments;

[0021] Step S5012: For each line segment point set S i The planar least squares method is used to fit the line to obtain the set of line segment points S. i The corresponding fitted line segment ;

[0022] Step S5013: Based on the set fitting error threshold For each fitted line segment Perform quality verification to obtain all fitted line segments that pass the quality verification.

[0023] Step S5014: Arrange all the fitted line segments that have passed the quality verification in spatial order according to the corresponding line segment point set to obtain an ordered set of line segments.

[0024] A further technical solution is that, in step S5013, for each fitted straight line segment... The steps for conducting quality verification include the following:

[0025] Step S50131: Calculate the line segment point set S i All points to the fitted line segment average distance and maximum distance ;like and If the fitting error meets the fitting error threshold, the fitting is considered valid, and the fitted line segment is retained. Otherwise, it is assumed that the fitting error exceeds the fitting error threshold, and step S50132 is executed.

[0026] Step S50132: If the fitting error exceeds the fitting error threshold, then the line segment point set S i Split into two subsets based on the midpoint. and Repeat step S50131 above for fitting and verification until the fitting error of all sub-point sets meets the fitting error threshold requirement.

[0027] A further technical solution is as follows: In step S5, the step of extracting the roof feature corner points and roof outline from the ordered set of line segments through a two-way geometric mechanism of line segment intersection verification + outline topology consistency verification is step S502. Step S502 is specifically divided into the following steps.

[0028] Step S5021: Based on the ordered set of straight line segments, the roof feature corner points are obtained by filtering through the intersection verification of straight line segments. The intersection verification of straight line segments includes intersection calculation, spatial distance constraint and redundancy intersection point deduplication. The intersection verification of straight line segments is the first-direction verification.

[0029] Step S5022: Obtain the roof outline based on the ordered set of straight line segments through outline topology consistency verification. The outline topology consistency verification includes directional consistency, elevation logic constraints and closure verification. The outline topology consistency verification is a second-dimensional verification.

[0030] A further technical solution is that step S502 further includes step S5023, which follows step S5022.

[0031] Step S5023: Classify the roof feature corner points obtained in step S5021 according to semantic categories to obtain roof corner points, ridge endpoints and parapet corner points, and extract the main outline and auxiliary structure outline from the roof outline obtained in step S5022.

[0032] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method for jointly extracting roof geometric and semantic features.

[0033] A storage medium, which is a computer-readable storage medium, stores a computer program that, when executed by a processor, implements the steps of the method for jointly extracting roof geometric and semantic features.

[0034] The beneficial effects of adopting the above technical solution are as follows:

[0035] A method for jointly extracting geometric and semantic features of a roof includes the following steps: S1: roof point cloud facet fitting; S2: initial boundary extraction using α-Shape and Delaunay triangulation, wherein the α-Shape algorithm adaptively adjusts the α value based on the local point cloud density; S3: Gaussian smoothing for noise reduction; S4: adaptive corner detection; and S5: boundary segment fitting, bidirectional geometric verification, and fine extraction. The core logic is initial extraction-optimization-fine extraction, incorporating accelerated computation and geometric verification mechanisms. The combination of adaptive α-value adjustment and Delaunay triangulation reduces computational redundancy, improves the efficiency of obtaining building top feature corner points from roof point cloud data, and can output higher-precision contour lines and roof feature corner points. Attached Figure Description

[0036] Figure 1 This is a flowchart of Embodiment 1 of the present invention;

[0037] Figure 2 This is a stage distribution diagram of Embodiment 1 of the present invention;

[0038] Figure 3a This is an analysis diagram of corner detection in this invention;

[0039] Figure 3b This is a distribution diagram of the boundary points in this invention;

[0040] Figure 4 This is an analysis diagram of the boundary line segment fitting in this invention;

[0041] Figure 5 This is an analysis diagram of the line segment intersection verification in this invention;

[0042] Figure 6 This is an image of the point cloud from the airborne lidar in the test area of ​​this invention;

[0043] Figure 7 This is an image of the roof outline and corner points in this invention. Detailed Implementation

[0044] This application combines the α-shape algorithm with an adaptive corner detection algorithm to achieve accurate extraction of feature corners and contours of roofs, providing support for LOD2 level 3D building modeling.

[0045] Specifically, the α-Shape+SIFT hybrid feature detection framework proposed in this application uses initial extraction-optimization-refined extraction as its core logic, integrating the ordered boundary extraction advantage of the α-Shape algorithm with the scale / rotation invariance of the SIFT algorithm, and incorporating accelerated computation and geometric verification mechanisms. First, the roof point cloud is faceted and fitted to obtain an initial set of planes; second, the α-Shape algorithm is used to perform initial boundary extraction, combined with Delaunay triangulation to reduce computational redundancy; then, Gaussian smoothing and denoising are used to optimize boundary quality; next, the SIFT algorithm is used to detect corner points; finally, through line fitting and intersection verification, high-precision contour lines and roof feature corner points are output. The specific implementation of this framework includes three core stages: initial boundary extraction, hybrid feature detection, and bidirectional geometric verification.

[0046] 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. The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this application or its application or use. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0047] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, this application may also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the spirit of this application. Therefore, this application is not limited to the specific embodiments disclosed below.

[0048] Example 1:

[0049] like Figure 1 As shown, this invention discloses a method for jointly extracting roof geometric and semantic features, comprising the following steps:

[0050] Step S1: Roof point cloud facet fitting.

[0051] The roof point cloud is subjected to facet fitting to obtain the point set of each plane of the roof, thus obtaining the initial plane point set. Details are as follows.

[0052] Faceted fitting: Each point is assigned a plane label (plane ID) indicating which fitted plane the point belongs to. The set of all points on a plane of the roof forms the plane point set of the roof. The output can be a labeled point cloud (each point + label), or multiple subsets of point clouds, each subset corresponding to a plane.

[0053] Step S2: Use α-Shape and Delaunay triangulation to accelerate the initial boundary extraction.

[0054] Combining the Delaunay triangulation acceleration mechanism, the initial boundary point set of the roof is obtained from the initial planar point set through the α-Shape algorithm. In the α-Shape algorithm, the α value is adaptively adjusted in reverse according to the local point cloud density.

[0055] The steps of the Delaunay triangulation acceleration mechanism include: projecting each plane point set of the roof obtained in step S1 onto a two-dimensional plane to construct a Delaunay triangulation, with the outer boundary of the Delaunay triangulation as the starting calculation region. In the α-Shape algorithm, the α value is set as an adaptive range of the average distance between points in the roof point cloud. α is a dynamic value rather than a fixed value, and the α value is adaptively adjusted in reverse according to the local point cloud density during the calculation process. Details are as follows.

[0056] A dynamic α-value adjustment method for initial boundary extraction: Initial boundary extraction is the foundation for subsequent accurate feature extraction. This application addresses the feature loss or over-extraction problem caused by fixed parameters in the traditional α-Shape algorithm by designing a dynamic α-value adjustment strategy and integrating Delaunay triangulation to achieve acceleration.

[0057] Dynamic α-value adjustment strategy design: The α-value is a key parameter of the rolling circle in the α-Shape algorithm, directly affecting the completeness and precision of boundary extraction. This application sets the α-value to an adaptive range of the average distance between points, rather than a fixed value, as shown in the following formula.

[0058] (1)

[0059] In (1), The average distance between points in the rooftop cloud. The adjustment coefficients can be flexibly adapted to the point cloud density and the complexity of the roof structure.

[0060] The dynamic adjustment logic of the α value is adapted in reverse to the local density of the point cloud and the complexity of the roof structure. The specific adjustment rules and principles are as follows.

[0061] The core association logic α represents the radius of the rolling circle in the α-Shape algorithm, and its value is inversely proportional to the local density of the point cloud and the complexity of the roof structure. High point cloud density and complex roof structure (such as sharp features like multi-sloped roof corners and ridges) → Decrease the α value: The rolling circle radius becomes smaller, better fitting the local fine structure and preventing sharp features from being smoothly lost. Low point cloud density and simple roof structure (such as large flat roof areas) → Increase the α value: The rolling circle radius becomes larger, connecting sparse point clouds and avoiding the extraction of fragmented, redundant boundaries.

[0062] In the adaptation relationship with the average distance between points, the value of α is set as the average distance between points. The adaptive range is given by equation (1). For complex structural regions, the lower limit k1 is used, corresponding to a smaller α value, to preserve sharp features. For simple structural regions, the upper limit k2 is used, corresponding to a larger α value, to ensure boundary continuity.

[0063] The adjustment mechanism is not a globally synchronized process, but rather a region-by-region adaptation based on the local area partitioned by the Delaunay triangulation. During calculation, local point cloud regions are first partitioned, and then the optimal α value is selected within a set range based on the density and structural characteristics of each region.

[0064] For example: The dynamic adjustment of the value is inversely adapted to the local density of the point cloud and the complexity of the roof structure, with a value range of... .

[0065] This strategy can reduce the phenomenon of missing or over-raising the boundary while preserving the sharp features of the roof (such as the corners and the ends of the ridge), and at the same time improve the degree of automation.

[0066] Delaunay triangulation acceleration mechanism: While ensuring the level of detail, the number of point clouds involved in the calculation will be extremely large. In order to reduce the amount of computation, Delaunay triangulation is used to accelerate the calculation.

[0067] The planar point set obtained after facet fitting, i.e., the 3D point cloud, is projected onto a 2D plane to construct a Delaunay triangulation. The outer boundary of the triangulation is used as the starting calculation region to avoid global traversal. During the calculation, the α value is adaptively adjusted according to the local point cloud density to further reduce redundant calculations. The implementation process is as follows.

[0068] Given a point P(X,Y) in a set of points, its position in the grid is:

[0069] (2)

[0070] In equation (2), R is the row number of point P, and G s The size of the hole in the point concentration can be limited by setting an adjustment coefficient, G. s The range of values ​​for .

[0071] (3)

[0072] In equation (3), C is the column number of point P.

[0073] This acceleration mechanism can significantly reduce the amount of computation, providing efficiency assurance for large-scale point cloud processing.

[0074] like Figure 2As shown, after step S1, roof point cloud facet fitting, and step S2, initial boundary extraction using α-Shape and Delaunay triangulation, the initial extraction is achieved, completing the first stage.

[0075] Step S3: Gaussian smoothing for noise reduction.

[0076] The initial boundary point set obtained in step S2 is then subjected to Gaussian smoothing to obtain a smoothed boundary point set. Details are as follows.

[0077] Boundary smoothing optimization: Gaussian smoothing is applied to the initial boundary point set extracted by the α-Shape algorithm for noise reduction. The discrete boundary points are treated as one-dimensional curves, and noise filtering is achieved through Gaussian convolution, as shown in the following formula:

[0078] (4)

[0079] In equation (4), For the initial set of boundary points, Let σ be the Gaussian kernel function, and σ be the smoothing coefficient. This is the smoothed set of boundary points.

[0080] This step can eliminate boundary jitter caused by point cloud noise and improve the accuracy of subsequent line fitting.

[0081] Step S4: Adaptive corner detection.

[0082] Based on the adaptive corner detection algorithm, from the smoothed boundary point set The corner candidate set is obtained through detection, as explained below.

[0083] SIFT Corner Detection Ensemble: The multi-scale adaptive neighborhood algorithm includes the application of the SIFT algorithm, based on a smoothed set of boundary points. Accurate corner detection is achieved by leveraging the scale and rotation invariance of the SIFT algorithm. The core of this method involves defining the support region, calculating curvature, and analyzing the curvature angle to filter out true corner points.

[0084] The specific process is explained below.

[0085] Step S401: Define the boundary point support region.

[0086] Employing a multi-scale adaptive neighborhood algorithm to support the region radius From the smoothed boundary point set Extract the support region point set of the boundary points. Details are as follows.

[0087] The supporting region serves as the carrier of local geometric features of the boundary points. To ensure the robustness of feature extraction, a multi-scale adaptive neighborhood design is adopted: using the boundary points... Centered on, supporting area radius It is adaptively determined by the local point cloud density.

[0088] (5)

[0089] In equation (5), To support the radius of the region, for The average distance between local points on the fitted plane of the roof. This is the local scaling factor.

[0090] like Figure 3a As shown, within the aforementioned radius range, filtering and Points belonging to the same fitted plane constitute the support region point set, denoted as . .

[0091] Step S402: Boundary point curvature calculation.

[0092] For the support region point set The curvature k of the boundary points is calculated using the three-point concyclic method. Details are as follows.

[0093] Curvature reflects the degree of local bending at boundary points and is a core indicator for corner point identification. Combining the discrete characteristics of point clouds with the multi-scale advantages of SIFT, the three-point concircle method is used for calculation.

[0094] First, define the curvature angle: using the boundary point... As the vertex, take the adjacent boundary points within the supporting region. , Construct vectors Varicose angle Calculated using vector dot product.

[0095] (6)

[0096] In equation (6), The vector dot product has a range of values. .

[0097] To eliminate the influence of point cloud rotation on the calculation results, the principal orientation angle of the support region detected by SIFT is combined. The direction of the vector is corrected.

[0098] (7)

[0099] Recalculate the varistance angle after correction. This ensures the rotation invariance of the results.

[0100] Based on the aforementioned curvature angle, the support region point set ,pass , , The curvature is solved using the osculating circle determined by three points:

[0101] (8)

[0102] In equation (8), for curvature at that point The radius of curvature is calculated from the radius of the osculating circle determined by the three points.

[0103] (9)

[0104] In equation (9), for and Euclidean distance, for and Euclidean distance, for and Euclidean distance, for The area is determined by the cross product of vectors. calculate.

[0105] Combining the multi-scale spatial characteristics of SIFT, calculation Curvature at different scales, corresponding to the radius of the support region The average value is taken as the final curvature to avoid misjudgment of corner points caused by single-scale error.

[0106] Step S403: Corner Filtering.

[0107] like Figure 3b As shown, set the curvature threshold. With the range of varicose angle threshold When the boundary points satisfy And varicose angle At that time, candidate corner points are obtained, forming a corner point candidate set. Details are as follows.

[0108] Set curvature threshold With the range of varicose angle threshold When the boundary points satisfy And varicose angle When the condition is met, it is determined to be a candidate set of corner points, and after subsequent geometric verification, it is output as the final corner point.

[0109] like Figure 2 As shown, after step S3 Gaussian smoothing for noise reduction and step S4 adaptive corner detection, optimization is achieved, and the second stage is completed.

[0110] α-Shape+SIFT Hybrid Feature Detection Mechanism: To address the issue that a single algorithm cannot simultaneously ensure boundary integrity and corner accuracy, a hybrid feature detection mechanism is constructed based on step S2 using α-Shape and Delaunay triangulation to accelerate initial boundary extraction and step S4 using adaptive corner detection, thus fully leveraging the complementary advantages of the two algorithms.

[0111] Step S5: Boundary segment fitting, two-way geometric verification and fine extraction.

[0112] The smoothed boundary point set is fitted with boundary line segments to obtain ordered straight line segments that conform to the structural logic of the roof building, forming an ordered straight line segment set; the roof feature corner points and roof outline are extracted from the ordered straight line segment set through a two-way geometric mechanism of straight line segment intersection verification + outline topology consistency verification.

[0113] Step S5 partitioning includes step S501 boundary segment fitting and step S502 bidirectional geometric verification and fine extraction, which are detailed below.

[0114] Step S501: Boundary segment fitting.

[0115] The smoothed set of boundary points is fitted with boundary line segments to obtain ordered straight line segments that conform to the structural logic of the roof building, forming an ordered set of straight line segments. The explanation is as follows.

[0116] Boundary segment fitting is a key step in realizing the structured extraction of roof contours. Its core objective is to transform the discrete set of smoothed boundary points into ordered straight line segments that conform to the structural logic of the roof building, thus providing a foundation for subsequent corner point extraction and contour topology verification.

[0117] Step S501 specifically includes the following steps:

[0118] Step S5011: Boundary point set segmentation.

[0119] Using the candidate corner point set as the segmentation node, the smoothed boundary point set is segmented according to the spatial order of the boundary points, and adjacent candidate corner points are segmented. and All boundary points between them are divided into an independent set of line segment points S. i This yields the set of all line segment points. Details are as follows.

[0120] like Figure 4 As shown, the corner candidate set obtained by the adaptive corner detection algorithm in step S4 As a segmentation node, for the smoothed continuous boundary point set Perform segmentation processing. Based on the spatial order of the boundary points, along the roof edge in a clockwise or counterclockwise direction, select adjacent corner points as candidates. and All boundary points between them are divided into an independent set of line segment points S. i ,Right now:

[0121] (10)

[0122] In equation (10), S i For the set of line segment points, "" indicates the order of boundary points along the roof edge, ensuring the line segment point set S i The continuous segments corresponding to the edge of the roof.

[0123] For a closed roof boundary where the ends are connected, supplement , The number of corner candidates is used to achieve full boundary coverage.

[0124] Step S5012: Least squares linear fitting.

[0125] For each line segment point set S i The planar least squares method is used to fit the line to obtain the set of line segment points S. i The corresponding fitted line segment .

[0126] Step S5013: Fit quality control.

[0127] Based on the set fitting error threshold For each fitted line segment Perform quality verification to obtain all fitted line segments that pass the quality verification. The explanation is as follows.

[0128] To ensure the reliability of the fitted line, a fitting error threshold is set. For each fitted straight line Conduct quality verification.

[0129] The fitted line segment The steps for conducting quality verification include the following:

[0130] Step S50131: Determine whether the fitting error threshold requirement is met, such as... Figure 5 .

[0131] Calculate the point set S of line segments i All points to the fitted line segment average distance and maximum distance ;like and If the fitting error meets the fitting error threshold, the fitting is considered valid, and the fitted line segment is retained. Otherwise, it is assumed that the fitting error exceeds the fitting error threshold, and step S50132 is executed.

[0132] Step S50132: Split into two subsets.

[0133] If the fitting error exceeds the fitting error threshold, then the line segment point set S... i Split into two subsets based on the midpoint. and Repeat step S50131 above for fitting and verification until the fitting error of all sub-point sets meets the fitting error threshold requirement.

[0134] If the fitting error exceeds the fitting error threshold, it indicates that the set of line segment points may contain curve segments or undetected corner points.

[0135] Step S5014: Construct an ordered set of line segments.

[0136] All fitted line segments that passed quality verification were arranged in spatial order according to their corresponding point sets to obtain an ordered set of line segments. The explanation is as follows.

[0137] After the above steps, all fitted line segments that passed the quality verification are arranged in spatial order according to their corresponding point sets, forming an ordered set of line segments. , The number of line segments in the final fitted set is positively correlated with the complexity of the roof boundary. Each line segment in this set corresponds to a continuous segment of the roof profile, and adjacent line segments... and The spatial connection lays the foundation for subsequent calculations of intersections of straight lines and precise extraction of corner points.

[0138] Step S502: Two-way geometric verification and fine extraction.

[0139] The roof feature corner points and roof outline are extracted from an ordered set of line segments using a two-way geometric mechanism that combines line segment intersection verification and outline topological consistency verification. The explanation is as follows.

[0140] A refined extraction method based on bidirectional geometric verification: To further improve extraction accuracy, a bidirectional geometric verification mechanism is constructed based on line segment intersection verification and contour topology consistency verification. This mechanism unfolds from two complementary dimensions—local geometric constraints and global topological logic—forming a closed-loop verification system, ultimately achieving refined contour line extraction. After the ordered set of line segments is constructed, the precise extraction of roof feature corner points and roof contour lines is achieved through the bidirectional geometric mechanism of line segment intersection verification + contour topology consistency verification.

[0141] Step S502 specifically includes the following steps:

[0142] Step S5021: Verify the intersection of straight line segments to obtain the characteristic corner points of the roof.

[0143] Roof feature corner points are obtained by filtering through line segment intersection verification based on an ordered set of line segments. The line segment intersection verification includes intersection calculation, spatial distance constraints, and redundancy intersection point deduplication. The line segment intersection verification is the first-axis verification. Details are as follows.

[0144] The line segment intersection verification is a spatial geometric constraint. Based on an ordered set of line segments, the roof feature corner points are obtained by filtering through spatial geometric constraints. The spatial geometric constraint is that the intersection point of adjacent line segments in the ordered set of line segments is the real roof feature corner point.

[0145] like Figure 5 As shown, the intersection of adjacent line segments in the ordered set of line segments is the core candidate for roof feature corner points. The real roof feature corner points are selected through spatial geometric constraints.

[0146] Step S50211: Intersection calculation.

[0147] For two adjacent line segments in an ordered line segment set and Solve for their spatial intersections; the closed roof contains and Let the straight line segment be... The parametric equation of the line is , Let be a known point on the straight line. It is a direction vector. straight line segment The parametric equation of the line is Solving the simultaneous equations satisfies The value is used to obtain the intersection point. .

[0148] Step S50212: Spatial distance constraint.

[0149] Calculate the intersection point and line segment and Corresponding line segment point set and Euclidean distance of endpoints If the set spatial range is met, then a judgment is made. The set of line segment points is a candidate for real roof feature corner points. and Endpoints correspond to roof feature corner candidate , Otherwise, it is considered a false intersection and is discarded. The false intersection is caused by noise or fitting error.

[0150] Step S50213: Remove duplicates from redundant intersections.

[0151] For the close intersection points generated during the fitting process of adjacent straight line segments, the mean value method is used to merge them into a single roof feature corner point to avoid duplicate labeling.

[0152] Step S5022: Obtain the roof outline by verifying the conformity of the topology.

[0153] The roof outline is obtained based on an ordered set of straight line segments through outline topological consistency verification. This verification includes directional consistency, elevation logic constraints, and closure verification, with the outline topological consistency verification being a second-dimensional verification. The explanation is as follows.

[0154] The rules for verifying and optimizing the ordered set of straight line segments are used to obtain the roof outline after topological logic verification. The roof outline must satisfy the topological logic of the building structure, such as the ridge line being perpendicular or oblique to the eaves line, and the parapet wall outline being parallel to the main roof outline, etc., and is verified and optimized through the following rules.

[0155] Step S50221: Orientation consistency.

[0156] Verify each fitted line segment in the ordered set of line segments To ensure directional consistency, when the angle between the directions of adjacent line segments exceeds a set threshold, after adjusting the line parameters or the candidate segmentation nodes for roof feature corner points, step S5013 is executed to backtrack and check the fitting quality of the corresponding line segment point set. This allows for the re-optimization of line parameters or adjustment of the candidate segmentation nodes for roof feature corner points, resulting in an ordered set of line segments after directional consistency verification. The explanation is as follows.

[0157] Calculate the direction vector of each fitted line segment. Adjacent straight line segments and The directional angle must conform to the characteristics of the roof structure. If the angle deviation exceeds the set range, for example, the angle between the eaves line and the ridge line is set within 90°±10°, or the roof outlines on both sides of the double-sloped roof deviate symmetrically. The fitting quality of the corresponding line segment point set is checked back, and the line parameters are re-optimized or the candidate segmentation nodes of the roof feature corner points are adjusted.

[0158] Step S50222: Elevation logic constraint.

[0159] The contour line is extracted from the ordered set of straight line segments after directional consistency verification. The contour line is then verified based on the elevation characteristics of the roof semantic category to obtain the contour line after elevation logical constraints. The explanation is as follows.

[0160] Verify the contour lines based on the elevation characteristics of the roof semantic categories (ridge, eaves, parapet): the fitted straight line corresponding to the ridge line must have all its line segments having the local maximum elevation in the area; the elevation of the parapet wall contour line must be higher than the main roof contour line, and the upper and lower edge contour lines must be parallel; the contour lines of auxiliary structures such as ventilation shafts and solar panels must maintain a reasonable positional relationship with the main roof contour line, such as the ventilation shaft contour being centered and the solar panel contour being parallel to the eaves line.

[0161] Step S50223: Closure verification.

[0162] Verify whether the contour line of a multi-sloped or flat-topped terrain is closed. If it is not closed, achieve contour closure by adjusting the parameters of the first and last straight line segments or by adding boundary points. The explanation is as follows.

[0163] For closed roof types such as multi-sloped roofs and flat roofs, verify the ordered set of straight line segments. Whether the formed contour is closed; if not, achieve contour closure by adjusting the parameters of the first and last straight lines or by adding boundary points for fitting.

[0164] Step S5023: Fine extraction and output of roof feature corner points and contour lines.

[0165] The roof feature corner points obtained in step S5021 are classified according to semantic categories to obtain roof corner points, ridge endpoints, and parapet corner points. The main outline and auxiliary structure outline are extracted from the roof outline obtained in step S5022. Details are as follows.

[0166] Step S50231: Classification and labeling of roof feature corner points.

[0167] Roof feature corner points that pass bidirectional verification are classified according to semantic categories, including roof corner points, ridge endpoints, parapet corner points, etc., and their three-dimensional coordinates and their association information with the corresponding contour segments are recorded.

[0168] The corner points are formed by the intersection of the roof planes, the ridge endpoints are formed by the intersection of the ridge line and the eaves line, and the parapet corner points are formed by the intersection of the parapet edges.

[0169] Building point cloud roof semantic categories: In the geometric and semantic feature segmentation of building point clouds, the roof portion is subdivided into four core semantic categories: ridge, eaves, ridge endpoints, and corner points. A ridge is the highest edge formed by the intersection of two sloping roof surfaces, and its point cloud representation is a set of continuous elevation maximum points along the ridge direction. An eave is a horizontal or near-horizontal line at the lowest edge of the roof surface, and its point cloud shows a low-elevation edge zone accompanied by elevation jumps. A ridge endpoint is the endpoint of the ridge line at the edge of the eaves, representing a local elevation extreme. A corner point is the corner formed by the intersection of the roof edge or the eaves and ridge, representing the intersection of two or more edge lines.

[0170] Step S50232: Output the outline structure.

[0171] The set of fitted line segments that have passed topological verification is retained and connected in spatial order to form a complete roof outline. The output format adopts a structured form of line parameters + line segment point set index + semantic labels, which is convenient for direct import into LoD2 modeling software.

[0172] Final results: After two-way geometric verification and fine extraction, two types of core results are output.

[0173] Roof Feature Corner Set It includes three-dimensional coordinates, semantic category and confidence level, calculated based on fitting error and validation pass rate, with a confidence level ≥ 0.9.

[0174] Topologically structured roof outline set Each contour line is associated with a corresponding semantic label and geometric parameters, which fully meets the accuracy requirements of the LoD2 level building model for roof features. The semantic labels include eaves, ridges and parapets, etc., and the geometric parameters include length, direction and elevation range.

[0175] like Figure 2 As shown, after step S5, boundary line segment fitting, two-way geometric verification and fine extraction, fine extraction is achieved, and the third stage is completed.

[0176] Experimental Examples:

[0177] Experimental Results and Analysis: This includes six parts: dataset, parameter settings, extraction effects of different types of roofs, comprehensive applicability evaluation, accuracy and efficiency analysis, and in-depth analysis, as described below.

[0178] The dataset is described below.

[0179] like Figure 6 As shown, the test area is an industrial park with diverse architectural styles, including multi-sloped roofs, solar panel roofs, double-sloped roofs, single-sloped roofs, and flat roofs with parapets; as shown in Table 1, it covers a variety of roofing materials such as tiles, cement boards, and color steel plates; the data was collected by DJI M300 equipped with Wuhan Jishang GS-260X airborne radar, and a total of 32.27GB of point cloud data was obtained; the experiment was carried out in a selected area, which is the building within the dashed box in the figure.

[0180] Table 1: Roof Types in the Experimental Area

[0181]

[0182] The parameter settings are explained below.

[0183] For five typical roof types, the method of this application is used for feature extraction, with the parameters set as follows:

[0184] dynamic Value parameters: set according to point cloud density and roof structure complexity. For complex roof structures, the upper limit is used; for simple structures, the lower limit is used. The dynamic adjustment of the value is inversely adapted to the local density of the point cloud and the complexity of the roof structure, with a value range of... To preserve the sharp features of the roof.

[0185] Boundary smoothing optimization parameters, smoothing coefficient The value is set to 0.8 to 1.2 to eliminate boundary jitter caused by point cloud noise.

[0186] SIFT corner detection parameters: based on the smoothed boundary point set Calculate its curvature and angle of curvature, and set the local scale coefficient. Curvature threshold Curvature angle threshold The candidate set of corner points is selected.

[0187] Boundary segment fitting parameters: Set the fitting error threshold according to the point cloud resolution. Furthermore, it adaptively adjusts to ensure the reliability of the fitted straight line.

[0188] The parameters for bidirectional geometric verification are explained below.

[0189] Intersection spatial constraints: The Euclidean distance between the intersection point and the corresponding candidate corner point must satisfy... and Otherwise, it is considered a false intersection and should be removed; the distance between close intersections generated by fitting and splitting adjacent line segments should be ≤2cm, the mean value method should be used and repeated labeling should be avoided.

[0190] Topological consistency constraint: The angle between the eaves line and the ridge line is set within the range of 90°±10°, and the roof outlines on both sides of the gable roof are symmetrically deviated. The elevations of all points on the fitted straight line segment corresponding to the ridge line must be the local maximum values ​​in the area, and the elevation difference between these points and the adjacent eaves lines must be... The elevation of the parapet wall outline must be higher than the main roof outline, and the angle between the direction vectors must be [not specified]. The outline of a closed roof consists of an ordered set of straight line segments L. The distance between the intersection of the first and last straight line segments and the characteristic corner point of the first roof segment must be [specified]. .

[0191] Fitting accuracy constraint: The maximum distance from a line segment point to the fitted line during the verification process is... This is to ensure the alignment of the outline with the point cloud data.

[0192] The extraction effects for different types of roofs are explained below.

[0193] like Figure 7 As shown, the extraction results are explained below.

[0194] 1. Flat roof with parapet wall (building ①): Four roof corner points out of eight target roof corner points were accurately extracted, and the complete outline of the ventilation shaft was fully identified; four corner points along the upper edge of the parapet wall were not extracted, and the upper edge outline was missing. See [link to documentation]. Figure 7 Part ①-3.

[0195] This type of roof includes a horizontal roof, parapet walls, and ventilation shafts. The core extraction objective is to capture the integrity of the outlines of these auxiliary structures. The extraction accuracy for the boundaries of independent auxiliary structures, namely ventilation shafts, is high and unaffected by interference from the main roof structure, demonstrating the ability to distinguish semantic categories.

[0196] 2. Multi-sloped roof (building ②): Successfully identified all three ridge lines and eighteen target roof corners; the outline is complete, with no omissions or over-extractions. See [link / reference]. Figure 7 In section ②-3, the plane deviation of the lines is close to 8cm at only two corner points, while the deviation of the rest is ≤5cm.

[0197] Multi-sloped roofs are complex structures with multiple intersecting ridge lines and dense corner points, making them a challenging roof type to extract. A dynamic α-value strategy effectively preserves the sharp corner points and ridge endpoints of the roof, while a hybrid feature detection framework accurately captures multi-directional intersecting contour segments. Two-way geometric verification ensures the topological consistency between the ridge lines and eaves lines.

[0198] 3. Double-sloped roof and building ③: A complete ridge line and twelve target roof corner points were extracted. The symmetry of the eaves lines on both sides is high, and the overlap between the outline and the ground truth is over 95%. See [link / reference]. Figure 7 Part ③-3. The horizontal deviation of all roof corner points is ≤4cm, and the vertical deviation is ≤6cm.

[0199] The double-sloped roof is a symmetrical structure, and the core extraction points are the integrity of the ridge line and the symmetry of the corner points. The scale invariance of the SIFT algorithm ensures the accurate positioning of the symmetrical corner points, and the horizontality of the eaves line is maintained during the straight line fitting process, which is suitable for the symmetrical structural features of the double-sloped roof.

[0200] 4. Single-slope roof (building ④): Successfully identified all four target roof corner points and the complete sloping outline. The deviation of the outline's sloping angle from the true value is ≤0.5°. See [link / reference]. Figure 7 In part ④-3, the extraction time was only 12 seconds.

[0201] Single-slope roof structures are simple, with only one sloping ridge line and two corner points. The key to extraction is the accuracy of the tilt angle of the outline. Computational efficiency is high, requiring no complex multi-directional feature matching. The Delaunay triangulation acceleration mechanism significantly improves efficiency for such simple roof structures.

[0202] 5. Solar panel roof (building ⑤): Accurately extract the outer contour line of the solar panel and four of the six target roof corner points; the outline of the ventilation opening is completely identified. See [link / reference] Figure 7 Part ⑤-3: The two ridge corners formed by the gentle slope were not identified.

[0203] This type of roof, including artificially installed solar panels and vents, is a composite structure roof, exhibiting structural shading and gentle slope characteristics. It demonstrates high accuracy in extracting regularly shaped auxiliary structures (e.g., solar panels, vents), producing smooth, jitter-free contours, reflecting the synergistic effect of Gaussian smoothing and linear fitting. For gentle slope structures with a gradient ≤5°, due to the small curvature change, SIFT corner detection struggles to effectively identify ridge features, requiring further optimization of the corner detection sensitivity threshold.

[0204] The comprehensive applicability evaluation is explained below.

[0205] Using the method of this application, the completeness of the extraction of the outline and roof feature corner points for different types of roofs is shown in Table 2.

[0206] Table 2: Completeness of Roof Outline and Feature Corner Point Extraction in the Experimental Area

[0207]

[0208] In summary, the method proposed in this application performs best on symmetrical pitched roofs (such as double-pitched roofs and single-pitched roofs) and complex multi-pitched roofs, with an extraction completeness rate of over 94.4%. It is well adapted to roofs with regular attached structures, but has certain limitations in sparse point cloud regions and gentle slope structures. Overall, it can meet the LoD2 level modeling requirements for most common roof types.

[0209] Accuracy and efficiency analysis: This includes extraction accuracy analysis and extraction efficiency analysis, as explained below.

[0210] Extraction accuracy analysis: Taking the results of manual extraction as the true value, error statistics were performed on 42 effective extracted roof corner points of five types of roofs.

[0211] As shown in Table 3, the accuracy analysis table is in cm.

[0212] Table 3: Accuracy Analysis of Roof Feature Corner Point Extraction

[0213]

[0214] Note: ΔX and ΔY are plane coordinate errors, and ΔZ is elevation error; LoD2 level modeling accuracy requires an error of ≤10cm.

[0215] As shown in Table 3, the proportion of errors ≤10cm in the ΔX and ΔY directions using the method of this application reaches 97.62%, and the proportion of errors ≤10cm in the ΔZ direction is 76.19%, which is significantly higher than that of directly using the α-shape method. The overall 3D error of all roof corner points is ≤20cm, meeting the LoD2 level modeling requirements in the "Technical Standard for Application of 3D Scanning Modeling in Buildings" (T / CREA 023-2023). It is worth noting that the impact of point cloud quality (such as noise and density) on extraction accuracy has been confirmed by relevant studies. However, the method of this application, through multi-stage denoising and geometric verification, can still maintain high accuracy in low-quality point cloud scenarios, further demonstrating its robustness advantage.

[0216] Extraction efficiency analysis: To verify the automatic extraction efficiency advantage of the method in this application, a 10GB point cloud sub-dataset was selected, and the extraction time of the method in this application and the direct α-Shape method were compared. At the same time, the reduction in computational load was statistically analyzed.

[0217] Table 4 shows the experimental results.

[0218] Table 4: Comparison and Analysis of Extraction Efficiency

[0219]

[0220] Note: The test environment consisted of an Intel(R) Core(TM) i9-14900HX CPU, an NVIDIA GeForce RTX4090 Laptop GPU, 64GB DDR5 5600MHz RAM, and 2TB SSD storage; the data consisted of a 10GB point cloud subset from the test area (containing five typical roof types); the metrics were measured using the controlled variable method, repeated three times, and the average value was taken; the improvement ratio was calculated based on the direct α-Shape method, with lower time consumption and computational load, and a higher automatic extraction completion rate, indicating better method efficiency.

[0221] Efficiency analysis shows that the method in this application takes an average of 8.2 seconds to extract a single roof, a total extraction time of 12.6 seconds, and involves 1.28 billion floating-point operations. The automatic extraction completeness rate is 92.0%. Compared with the direct α-Shape method, the extraction time is reduced by about 65%, the computational load is reduced by 64.0%, and the automatic extraction completeness rate is improved by 41.5%, demonstrating a significant efficiency advantage.

[0222] In-depth analysis: including comparison with the RANSAC method and the mechanism of accuracy improvement, and comparative advantages with deep learning methods, explained below.

[0223] Comparison with RANSAC method and the mechanism of accuracy improvement: Random Sampling Consensus (RANSAC) algorithm is a classic method for point cloud plane fitting and feature extraction. It obtains the optimal model by iteratively selecting interior points, but it has obvious limitations in roof point cloud processing: it is sensitive to noise and outliers and is prone to misfitting in sharp feature regions; the parameters are fixed and it is difficult to adapt to complex roof structures; it lacks semantic association and cannot distinguish the semantic category of the roof.

[0224] The core differences between the method in this application and the RANSAC method are reflected in three aspects: In terms of feature extraction logic, this application adopts a hierarchical strategy of initial extraction-optimization-fine extraction to achieve geometric-semantic fusion extraction, rather than the global fitting of RANSAC; In terms of parameter adaptability, by combining dynamic α values ​​with Delaunay triangulation, the parameters are adaptively adjusted to avoid the defects of fixed parameters; In terms of semantic processing, it can complete the classification and extraction of semantic features such as roof ridges and roof corners, which is superior to the limitation of RANSAC that can only output geometric models.

[0225] The key to improving the accuracy of the method in this application lies in: the dynamic α-value strategy accurately preserves sharp features such as roof corners and ridge endpoints; Gaussian smoothing denoising and SIFT corner detection work together to improve local positioning accuracy; and the bidirectional geometric verification mechanism ensures the consistency of contour topology and avoids breakage or intersection problems.

[0226] Advantages compared to deep learning methods: While deep learning models such as PointNet and PointCNN have certain advantages in large-scale scenarios, the α-Shape+SIFT method in this application still possesses irreplaceable core value: First, it has low data dependency, requiring no large number of labeled samples; features can be extracted solely from point cloud geometric attributes and building structural logic, making it suitable for engineering scenarios lacking labeled data. Second, it has high computational efficiency; after acceleration with Delaunay triangulation, the average extraction time for a single roof is 8.2 seconds, and the total extraction time for 10GB point cloud is 12.6 minutes, requiring no GPU cluster support and meeting real-time processing requirements. Third, it offers strong interpretability; the extraction process is transparent and controllable, supporting parameter adjustment and manual intervention, making it more practical for engineering applications. Fourth, it exhibits superior robustness; through multi-stage denoising and adaptive adjustment, it can adapt to complex point cloud data with noise interference and uneven density.

[0227] The technical effects and application prospects are explained below.

[0228] The proposed method for joint extraction of roof geometric and semantic features driven by the α-Shape+SIFT hybrid framework achieves a 64.0% reduction in computational load through innovative designs such as dynamic α-value adjustment, Delaunay triangulation acceleration, hybrid feature detection, and bidirectional geometric verification. The proportion of roof feature corner points with a planar error ≤10cm reaches over 97%, and the proportion with an elevation error ≤10cm reaches 76.19%, meeting the LoD2 level modeling accuracy requirements for current urban real-scene 3D construction.

[0229] The accuracy of this method depends on the quality of the point cloud data and the effectiveness of preprocessing. For noisy, incomplete point cloud data, and for irregular or curved roof boundaries, the extraction performance needs improvement. Future research will introduce more point cloud features and combine them with machine learning or deep learning algorithms to improve the accuracy of roof point cloud segmentation in complex scenarios; investigate adaptive processing methods for point cloud data of different resolutions and densities; employ more flexible geometric models and algorithms to describe irregular or curved roof boundaries; and integrate multiple corner detection algorithms to improve the accuracy and robustness of corner detection.

[0230] Example 2:

[0231] The present invention discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The memory and the processor form an electronic terminal, and the processor executes the computer program to implement the steps of Embodiment 1.

[0232] Example 3:

[0233] The present invention discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in Embodiment 1.

Claims

1. A method for jointly extracting geometric and semantic features of roofs, characterized in that: Includes the following steps, Step S1: Perform facet fitting on the roof point cloud to obtain the point set of each plane of the roof, thus obtaining the initial set of plane points; Step S2: Combining the Delaunay triangulation acceleration mechanism, the initial boundary point set of the roof is obtained from the initial planar point set through the α-Shape algorithm. In the α-Shape algorithm, the α value is adaptively adjusted in reverse according to the local point cloud density. Step S3: Obtain the smoothed boundary point set by Gaussian smoothing and denoising the initial boundary point set; Step S4: Based on the adaptive corner detection algorithm, from the smoothed boundary point set The detection process yields a candidate set of corner points; Step S5: Fit the smoothed boundary point set to boundary line segments to obtain ordered straight line segments that conform to the structural logic of the roof building, forming an ordered straight line segment set; extract the roof feature corner points and roof outline from the ordered straight line segment set through a two-way geometric mechanism of straight line segment intersection verification + contour topology consistency verification.

2. The method for jointly extracting roof geometric and semantic features according to claim 1, characterized in that: In step S2, the steps of the Delaunay triangulation acceleration mechanism include: projecting each plane point set of the roof obtained in step S1 onto a two-dimensional plane to construct a Delaunay triangulation, with the outer boundary of the Delaunay triangulation as the starting calculation area; in the α-Shape algorithm, the α value is set as the adaptive range of the average distance between points in the roof point cloud, and α is a dynamic value. During the calculation process, the α value is adjusted in reverse adaptively according to the local point cloud density.

3. The method for jointly extracting roof geometric and semantic features according to claim 1, characterized in that: Step S4 is specifically divided into the following steps. Step S401: Employ a multi-scale adaptive neighborhood algorithm to support the region radius. From the smoothed boundary point set Extract the support region point set of the boundary points. ; Step S402: Set the support region points The curvature k of the boundary points is calculated using the three-point concyclic method. Step S403: Set curvature threshold With the range of varicose angle threshold When the boundary points satisfy And varicose angle At that time, candidate corner points are obtained, forming a corner point candidate set. .

4. The method for jointly extracting roof geometric and semantic features according to claim 1, characterized in that: In step S5, the step of fitting the smoothed boundary point set with boundary line segments to obtain ordered straight line segments that conform to the structural logic of the roof building, forming an ordered set of straight line segments, is step S501. Step S501 specifically includes the following steps. Step S5011: Using the candidate corner point set as the segmentation node, segment the smoothed boundary point set according to the spatial order of the boundary points, and segment adjacent candidate corner points. and All boundary points between them are divided into an independent set of line segment points S. i Obtain all the point sets of the line segments; Step S5012: For each line segment point set S i The planar least squares method is used to fit the line to obtain the set of line segment points S. i The corresponding fitted line segment ; Step S5013: Based on the set fitting error threshold For each fitted line segment Perform quality verification to obtain all fitted line segments that pass the quality verification. Step S5014: Arrange all the fitted line segments that have passed the quality verification in spatial order according to the corresponding line segment point set to obtain an ordered set of line segments.

5. The method for jointly extracting roof geometric and semantic features according to claim 4, characterized in that: In step S5013, for each fitted line segment The steps for conducting quality verification include the following: Step S50131: Calculate the line segment point set S i All points to the fitted line segment average distance and maximum distance ;like and If the fitting error meets the fitting error threshold, the fitting is considered valid, and the fitted line segment is retained. Otherwise, it is assumed that the fitting error exceeds the fitting error threshold, and step S50132 is executed. Step S50132: If the fitting error exceeds the fitting error threshold, then the line segment point set S i Split into two subsets based on the midpoint. and Repeat step S50131 above for fitting and verification until the fitting error of all sub-point sets meets the fitting error threshold requirement.

6. The method for jointly extracting roof geometric and semantic features according to claim 1, characterized in that: In step S5, the step of extracting the roof feature corner points and roof outline from the ordered set of line segments through a two-way geometric mechanism of line segment intersection verification and outline topology consistency verification is step S502. Step S502 is specifically divided into the following steps. Step S5021: Based on the ordered set of straight line segments, the roof feature corner points are obtained by filtering through the intersection verification of straight line segments. The intersection verification of straight line segments includes intersection calculation, spatial distance constraint and redundancy intersection point deduplication. The intersection verification of straight line segments is the first-direction verification. Step S5022: Obtain the roof outline based on the ordered set of straight line segments through outline topology consistency verification. The outline topology consistency verification includes directional consistency, elevation logic constraints and closure verification. The outline topology consistency verification is a second-dimensional verification.

7. The method for jointly extracting roof geometric and semantic features according to claim 6, characterized in that: Step S502 further includes step S5023, which follows step S5022. Step S5023: Classify the roof feature corner points obtained in step S5021 according to semantic categories to obtain roof corner points, ridge endpoints and parapet corner points, and extract the main outline and auxiliary structure outline from the roof outline obtained in step S5022.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the steps of the method for jointly extracting roof geometric and semantic features as described in any one of claims 1 to 7.

9. A storage medium, which is a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, characterized in that: When the computer program is executed by the processor, it implements the steps of the method for jointly extracting roof geometric and semantic features as described in any one of claims 1 to 7.