Building feature line extraction method based on three-dimensional point cloud

Through technologies such as the improved RANSAC algorithm and adaptive alpha shape algorithm, the problems of low efficiency and insufficient accuracy in building feature line extraction are solved, and efficient and accurate feature line extraction is achieved, which is suitable for high-precision three-dimensional modeling.

CN118608552AActive Publication Date: 2024-09-06QINGDAO HANLANT MARINE TECHNOLOGY DEVELOPMENT CO LTD

Patent Information

Application Number
CN202410821067.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-09-06
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

The existing technology has problems such as low efficiency, poor robustness to noise, and insufficient accuracy in extracting building feature lines, making it difficult to meet the requirements of high-precision three-dimensional modeling.

Method used

A building feature line extraction method based on three-dimensional point cloud is adopted, including point cloud data collection, preprocessing, facade detection, outlier removal, projection, boundary extraction, clustering, straight line segment extraction and accuracy verification. Through improved RANSAC algorithm, adaptive alpha shape algorithm, density peak clustering algorithm and curve fitting algorithm, dynamically adjust parameters and multi-stage optimization to ensure the accuracy and integrity of the extracted feature lines.

Benefits of technology

It improves the efficiency and accuracy of building feature line extraction, is suitable for high-precision three-dimensional modeling requirements, ensures that the extracted feature lines conform to the actual building outline, and improves the accuracy and beauty of the three-dimensional model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118608552A
    Figure CN118608552A
Patent Text Reader

Abstract

The invention relates to the technical field of building feature analysis, in particular to a three-dimensional point cloud-based building feature line extraction method, which comprises the following steps of: acquiring point cloud data of a building by using a three-dimensional laser scanner; preprocessing the collected point cloud data, including deleting isolated points and noise points; an improved RANSAC algorithm is adopted to detect the vertical face of the building, and a fitting plane is determined; outliers in the facade point cloud are removed based on a multi-scale statistical analysis method; projecting the denoised point cloud data to a fitting plane; using an adaptive alpha shape algorithm to extract the boundary of the facade point cloud; separating the boundary point cloud into a plurality of clusters by adopting a density peak clustering algorithm; using an improved RANSAC algorithm to extract a straight line segment of the boundary point cloud from each cluster; and calculating an intersection point. According to the method, the contour feature line of the building can be quickly and accurately extracted from the three-dimensional point cloud data, the extraction efficiency and accuracy are remarkably improved, and the method is suitable for high-precision three-dimensional modeling requirements in smart city construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of building feature analysis, and in particular to a method for extracting building feature lines based on three-dimensional point clouds. Background Art

[0002] With the continuous advancement of smart city construction, digital twin technology has become one of its core technical means. Digital twin cities aim to accurately model and simulate real cities through digital means, thereby improving urban management and operational efficiency. In this process, as an important part of the city, the reconstruction of the three-dimensional model and the extraction of feature lines of buildings have always been a hot and difficult issue in research. High-precision building feature line extraction is crucial for the construction of a city information model (CIM). It can not only improve the accuracy of urban planning and design, but also play an important role in building maintenance, disaster response and other aspects.

[0003] In the field of building feature line extraction, the existing technologies mainly use methods such as Hough transform algorithm, region growing method and deep learning method. However, these methods have some limitations. For example, the Hough transform algorithm is inefficient when processing large-scale point cloud data, the region growing method is sensitive to the selection of initial points and is easily affected by noise, and although the deep learning method performs well in specific scenarios, it has large training data requirements and high computing resource requirements. In addition, these methods generally have poor robustness to noisy data and insufficient accuracy, making it difficult to meet the requirements of high-precision 3D modeling.

[0004] In view of the above problems, it is particularly important to propose a building feature line extraction method based on three-dimensional point cloud. Summary of the invention

[0005] Based on the above purpose, the present invention provides a method for extracting building feature lines based on three-dimensional point clouds.

[0006] The method for extracting building feature lines based on three-dimensional point clouds includes the following steps: S1, point cloud data acquisition: use a 3D laser scanner to obtain point cloud data of the building; S2, point cloud preprocessing: preprocessing the collected point cloud data, including deleting isolated points and noise points; S3, building facade detection: using the improved RANSAC algorithm to detect the building facade and determine the fitting plane; S4, outlier removal: remove outliers from the facade point cloud based on multi-scale statistical analysis method; S5, point cloud projection: project the denoised point cloud data onto the fitting plane to ensure the accuracy of feature line extraction; S6, boundary extraction: use the adaptive alpha shape algorithm to extract the boundary of the facade point cloud; S7, boundary clustering: the density peak clustering algorithm is used to separate the boundary point cloud into multiple clusters; S8, straight line segment extraction: use the improved RANSAC algorithm to extract the straight line segments of the boundary point cloud from each cluster; S9, intersection calculation: by extending adjacent straight line segments to obtain their intersection points, the overall characteristic line of the building facade is obtained; S10, precision check: perform precision check on the extracted feature lines.

[0007] Furthermore, the S3 specifically includes: S31, initial parameter setting: set the initial parameters of the RANSAC algorithm, including the number of iterations , inlier threshold and fitting accuracy ; S32, dynamic sampling strategy: dynamically adjust the number of sample points under different sampling scales to improve the adaptability of the algorithm to building facades of different scales; S33, preliminary facade detection: In each iteration, randomly select points as sample point set and calculate the candidate plane parameters; S34, interior point evaluation: Using the parameters of the candidate plane, calculate the distance from all points to the plane, defined as: ,in, For point The distance to the plane, are the coordinates of the point, are the parameters of the plane; S35, interior point selection: If , then point For the interior points, count the number of interior points and select the candidate plane with the largest number of interior points; S36, plane fitting optimization: Use the least squares method to fit the selected internal point set to optimize the plane parameters so that they meet the following formula: ,in, are the coordinates of the interior point, is the number of inliers; S37, adaptive adjustment: After each iteration, the number of sampling points and the number of iterations are adjusted according to the ratio of inliers. The formula is: ,in, is the expected confidence level, is the interior point ratio, is the number of sampling points.

[0008] Furthermore, the S4 specifically includes: S41, Neighborhood definition: Define a neighborhood for each point in the point cloud dataset ,in It is a point is the center and the radius is The set of all points in the sphere where is a multi-scale parameter; S42, distance calculation: For each point , calculate the distance to all points in the neighborhood ,in, represents the Euclidean distance, ; S43, multi-scale average distance: Calculate the average distance of each point at different scales, expressed as: ,in, is the number of points in the neighborhood, Indicates scale; S44, outlier detection: The multi-scale average distance of all points follows a Gaussian distribution, and the global average distance is calculated and standard deviation ; S45, outlier identification: Identify points in the point cloud dataset whose multi-scale average distance exceeds the threshold as outliers, that is: ,in, is the set standard deviation multiple; S46, outlier removal: delete all points identified as outliers to obtain a point cloud data set after the outliers are removed.

[0009] Furthermore, the S5 specifically includes: S51, determine the fitting plane parameters: obtain the parameter equation of the fitting plane through the RANSAC algorithm, which is in the form of: ,in, and are the parameters of the fitting plane; S52, point cloud plane distance calculation: For each point after denoising , calculate its perpendicular distance to the fitting plane , the calculation method is the same as the above calculation of the distance from all points to the plane: ; S53, projection point calculation: each point Project onto the fitting plane to get the projection point , the calculation is expressed as: ; ; ; ; S54, Projected point cloud integration: All points Projection point Integration is performed to form a projected point cloud dataset, and the accuracy of the projected point cloud dataset is verified to ensure that the error in the projection process is within a preset range to ensure the accuracy of feature line extraction.

[0010] Furthermore, the boundary extraction in S6 specifically includes: S61, set the initial parameters of the alphashape algorithm, including the initial radius ; S62, Neighborhood definition: Define a neighborhood for each point in the point cloud dataset ,in, It is a point is the center and the radius is The set of all points in the sphere of S63, neighborhood density calculation: Calculate the density of points in the neighborhood of each point: ,in, is the number of points in the neighborhood; S64, Adaptive Radius Adjustment: Adjust the alpha radius of each point according to the density of the point cloud data , the formula is: ,in, is the maximum density in the point cloud dataset; S65, using adaptive radius Construct alphashape and set the radius The ball rolls on the point cloud dataset to form a boundary; S66, boundary extraction: record the boundary points formed by rolling the alphashape and extract the boundary of the facade point cloud.

[0011] Furthermore, after the boundary extraction, boundary optimization is also included, and the boundary optimization optimizes the extracted boundary through a gradient descent algorithm to improve the boundary accuracy.

[0012] Furthermore, the boundary clustering in S7 specifically includes: S71, calculate the Euclidean distance between all points in the boundary point cloud to form a distance matrix ,in Indicate point and Point The distance between S72, density calculation: for each point Calculate its local density , the local density is defined as the point At the distance threshold The number of points inside is expressed as: ; S73, distance peak calculation: calculate each point Minimum distance to a point with higher local density , expressed as: , for the point with the highest local density, set ; S74, select local density and distance peak The highest point is taken as the cluster center; S75, assign other points to the cluster where the nearest cluster center is located. Each point is assigned according to its distance and density from the cluster center. The formula is: ,in, represents the cluster center, For point The distance to the cluster center; S76, cluster optimization: optimize the initially allocated clusters, adjust the affiliation of the points, maximize the density of each cluster, and output the finally allocated clusters as multiple clusters of the boundary point cloud.

[0013] Furthermore, the S8 specifically includes: S81, process the boundary point cloud of each cluster separately and divide the point cloud data set into multiple clusters ,in Indicates the cluster number; S82, sample point selection: In each cluster, randomly select points as sample point set and calculate the candidate line parameters; S83, candidate straight line fitting: according to the sample point set, the candidate straight line is fitted using the least squares method, and the parameter equation of the candidate straight line is calculated, which is expressed as: ,in, is the slope of the straight line, is the intercept of the straight line; S84, interior point evaluation: using the parameters of the candidate line, calculate the perpendicular distance from each point to the line , the formula is: ,if , then point is the inlier point, count the number of inliers; S85, interior point selection: select the candidate straight line with the largest number of interior points as the best straight line of the current cluster; S86, Line Fitting Optimization: Use the least squares method to fit the selected internal point set to optimize the line parameters. The formula is: ,in, are the coordinates of the interior point, is the number of inliers; S87, straight line segment extraction: extract the optimized straight line segment, extend the adjacent straight line segments to their intersection points, and form a complete boundary straight line segment; S88, adaptive adjustment: After each iteration, the number of sampling points and the number of iterations are adjusted according to the ratio of inliers. The formula is: ,in, is the expected confidence level, is the interior point ratio, is the number of sampling points; S89, verify the accuracy of the extracted straight line segment to ensure that it meets the requirements of building boundary detection, and adjust the RANSAC parameters for iterative optimization as needed.

[0014] Furthermore, the S9 specifically includes: S91, straight line segment fitting: Use the improved RANSAC algorithm to fit several straight line segments to the boundary point cloud data in each cluster, denoted as ,in The parametric equation is: ,in, For the The slope of a straight line segment, For the The intercept of the line segment; S92, each fitted straight line segment The extended straight line segment is recorded as ; S93, calculate adjacent extended straight line segments and The intersection point, the intersection coordinates , obtained by solving the following system of equations: , and we get: ; ; S94, intersection filtering: filtering all calculated intersections to remove abnormal intersections that do not conform to the building outline; S95, feature line construction: connect the filtered intersection points in sequence to construct the overall feature line of the building facade; S96, optimize the constructed feature line to ensure its smoothness and accuracy, and use the curve fitting algorithm to smooth the feature line. The smoothing process is as follows: Initialize the intersection set: All the intersection points obtained by extending adjacent straight line segments Arrange them in order to form an intersection set; Select the curve fitting method: Select a curve fitting algorithm that is suitable for the building contour, such as B-spline curve fitting or polynomial fitting; Curve fitting parameter setting: according to the selected fitting method, set relevant parameters, such as the number of nodes of the B-spline curve or the order of the polynomial; Construct a fitting curve model: construct a fitting curve model using the selected curve fitting method; Calculate the fitting curve: Calculate the parameters of the curve fitting model according to the intersection point set to obtain the fitting curve; Curve smoothing: Smooth the fitted curve to remove noise and sharp turning points on the curve; Verify the fit between the smooth curve after fitting and the actual building outline, and adjust the fitting parameters as needed to ensure the accuracy and smoothness of the characteristic line.

[0015] Furthermore, the S10 specifically includes: Compare the extracted feature lines with the original point cloud data, and calculate the distance from each feature line point to its corresponding original point cloud point; Calculate error indicators: Calculate the error indicators between feature lines and original point cloud data, including average error, root mean square error and maximum error; Error analysis: Analyze the calculated error indicators to determine whether the accuracy of the characteristic line meets the requirements.

[0016] Beneficial effects of the present invention: The present invention combines the improved RANSAC algorithm, the adaptive alpha shape algorithm, the density peak clustering algorithm and the gradient descent algorithm to propose an efficient and accurate method for extracting building feature lines. Through multi-scale sampling, dynamic parameter adjustment and multi-stage optimization, the adaptability and accuracy of the algorithm to building facades of different sizes are improved. In particular, the adaptive alpha shape algorithm and the density peak clustering algorithm are used to effectively deal with the noise and outliers in the point cloud data, ensuring the integrity and accuracy of the feature line extraction. This method can quickly and accurately extract the contour feature lines of the building from the three-dimensional point cloud data, significantly improving the extraction efficiency and accuracy, and is suitable for the high-precision three-dimensional modeling requirements in the construction of smart cities.

[0017] After the feature line extraction is completed, the present invention uses a curve fitting algorithm to smooth the feature line, ensuring the smoothness and accuracy of the feature line, removing the noise and sharp turning points on the curve, and ensuring the continuity and smoothness of the feature line. This method significantly improves the quality of the feature line, making the extracted feature line more consistent with the outline of the actual building, improving the accuracy and aesthetics of the three-dimensional model, and providing a solid foundation for high-precision building modeling.

[0018] The present invention ensures that the extracted feature lines have high accuracy and reliability through detailed precision verification steps. By comparing the feature lines with the original point cloud data, the error indicators (including average error, root mean square error and maximum error) are calculated, and combined with manual verification and error distribution diagrams, the accuracy and error distribution of the feature lines are comprehensively evaluated. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 Schematic diagram of the extraction method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.

[0022] like Figure 1 As shown, the building feature line extraction method based on three-dimensional point cloud includes the following steps: S1, point cloud data acquisition: Use a 3D laser scanner to obtain point cloud data of the building, including: Choose a 3D laser scanner with high precision and high resolution to ensure that the collected point cloud data has sufficient details and accuracy; According to the height, area and structural characteristics of the building, set the scanning parameters of the scanner, including scanning resolution, scanning range and scanning angle; Select multiple scanning locations to ensure coverage of the entire building facade and minimize occlusions and blind spots; At each scanning position, scan according to the set scanning parameters to obtain point cloud data of the building; Integrate and calibrate the point cloud data obtained from multiple scanning positions, store the integrated and calibrated point cloud data in a storage device, and back it up to prevent data loss; S2, point cloud preprocessing: preprocess the collected point cloud data, including deleting isolated points and noise points, specifically including: Use open source point cloud processing software to perform preliminary processing on the collected point cloud data; Crop out relatively complete part of the point cloud data; Delete isolated points and noise points to ensure the integrity and purity of point cloud data; S3, building facade detection: using the improved RANSAC algorithm to detect the building facade and determine the fitting plane; S4, outlier removal: remove outliers from the facade point cloud based on multi-scale statistical analysis method; S5, point cloud projection: project the denoised point cloud data onto the fitting plane to ensure the accuracy of feature line extraction; S6, boundary extraction: use the adaptive alpha shape algorithm to extract the boundary of the facade point cloud; S7, boundary clustering: the density peak clustering algorithm is used to separate the boundary point cloud into multiple clusters; S8, straight line segment extraction: use the improved RANSAC algorithm to extract the straight line segments of the boundary point cloud from each cluster; S9, intersection calculation: by extending adjacent straight line segments to obtain their intersection points, the overall characteristic line of the building facade is obtained; S10, precision check: perform precision check on the extracted feature lines.

[0023] S3 specifically includes: S31, initial parameter setting: set the initial parameters of the RANSAC algorithm, including the number of iterations , inlier threshold and fitting accuracy ; S32, dynamic sampling strategy: dynamically adjust the number of sample points under different sampling scales to improve the adaptability of the algorithm to building facades of different scales; S33, preliminary facade detection: In each iteration, randomly select points as sample point set and calculate the candidate plane parameters; S34, interior point evaluation: Using the parameters of the candidate plane, calculate the distance from all points to the plane, defined as: ,in, For point The distance to the plane, are the coordinates of the point, are the parameters of the plane; S35, interior point selection: If , then point For the interior points, count the number of interior points and select the candidate plane with the largest number of interior points; S36, plane fitting optimization: Use the least squares method to fit the selected internal point set to optimize the plane parameters so that they meet the following formula: ,in, are the coordinates of the interior point, is the number of inliers; S37, adaptive adjustment: After each iteration, the number of sampling points and the number of iterations are adjusted according to the ratio of inliers. The formula is: ,in, is the expected confidence level, is the interior point ratio, The number of sampling points is determined, the accuracy of the fitted plane is verified to ensure that it meets the requirements of building facade detection, and the RANSAC parameters are adjusted for iterative optimization as needed.

[0024] S4 specifically includes: S41, Neighborhood definition: Define a neighborhood for each point in the point cloud dataset ,in It is a point is the center and the radius is The set of all points in the sphere where is a multi-scale parameter; S42, distance calculation: For each point , calculate the distance to all points in the neighborhood ,in, represents the Euclidean distance, ; S43, multi-scale average distance: Calculate the average distance of each point at different scales, expressed as: ,in, is the number of points in the neighborhood, Indicates scale; S44, outlier detection: The multi-scale average distance of all points follows a Gaussian distribution, and the global average distance is calculated and standard deviation , expressed as: ,in, is the total number of points in the point cloud dataset; S45, outlier identification: Identify points in the point cloud dataset whose multi-scale average distance exceeds the threshold as outliers, that is: ,in, is the set standard deviation multiple; S46, outlier removal: delete all points identified as outliers to obtain a point cloud data set after the outliers are removed.

[0025] The outliers in the point cloud data are effectively removed by multi-scale statistical analysis. The multi-scale neighborhood definition and distance calculation ensure the comprehensiveness and accuracy of outlier detection. By calculating the multi-scale average distance and assuming that it obeys Gaussian distribution, outliers can be accurately identified. Setting a reasonable threshold ensures the effectiveness of outlier removal. This method can effectively improve the purity and integrity of point cloud data and provide a high-quality data foundation for subsequent feature line extraction.

[0026] S5 specifically includes: S51, determine the fitting plane parameters: obtain the parameter equation of the fitting plane through the RANSAC algorithm, which is in the form of: ,in, and are the parameters of the fitting plane; S52, point cloud plane distance calculation: For each point after denoising , calculate its perpendicular distance to the fitting plane , the calculation method is the same as the above calculation of the distance from all points to the plane: ; S53, projection point calculation: each point Project onto the fitting plane to get the projection point , the calculation is expressed as: ; ; ; ; S54, Projected point cloud integration: All points Projection point Integration is performed to form a projected point cloud dataset, and the accuracy of the projected point cloud dataset is verified to ensure that the error in the projection process is within a preset range to ensure the accuracy of feature line extraction.

[0027] Boundary extraction in S6 specifically includes: S61, set the initial parameters of the alphashape algorithm, including the initial radius ; S62, Neighborhood definition: Define a neighborhood for each point in the point cloud dataset ,in, It is a point is the center and the radius is The set of all points in the sphere of S63, neighborhood density calculation: Calculate the density of points in the neighborhood of each point: ,in, is the number of points in the neighborhood; S64, Adaptive Radius Adjustment: Adjust the alpha radius of each point according to the density of the point cloud data , the formula is: ,in, is the maximum density in the point cloud dataset; S65, using adaptive radius Construct alphashape and set the radius The ball rolls on the point cloud dataset to form a boundary; S66, boundary extraction: record the boundary points formed by rolling the alphashape and extract the boundary of the facade point cloud.

[0028] After boundary extraction, boundary optimization is also included. Boundary optimization optimizes the extracted boundary through the gradient descent algorithm to improve boundary accuracy. Specifically, it includes: Initial set of boundary points: Initialize the boundary point set from the boundary point set extracted by the adaptive alphashape algorithm ,in ; Energy function definition: Define the energy function of the boundary point set , used to measure the smoothness and accuracy of the boundary point set, the formula is: ,in, Yes The neighborhood point set of is the regularization parameter, is the initial boundary point; Compute gradients: Calculate the energy function Relative to the boundary point set Gradient , the formula is: ; Gradient descent iteration: Update the boundary point set using gradient descent , the formula is: ,in, For the The position of the boundary point at the iteration, is the learning rate; Convergence judgment: judging the energy function Is the change less than the preset threshold? , if yes, stop the iteration, otherwise return to step and continue the iteration; The final converged boundary point set Output as optimized boundary.

[0029] The boundary clustering in S7 specifically includes: S71, calculate the Euclidean distance between all points in the boundary point cloud to form a distance matrix ,in Indicate point and Point The distance between S72, density calculation: for each point Calculate its local density , the local density is defined as the point At the distance threshold The number of points inside is expressed as: ; S73, distance peak calculation: calculate each point Minimum distance to a point with higher local density , expressed as: , for the point with the highest local density, set ; S74, select local density and distance peak The highest points are taken as cluster centers, which are usually located in high-density areas and far away from other high-density points; S75, assign other points to the cluster where the nearest cluster center is located. Each point is assigned according to its distance and density from the cluster center. The formula is: ,in, represents the cluster center, For point The distance to the cluster center; S76, cluster optimization: optimize the initially allocated clusters, adjust the affiliation of the points, maximize the density of each cluster, and output the finally allocated clusters as multiple clusters of the boundary point cloud.

[0030] S8 specifically includes: S81, set the initial parameters of the RANSAC algorithm, including the number of iterations , inlier threshold and fitting accuracy , process the boundary point cloud of each cluster separately, and divide the point cloud dataset into multiple clusters ,in Indicates the cluster number; S82, sample point selection: In each cluster, randomly select points as sample point set and calculate the candidate line parameters; S83, candidate straight line fitting: according to the sample point set, the candidate straight line is fitted using the least squares method, and the parameter equation of the candidate straight line is calculated, which is expressed as: ,in, is the slope of the straight line, is the intercept of the straight line; S84, interior point evaluation: using the parameters of the candidate line, calculate the perpendicular distance from each point to the line , the formula is: ,if , then point is the inlier point, count the number of inliers; S85, interior point selection: select the candidate straight line with the largest number of interior points as the best straight line of the current cluster; S86, Line Fitting Optimization: Use the least squares method to fit the selected internal point set to optimize the line parameters. The formula is: ,in, are the coordinates of the interior point, is the number of inliers; S87, straight line segment extraction: extract the optimized straight line segment, extend the adjacent straight line segments to their intersection points, and form a complete boundary straight line segment; S88, adaptive adjustment: After each iteration, the number of sampling points and the number of iterations are adjusted according to the ratio of inliers. The formula is: ,in, is the expected confidence level, is the interior point ratio, is the number of sampling points; S89, verify the accuracy of the extracted straight line segment to ensure that it meets the requirements of building boundary detection, and adjust the RANSAC parameters for iterative optimization as needed.

[0031] S9 specifically includes: S91, straight line segment fitting: Use the improved RANSAC algorithm to fit several straight line segments to the boundary point cloud data in each cluster, denoted as ,in The parametric equation is: ,in, For the The slope of a straight line segment, For the The intercept of the line segment; S92, each fitted straight line segment The extended straight line segment is recorded as ; S93, calculate adjacent extended straight line segments and The intersection point, the intersection coordinates , obtained by solving the following system of equations: , and we get: ; ; S94, intersection filtering: filtering all calculated intersections to remove abnormal intersections that do not conform to the building outline; S95, feature line construction: connect the filtered intersection points in sequence to construct the overall feature line of the building facade; S96, optimize the constructed feature line to ensure its smoothness and accuracy, and use the curve fitting algorithm to smooth the feature line. The smoothing process is as follows: Initialize the intersection set: All the intersection points obtained by extending adjacent straight line segments Arrange them in order to form an intersection set; Select the curve fitting method: Select a curve fitting algorithm that is suitable for the building contour, such as B-spline curve fitting or polynomial fitting; Curve fitting parameter setting: according to the selected fitting method, set relevant parameters, such as the number of nodes of the B-spline curve or the order of the polynomial; Construct a fitting curve model: construct a fitting curve model using the selected curve fitting method; Calculate the fitting curve: Calculate the parameters of the curve fitting model according to the intersection point set to obtain the fitting curve; Curve smoothing: Smooth the fitted curve to remove noise and sharp turning points on the curve; Verify the fit between the smooth curve after fitting and the actual building outline, and adjust the fitting parameters as needed to ensure the accuracy and smoothness of the characteristic line.

[0032] S10 specifically includes: Compare the extracted feature lines with the original point cloud data, and calculate the distance from each feature line point to its corresponding original point cloud point; Calculate error indicators: Calculate the error indicators between feature lines and original point cloud data, including average error, root mean square error and maximum error; Error analysis: Analyze the calculated error index to determine whether the accuracy of the characteristic line meets the requirements; You can also draw an error distribution graph to show the distribution of errors at each point on the feature line, help identify areas with large errors, and adjust the parameters of the feature line extraction algorithm based on the error analysis to optimize the feature line extraction accuracy.

[0033] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present invention is limited to these examples. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity.

[0034] The present invention is intended to cover all such substitutions, modifications and variations that fall within the broad scope of the claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A building feature line extraction method based on three-dimensional point cloud, characterized in that: The following steps are involved: S1, point cloud data acquisition: use a 3D laser scanner to obtain point cloud data of the building; S2, point cloud preprocessing: preprocessing the collected point cloud data, including deleting isolated points and noise points; S3, building facade detection: using the improved RANSAC algorithm to detect the building facade and determine the fitting plane; S4, outlier removal: remove outliers from the facade point cloud based on multi-scale statistical analysis method; S5, point cloud projection: project the denoised point cloud data onto the fitting plane to ensure the accuracy of feature line extraction; S6, boundary extraction: use the adaptive alpha shape algorithm to extract the boundary of the facade point cloud; S7, boundary clustering: the density peak clustering algorithm is used to separate the boundary point cloud into multiple clusters; S8, straight line segment extraction: use the improved RANSAC algorithm to extract the straight line segments of the boundary point cloud from each cluster; S9, intersection calculation: by extending adjacent straight line segments to obtain their intersection points, the overall characteristic line of the building facade is obtained; S10, precision check: perform precision check on the extracted feature lines.

2. The building feature line extraction method based on three-dimensional point cloud according to claim 1, characterized in that: The S3 specifically includes: , inlier threshold and fitting accuracy ; S32, dynamic sampling strategy: dynamically adjust the number of sample points under different sampling scales to improve the adaptability of the algorithm to building facades of different scales; S33, preliminary facade detection: In each iteration, randomly select points as sample point set and calculate the candidate plane parameters; S34, interior point evaluation: Using the parameters of the candidate plane, calculate the distance from all points to the plane, defined as: ,in, For point The distance to the plane, are the coordinates of the point, are the parameters of the plane; S35, interior point selection: If , then point For the interior points, count the number of interior points and select the candidate plane with the largest number of interior points; S36, plane fitting optimization: using the least squares method to fit the selected internal point set to optimize the plane parameters; S37, adaptive adjustment: After each iteration, the number of sampling points and the number of iterations are adjusted according to the ratio of inliers. The formula is: ,in, is the expected confidence level, is the interior point ratio, is the number of sampling points.

3. The building feature line extraction method based on three-dimensional point cloud according to claim 1, characterized in that: The S4 specifically includes: S41, Neighborhood definition: Define a neighborhood for each point in the point cloud dataset ,in It is a point is the center and the radius is The set of all points in the sphere where is a multi-scale parameter; S42, distance calculation: For each point , calculate the distance to all points in the neighborhood ,in, represents the Euclidean distance, ; S43, multi-scale average distance: Calculate the average distance of each point at different scales, expressed as: ,in, is the number of points in the neighborhood, Indicates scale; S44, outlier detection: The multi-scale average distance of all points follows a Gaussian distribution, and the global average distance is calculated and standard deviation ; S45, outlier identification: Identify points in the point cloud dataset whose multi-scale average distance exceeds the threshold as outliers, that is: ,in, is the set standard deviation multiple; S46, outlier removal: delete all points identified as outliers to obtain a point cloud data set after the outliers are removed.

4. The method for extracting building feature lines based on three-dimensional point clouds according to claim 2, characterized in that: The S5 specifically includes: S51, determine the fitting plane parameters: obtain the parameter equation of the fitting plane through the RANSAC algorithm, which is in the form of: ,in, and are the parameters of the fitting plane; S52, point cloud plane distance calculation: For each point after denoising , calculate its perpendicular distance to the fitting plane ; S53, projection point calculation: each point Project onto the fitting plane to get the projection point ; S54, Projected point cloud integration: All points The projection point Integration is performed to form a projected point cloud dataset, and the accuracy of the projected point cloud dataset is verified to ensure that the error in the projection process is within a preset range to ensure the accuracy of feature line extraction.

5. The method for extracting building feature lines based on three-dimensional point clouds according to claim 1, characterized in that: The boundary extraction in S6 specifically includes: S61, set the initial parameters of the alphashape algorithm, including the initial radius ; S62, Neighborhood definition: Define a neighborhood for each point in the point cloud dataset ,in, It is a point is the center and the radius is The set of all points in the sphere of S63, neighborhood density calculation: Calculate the density of points in the neighborhood of each point: ,in, is the number of points in the neighborhood; S64, Adaptive Radius Adjustment: Adjust the alpha radius of each point according to the density of the point cloud data , the formula is: ,in, is the maximum density in the point cloud dataset; S65, using adaptive radius Construct alphashape and set the radius The ball rolls on the point cloud dataset to form a boundary; S66, boundary extraction: record the boundary points formed by rolling the alphashape and extract the boundary of the facade point cloud.

6. The method for extracting building feature lines based on three-dimensional point clouds according to claim 5, characterized in that: After the boundary extraction, the process further includes boundary optimization, wherein the boundary is optimized by a gradient descent algorithm to improve the boundary accuracy.

7. The method for extracting building feature lines based on three-dimensional point clouds according to claim 3, characterized in that: The boundary clustering in S7 specifically includes: S71, calculate the Euclidean distance between all points in the boundary point cloud to form a distance matrix ,in Indicate point and Point The distance between S72, density calculation: for each point Calculate its local density , the local density is defined as the point At the distance threshold The number of points inside is expressed as: ; S73, distance peak calculation: calculate each point Minimum distance to a point with higher local density , expressed as: , for the point with the highest local density, set ; S74, select local density and distance peak The highest point is taken as the cluster center; S75, assign other points to the cluster where the nearest cluster center is located. Each point is assigned according to its distance and density from the cluster center. The formula is: ,in, represents the cluster center, For point The distance to the cluster center; S76, cluster optimization: optimize the initially allocated clusters, adjust the affiliation of the points, maximize the density of each cluster, and output the finally allocated clusters as multiple clusters of the boundary point cloud.

8. The method for extracting building feature lines based on three-dimensional point clouds according to claim 3, characterized in that: The S8 specifically includes: S81, process the boundary point cloud of each cluster separately and divide the point cloud data set into multiple clusters ,in Indicates the cluster number; S82, sample point selection: In each cluster, randomly select points as sample point set and calculate the candidate line parameters; S83, candidate straight line fitting: according to the sample point set, the candidate straight line is fitted using the least squares method, and the parameter equation of the candidate straight line is calculated, which is expressed as: ,in, is the slope of the straight line, is the intercept of the straight line; S84, interior point evaluation: using the parameters of the candidate line, calculate the perpendicular distance from each point to the line , the formula is: ,if , then point is the inlier point, count the number of inliers; S85, interior point selection: select the candidate straight line with the largest number of interior points as the best straight line of the current cluster; S86, Line Fitting Optimization: Use the least squares method to fit the selected internal point set to optimize the line parameters. The formula is: ,in, are the coordinates of the interior point, is the number of interior points; S87, straight line segment extraction: extract the optimized straight line segment, extend the adjacent straight line segments to their intersection points, and form a complete boundary straight line segment; S88, adaptive adjustment: After each iteration, the number of sampling points and the number of iterations are adjusted according to the ratio of inliers. The formula is: ,in, is the expected confidence level, is the interior point ratio, is the number of sampling points; S89, verify the accuracy of the extracted straight line segment to ensure that it meets the requirements of building boundary detection, and adjust the RANSAC parameters for iterative optimization as needed.

9. The method for extracting building feature lines based on three-dimensional point clouds according to claim 8, characterized in that: The S9 specifically includes: S91, straight line segment fitting: Use the improved RANSAC algorithm to fit several straight line segments to the boundary point cloud data in each cluster, denoted as ,in The parametric equation is: ,in, For the The slope of a straight line segment, For the The intercept of the line segment; S92, each fitted straight line segment The extended straight line segment is recorded as ; S93, calculate adjacent extended straight line segments and The intersection point, the intersection coordinates , obtained by solving the following system of equations: , and we get: ; ; S94, intersection filtering: filtering all calculated intersections to remove abnormal intersections that do not conform to the building outline; S95, feature line construction: connect the filtered intersection points in sequence to construct the overall feature line of the building facade; S96, optimizes the constructed feature lines to ensure their smoothness and accuracy, and uses a curve fitting algorithm to smooth the feature lines.

10. The method for extracting building feature lines based on three-dimensional point clouds according to claim 1, characterized in that: The S10 specifically includes: Compare the extracted feature lines with the original point cloud data, and calculate the distance from each feature line point to its corresponding original point cloud point; Calculate error indicators: Calculate the error indicators between feature lines and original point cloud data, including average error, root mean square error and maximum error; Error analysis: Analyze the calculated error indicators to determine whether the accuracy of the characteristic line meets the requirements.

Citation Information

Patent Citations

  • Ground laser point cloud building contour line extraction method based on improved Alpha Shapes algorithm

    CN112802041A

  • Laser point cloud building contour progressive optimization method based on multi-dimensional features

    CN116824379A

  • Building information extraction method facing ground LiDAR point cloud

    CN116883754A

  • Any group target shape identification method based on data driving

    CN117194945A

  • Single building three-dimensional reconstruction method based on point cloud semantic segmentation and structure fitting

    WO2024077812A1

Cited By

  • Building deformation monitoring system and method based on three-dimensional laser scanning technology

    CN118857134A

  • Multi-scale point cloud feature extraction method and device for dividing neighborhoods based on feature points

    CN119180965A

  • Production quality inspection method, device and system for special-shaped parts

    CN119251175A

  • Production quality inspection method, device and system for special-shaped parts

    CN119251175B

  • Pit slot volume rapid identification and detection method for road repair

    CN119693442A