A point cloud segmentation method for window components on the exterior walls of buildings

Through principal component analysis and Hough transformation and other technologies, combined with DBSCAN clustering method, the problem of point cloud segmentation of the building's facade is solved, and the rapid and accurate positioning and segmentation of window components is achieved, which improves the efficiency of three-dimensional reconstruction and accuracy.

CN118691829BActive Publication Date: 2024-11-26ZHEJIANG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411190374.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-11-26
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

In the prior art, the segmentation of three-dimensional point clouds on the facade of a building has problems such as large data volume, few semantics, and difficult to segment. In particular, the segmentation of window components requires manual labeling, which is difficult, time-consuming and error-prone.

Method used

The main component analysis method is used to obtain the main direction of the three-dimensional point cloud, and after coarse calibration and precision calibration, the facade point cloud of the building is gradually divided through technologies such as projection, rasterization and Hough transformation, combined with the DBSCAN clustering method. , position the window components.

Benefits of technology

It realizes the rapid and accurate segmentation of window components point clouds on the facade of the building, solves the difficulties and inefficiency of manual labeling, and improves the efficiency and accuracy of three-dimensional reconstruction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691829B_ABST
    Figure CN118691829B_ABST
Patent Text Reader

Abstract

The present invention discloses a window component point cloud segmentation method applicable to the exterior wall of a building complex, the method comprising: roughly calibrating a three-dimensional point cloud by a PCA method, and then finely calibrating the angle of the point cloud facade by a least square method; projecting the point cloud to the facade plane and rasterizing it, fitting the top contour line segment based on Hough transform, determining the roof contour line by clustering the straight line segment parameters, so as to segment and obtain the facade point cloud of a single building; extracting the main plane of the facade point cloud by a RANSAC method, projecting in the horizontal direction and statistically analyzing the point cloud density distribution, using DBSCAN clustering to analyze the maximum value points after filtering, and segmenting the single-layer point cloud; projecting the single-layer point cloud in the vertical plane direction and rasterizing it, removing the clutter by dilation and corrosion, and analyzing the one-dimensional projection density curve in both directions to segment the window point cloud. The present invention only needs to collect the point cloud data of the facade of the building complex, and can quickly and accurately complete the segmentation of the window component point cloud.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of building facade detection, and in particular to a window component point cloud segmentation method suitable for the exterior walls of building complexes. Background Art

[0002] At present, in the fields of digital cities, urban post-disaster reconstruction, map navigation, etc., it is necessary to locate and reconstruct buildings to a certain extent. However, the common method of collecting data on the facades of buildings requires the use of three-dimensional laser radar, and the resulting three-dimensional point cloud has the problems of large data volume, little semantics, and difficulty in segmentation. When it is necessary to reconstruct the building in three dimensions, the obtained facade point cloud needs to be further segmented, among which the window is one of the important features of the facade, and the existing methods are mostly based on manual annotation and segmentation methods. Manual annotation of three-dimensional point clouds is difficult, time-consuming, and prone to errors. Therefore, there is an urgent need for a window component point cloud segmentation method suitable for the exterior walls of building complexes. This is very necessary and can improve the annotation speed of three-dimensional point clouds, which has important application value. Summary of the invention

[0003] The purpose of the present invention is to provide a point cloud segmentation method for window components on the exterior walls of a building complex in view of the shortcomings of the prior art. The present invention only needs to collect the point cloud of the facade of the building complex for analysis and processing, so as to quickly and accurately locate the window point cloud information on the facade.

[0004] The object of the present invention is achieved through the following technical solution: A point cloud segmentation method for window components applicable to the exterior wall of a building complex comprises the following steps:

[0005] (1) The principal component analysis method is used to obtain the main direction of the 3D point cloud, and it is rotated to the coordinate axis direction for rough calibration. The 3D point cloud is then projected along the coordinate axis perpendicular to the facade and rasterized. The bottom edge of the projected image is fitted using the least squares method, and the angle of the point cloud facade is precisely calibrated based on the direction of the fitted straight line.

[0006] (2) The calibrated point cloud is projected onto the facade plane and rasterized. The highest pixel in each column is taken as the top contour of the building. The contour line segments are fitted based on the Hough transform. The roof contour line is determined by clustering the straight line segment parameters. Based on this, the building facade group is segmented into independent building facades to obtain the facade point cloud of a single building.

[0007] (3) For the facade point cloud of a single building, the main plane of the point cloud is extracted by the random sample consistency method, the main plane of the point cloud is projected in the horizontal direction and the density distribution of the point cloud is statistically analyzed. After filtering the density distribution curve, the DBSCAN clustering method is used to cluster and analyze its maximum points. Based on the maximum points, the facade point cloud is segmented into single-floor point clouds;

[0008] (4) For a single-floor point cloud, it is projected along the vertical plane and rasterized. Noise is removed by pixel dilation and erosion. Then, through horizontal and vertical one-dimensional projection, the projection density curve is analyzed to segment the window point cloud.

[0009] Furthermore, the step (1) specifically includes the following sub-steps:

[0010] (1.1) The principal direction of the three-dimensional point cloud is calculated by the principal component analysis method. Specifically, for the three-dimensional point cloud coordinate matrix with n rows and 3 columns, First, the coordinate data is centered so that the average coordinate value of all three-dimensional point clouds is located at the origin of the coordinate axis; then, based on the centered coordinate data, the covariance matrix of the coordinate matrix is ​​calculated, and the covariance matrix is ​​subjected to singular value decomposition to obtain three eigenvalues ​​and their corresponding eigenvectors, where the eigenvector corresponding to the maximum eigenvalue is the main direction of the three-dimensional point cloud;

[0011] (1.2) Calculate the angle between the main direction and the coordinate axis, and rotate the point cloud to the direction parallel to the main axis according to the angle to achieve a rough calibration of the 3D point cloud. Specifically, first, the eigenvector corresponding to the main direction As a direction vector, divide each component of the direction vector by the length of the direction vector to get the unit vector ; Then calculate the first angle between the direction vector and the x-axis on the xz plane based on the unit vector , and the second angle between the direction vector and the y-axis ; Secondly, according to the first angle Rotate the 3D point cloud around the y-axis until the direction vector is parallel to the xy plane, and then according to the second angle Rotate the 3D point cloud around the z-axis until the direction vector is parallel to the y-axis to achieve a rough calibration of the 3D point cloud and obtain the coordinate matrix of the 3D point cloud after preliminary calibration. ;

[0012] (1.3) The three-dimensional point cloud of the building complex is projected along the coordinate axis direction perpendicular to the facade and rasterized. The bottom pixel is taken as the contour of the building in contact with the ground. A straight line is fitted using the least squares method. The inclination angle of the point cloud is obtained based on the slope of the obtained straight line. , according to the tilt angle Rotate the 3D point cloud around the x-axis to achieve precise calibration of the facade point cloud and obtain the 3D point cloud coordinate matrix after precise calibration .

[0013] Furthermore, in the step (1.2), the first angle and the second angle The calculation formulas are:

[0014]

[0015]

[0016] in, , , They are the x-axis, y-axis, and z-axis coordinates of the unit vector respectively;

[0017] In the step (1.2), the three-dimensional point cloud coordinate matrix after the preliminary calibration is The calculation formula is:

[0018]

[0019] in, is the original three-dimensional point cloud coordinate matrix; is the first rotation matrix, which is used to represent the rotation process of the three-dimensional point cloud around the y-axis. ; is the second rotation matrix, which is used to represent the rotation process of the three-dimensional point cloud around the z-axis. .

[0020] Furthermore, in the step (1.3), the inclination angle The calculation formula is:

[0021]

[0022] Where k is the slope of the fitted line;

[0023] In the step (1.3), the three-dimensional point cloud coordinate matrix after the precise calibration is The calculation formula is:

[0024]

[0025] in, is the third rotation matrix, which is used to represent the rotation process of the three-dimensional point cloud around the x-axis. .

[0026] Furthermore, the step (2) specifically includes:

[0027] The calibrated point cloud is projected in the direction perpendicular to the facade and rasterized. The pixel coordinates of the highest point in each column are taken as the top contour of the building. For the rasterized top contour, the contour line segments are fitted using Hough transform to obtain the straight line segment parameters. ,in represents the length of the perpendicular line from the origin to the straight line segment, Represents the angle between the perpendicular line from the origin to the straight line segment and the positive direction of the x-axis; the DBSCAN clustering method is used to cluster the grid points in the parameter space to obtain multiple clusters and their corresponding cluster centers. Each cluster represents the roof of a building. All straight line segments are classified based on this, and the cluster center is used as the straight line segment parameter of the corresponding cluster; for all straight line segments in each category, the maximum and minimum values ​​of the coordinates of the straight line segment endpoints are selected as the horizontal coordinates of the endpoints of the cluster, and the vertical coordinates of the endpoints are calculated according to the straight line segment parameters of the cluster center to realize the merging of the straight line segments in each cluster; the endpoints of the merged straight line segments are clustered to cluster the head and tail endpoints of adjacent straight line segments into the same cluster; the cluster center of each cluster is taken as the reference point for facade segmentation, and the coordinate range of the segmentation area is determined according to the reference point; the facade point cloud is sliced ​​according to the coordinate range of the segmentation area to obtain the facade point cloud of a single building.

[0028] Furthermore, the step (3) specifically includes:

[0029] For the facade point cloud of a single building, the random sample consistency method is used to fit the main plane of the point cloud and remove noise points at the same time; the main plane of the point cloud is projected in the horizontal direction to obtain a one-dimensional point cloud, and the density distribution of the point cloud is statistically analyzed to obtain the density distribution curve of the point cloud; after smoothing and filtering the density distribution curve of the point cloud, the maximum point of the density distribution curve is calculated, and the DBSCAN clustering method is used to cluster the vertical coordinates of the maximum points, and the cluster with the largest number of points is taken as the confidence cluster, and the horizontal coordinates of the points in the confidence cluster are taken as the segmentation points. The facade point cloud of a single building is segmented to obtain a single-floor point cloud.

[0030] Furthermore, the step (4) specifically includes:

[0031] For the single-floor point cloud, the point cloud data of the single floor is projected along the vertical plane direction and rasterized; the obtained raster image is expanded and eroded using a 3×3 pixel core to eliminate small holes and remove noise; based on the processed raster image, the horizontal and vertical pixel distribution are statistically analyzed, and the horizontal pixel distribution curve and the vertical pixel distribution curve are drawn respectively; the boundary of the window projection is determined according to the start and end positions of the horizontal segment in the pixel distribution curve; the corner points of the window can be determined by combining the projection boundaries of the rows and columns of the window to complete the segmentation of the window point cloud.

[0032] The beneficial effect of the present invention is that the present invention only needs to collect point cloud data of the building facade for analysis and processing, and can quickly segment the point cloud of the building facade into point clouds of single buildings and single floors, and further locate the outline coordinates of the windows, so as to quickly and accurately obtain the results of the point cloud segmentation of the window components; the present invention analyzes and processes the point cloud of the building facade obtained by the lidar through a series of methods such as coordinate correction, projection, and slicing, which can realize accurate and stable positioning and segmentation of the windows on the exterior wall, and can solve the problem of difficult and inefficient manual labeling. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a flow chart of the point cloud segmentation method of window components applicable to the exterior wall of a building complex of the present invention;

[0034] Figure 2 It is a coordinate correction effect diagram based on the PCA method and the least squares method of the present invention;

[0035] Figure 3 It is a schematic diagram of the effect of the point cloud before and after the least squares fitting adjustment under the two-dimensional perspective of the present invention;

[0036] Figure 4 is the roof profile extraction result and its fitting diagram of the present invention; wherein, Figure 4 (a) in the figure is the roof profile extraction result. Figure 4 (b) is the contour point connection line and straight line fitting result diagram;

[0037] Figure 5 It is the horizontal projection density curve of the single building exterior wall and the exterior wall segmentation effect diagram of the present invention; wherein, Figure 5 (a) is a one-dimensional density statistical diagram of the horizontal projection of the exterior wall of a single building and its curve smoothing effect diagram. Figure 5 (b) is the effect diagram of the exterior wall segmentation;

[0038] Figure 6 It is a single-layer exterior wall point cloud plane projection grid map of the present invention and its expansion and corrosion processing effect map; wherein, Figure 6 (a) is the result of the plane projection rasterization of the single-layer exterior wall point cloud. Figure 6 (b) shows the effect of further expansion and corrosion treatment;

[0039] Figure 7 It is the pixel count statistics and boundary positioning result diagram of the horizontal and vertical projection of the single-layer grid image of the present invention; wherein, Figure 7 (a) in the figure is the pixel count statistics and boundary positioning result diagram of the horizontal projection of a single-layer grid image. Figure 7 (b) in the figure is the pixel count statistics and boundary positioning result of the vertical projection of the single-layer raster image. DETAILED DESCRIPTION

[0040] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims. It should be understood that the above general description and the detailed description that follows are merely exemplary and explanatory and cannot limit the present application.

[0041] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0042] It should be understood that, although the term first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of..." or "when..." or "in response to determination". Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process and method including a series of elements include not only those elements, but also include other elements not clearly listed, or also include elements inherent to such process and method. In the absence of more restrictions, the elements limited by the statement "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements.

[0043] The present invention is described in detail below in conjunction with the accompanying drawings. In the absence of conflict, the features of the following embodiments and implementations can be combined with each other.

[0044] See also Figure 1 The present invention is applicable to the window component point cloud segmentation method of the building complex exterior wall, which specifically includes the following steps:

[0045] (1) The principal component analysis (PCA) method is used to obtain the main direction of the 3D point cloud and rotate it to the coordinate axis direction for rough calibration. The effect after rough calibration is as follows: Figure 2 As shown, the 3D point cloud is projected along the coordinate axis perpendicular to the facade and rasterized, and the bottom edge of the projected image is fitted by the least squares method. The angle of the point cloud facade is precisely calibrated based on the direction of the fitting line. The effect after precise calibration is as follows Figure 2 shown.

[0046] (1.1) The main direction of the three-dimensional point cloud is calculated by the PCA method. Specifically, for the three-dimensional point cloud coordinate matrix with n rows and 3 columns First, the coordinate data is centered so that the average coordinate value of all three-dimensional point clouds is located at the origin of the coordinate axis; then, based on the centered coordinate data, the covariance matrix of the coordinate matrix is ​​calculated, and the covariance matrix is ​​decomposed by singular value to obtain three eigenvalues ​​and their corresponding eigenvectors, where the eigenvector corresponding to the maximum eigenvalue is the main direction of the three-dimensional point cloud.

[0047] It should be noted that the coordinate data is centralized, that is, the coordinates of each 3D point cloud are subtracted from the average coordinates of all 3D point clouds. The effect is that the average coordinates of the 3D point cloud after the centralization are located at the origin of the coordinate axis.

[0048] (1.2) Calculate the angle between the main direction and the coordinate axis, and rotate the point cloud to the direction parallel to the main axis according to the angle to achieve a rough calibration of the 3D point cloud. Specifically, first, the eigenvector corresponding to the main direction As a direction vector, divide each component of the direction vector by the length of the direction vector to get the unit vector ; Then calculate the first angle between the direction vector and the x-axis on the xz plane based on the unit vector , and the second angle between the direction vector and the y-axis ; Secondly, according to the first angle Rotate the 3D point cloud around the y-axis until the direction vector is parallel to the xy plane, and then according to the second angle Rotate the 3D point cloud around the z-axis until the direction vector is parallel to the y-axis to achieve a rough calibration of the 3D point cloud and obtain the coordinate matrix of the 3D point cloud after preliminary calibration. .

[0049] Furthermore, the first angle and the second angle The calculation formulas are:

[0050]

[0051]

[0052] in, , , are the x-axis, y-axis, and z-axis coordinates of the unit vector respectively.

[0053] Furthermore, the three-dimensional point cloud coordinate matrix after preliminary calibration The calculation formula is:

[0054]

[0055] in, is the original three-dimensional point cloud coordinate matrix; is the first rotation matrix, which is used to represent the rotation process of the three-dimensional point cloud around the y-axis. ; is the second rotation matrix, which is used to represent the rotation process of the three-dimensional point cloud around the z-axis. .

[0056] Specifically, firstly, the eigenvector corresponding to the main direction As a direction vector, divide each component of the direction vector by the length of the direction vector to get the unit vector Then, the first angle between the direction vector and the x-axis on the xz plane is calculated based on the unit vector. , according to the first angle Get the first rotation matrix , the first rotation matrix The function is to rotate the 3D point cloud around the y-axis , the direction vector after rotation is parallel to the xy plane; secondly, in the first rotation matrix The second angle between the direction vector and the y-axis during the rotation process Unchanged, when the direction vector rotates to be parallel to the xy plane, it rotates around the z axis To the direction vector is parallel to the y-axis, the rotation process is expressed by the matrix: , after rotation, we get the point cloud coordinate matrix after the initial calibration of the coordinates .

[0057] (1.3) Project the 3D point cloud of the building complex along the coordinate axis direction perpendicular to the facade and perform rasterization. Take the bottom pixel as the contour of the building in contact with the ground, fit a straight line using the least squares method, and obtain the inclination angle of the point cloud based on the slope of the obtained straight line. , according to the tilt angle Rotate the 3D point cloud around the x-axis to achieve precise calibration of the facade point cloud and obtain the 3D point cloud coordinate matrix after precise calibration .

[0058] It should be understood that since the 3D point cloud of the building complex is not an ideal cuboid, further fine calibration is required after the rough calibration. The point cloud is finely calibrated using the least squares fitting method in a two-dimensional perspective. The point cloud effects before and after fine calibration are as follows: Figure 3 As shown in the figure, the horizontal and vertical coordinates represent the grid of the building point cloud. Figure 3 It can be seen that the point cloud has a tilt angle before fine calibration, and the tilt angle of the point cloud is eliminated after fine calibration.

[0059] Furthermore, the tilt angle The calculation formula is:

[0060]

[0061] Among them, if the axis perpendicular to the facade is the x-axis, then the coordinates of the projected point cloud are the y and z coordinates. The y-axis is used as the horizontal axis and the z-axis is used as the vertical axis. The least squares method is used to fit the straight line. k is the slope of the fitted straight line. The above formula can be used to calculate the inclination angle of the point cloud. .

[0062] Furthermore, the three-dimensional point cloud coordinate matrix after precise calibration The calculation formula is:

[0063]

[0064] in, is the third rotation matrix, which is used to represent the rotation process of the three-dimensional point cloud around the x-axis. .

[0065] (2) The calibrated point cloud is projected onto the facade plane and rasterized. The highest pixel in each column is taken as the top contour of the building. The contour line segments are fitted based on the Hough transform. The roof contour line is determined by clustering the straight line segment parameters. Based on this, the building facade group is segmented into independent building facades to obtain the facade point cloud of a single building, as shown in Figure 2. Figure 4 shown.

[0066] Specifically, the calibrated point cloud is projected in the direction perpendicular to the facade and rasterized; the pixel coordinates of the highest point in each column are taken as the top contour of the building, such as Figure 4 As shown in (a) in the figure, for the rasterized top contour, the Hough Transform is used to fit the contour segments, as shown in Figure 4 As shown in (b) in the figure, the parameters of the straight line segment are obtained. ,in represents the length of the perpendicular line from the origin to the straight line segment, Represents the angle between the perpendicular line from the origin to the straight line segment and the positive direction of the x-axis; the DBSCAN clustering method is used to cluster the grid points in the parameter space to obtain multiple clusters and their corresponding cluster centers. Each cluster represents the roof of a building. All straight line segments are classified based on this, and the cluster center is used as the straight line segment parameter of the corresponding cluster; for all straight line segments in each category, the maximum and minimum values ​​of the coordinates of the straight line segment endpoints are selected as the horizontal coordinates of the endpoints of the cluster, and the vertical coordinates of the endpoints are calculated according to the straight line segment parameters of the cluster center to realize the merging of the straight line segments in each cluster; the endpoints of the merged straight line segments are clustered to cluster the head and tail endpoints of adjacent straight line segments into the same cluster; the cluster center of each cluster is taken as the reference point for facade segmentation, and the coordinate range of the segmentation area is determined according to the reference point; the facade point cloud is sliced ​​according to the coordinate range of the segmentation area to obtain the facade point cloud of a single building.

[0067] It should be understood that Hough transform is a more traditional method in image line detection. Hough transform can quickly and effectively detect straight lines in images, but due to the randomness of Hough transform, the straight line segments obtained contain many repeated parts. The straight line where the straight line segment is located is written in parametric form, that is, , the lines where the nearly overlapping straight line segments are located are represented as points with similar coordinates in the parameter space, based on which DBSCAN clustering can be performed, and each cluster can represent the roof of a building. Among them, the DBSCAN clustering method is an unsupervised density-based noise application space clustering method, which can determine the category of points according to the density of neighborhood points without setting the number of clusters in advance.

[0068] It should be noted that since the obtained straight line segments are not necessarily connected at the beginning and the end, the segmented areas they cover may overlap or be discontinuous. In order to make the segmented areas connected at the beginning and the end, the endpoints of the straight line segments need to be clustered; for example, if there are two straight line segments, the right endpoint of the left straight line segment and the left endpoint of the right straight line segment will be divided into a cluster, and their cluster centers will replace the original endpoints, so that the two straight line segments are continuous in coordinates.

[0069] (3) For the facade point cloud of a single building, the main plane of the point cloud is extracted by the Random Sample Consensus (RANSAC) method. The main plane of the point cloud is projected in the horizontal direction and the density distribution of the point cloud is statistically analyzed. After filtering the density distribution curve, the DBSCAN clustering method is used to cluster and analyze its maximum points. Based on the maximum points, the facade point cloud is segmented into single-floor point clouds.

[0070] Specifically, for the facade point cloud of a single building, the RANSAC method is used to fit the main plane of the point cloud, and the noise points are removed to prevent the interference caused by the laser radar scanning the points inside the building; the main plane of the point cloud is projected in the horizontal direction to obtain a one-dimensional point cloud, and the density distribution of the point cloud is statistically calculated to obtain the density distribution curve of the point cloud; after smoothing and filtering the density distribution curve of the point cloud, the effect is as follows Figure 5 As shown in (a), the maximum point of the smoothed curve is also marked with a circle. The maximum point of the density distribution curve is calculated. In order to stabilize the result, the DBSCAN clustering method is used to cluster the ordinates of the maximum points. The cluster with the largest number of points is taken as the confidence cluster. The abscissa of the points in the confidence cluster is taken as the segmentation point. The facade point cloud of a single building is segmented to obtain a single-floor point cloud. The corresponding exterior wall segmentation effect is shown in Figure 5 As shown in (b) in .

[0071] like Figure 5 As shown, Figure 5 The three-dimensional points in (b) are projected onto the height axis, and then the number of points in each interval is counted. For example, if the interval length is set to 0.1m, the number of points falling within the interval is counted every 0.1m in the height direction. Figure 5 The horizontal axis of (a) is equivalent to Figure 5 The height axis in (b) is simply scaled by a certain ratio, and the vertical axis is the number of points. Figure 5 What this means is that the distribution of the point cloud in height is periodic, and the peak is located at the junction of the floors.

[0072] It should be understood that the RANSAC method is a commonly used algorithm for fitting planes. This method randomly selects three points from a point set to determine a plane, and evaluates whether the number of points within a certain distance near the plane exceeds a certain number to determine whether the fitting is successful. This method is fast and suitable for scenes with obvious features.

[0073] It should be noted that due to the device's own structure, on-site lighting, reflections from scanned objects, and other reasons, there will be points that do not exist originally, and there are also points that should not appear due to irrelevant people walking around, so these noise points need to be removed. These noise points appear as outliers in the data, that is, points that are a certain distance away from the main point cloud, have a small amount of data, and are irregularly distributed. Here, after fitting the main plane, which is actually the plane where the building facade is located, the remaining points are discarded as noise points.

[0074] (4) For a single-floor point cloud, it is projected along the vertical plane and rasterized. Noise is removed by pixel dilation and erosion. Then, through horizontal and vertical one-dimensional projection, the projection density curve is analyzed to segment the window point cloud.

[0075] Specifically, for the single-floor point cloud, the point cloud data of the single floor is projected along the vertical plane direction and rasterized. The resulting raster image is as follows: Figure 6 As shown in (a) of the figure, the obtained raster image is expanded and eroded using a 3×3 pixel core to eliminate small holes and remove noise. The effect is as follows: Figure 6 As shown in (b) in FIG. 1 ; based on the processed raster image, the horizontal and vertical pixel distributions are counted, and the horizontal pixel distribution curve and the vertical pixel distribution curve are drawn respectively, as shown in FIG. Figure 7 As shown; the projection boundary of the window is determined according to the starting and ending positions of the horizontal segment in the pixel distribution curve; the corner points of the window can be determined by combining the projection boundaries of the rows and columns of the window to complete the segmentation of the window point cloud.

[0076] Furthermore, when drawing the horizontal pixel distribution curve and the vertical pixel distribution curve, the horizontal axis of the grid image is assumed to be the x-axis and the vertical axis is assumed to be the y-axis. When counting the horizontal pixel distribution, the horizontal coordinate of the curve graph is the x-axis coordinate of the grid image, and the vertical coordinate is the number of pixels. When counting the vertical pixel distribution, the horizontal coordinate of the curve graph is the y-axis coordinate of the grid image, and the vertical coordinate is the number of pixels.

[0077] Among them, the horizontal pixel distribution curve drawn Figure 7 As shown in (a) in the figure, the vertical pixel distribution curve is as follows Figure 7 As shown in (b), the horizontal axis is the grid corresponding to the single-floor point cloud, and the vertical axis is the total number of pixels corresponding to the grid. Since there are no holes in the non-window area, the pixel distribution is stable, and the statistical curve shows obvious horizontal segment characteristics, such as Figure 7 As shown, jitter within a certain range is allowed in the horizontal segment to ensure the robustness of the algorithm, and the boundary of the window projection can be determined according to the start and end positions of the horizontal segment.

[0078] To sum up, the present invention only needs to collect point cloud data of the building facade for analysis and processing, and can quickly segment the point cloud of the building facade into point clouds of single buildings and single floors, and further locate the outline coordinates of the windows, so as to quickly and accurately obtain the results of the point cloud segmentation of window components; the present invention analyzes and processes the point cloud of the building facade obtained by the lidar through a series of methods such as coordinate correction, projection, and slicing, which can realize accurate and stable positioning and segmentation of windows on the exterior wall, and can solve the problems of difficult and inefficient manual labeling.

[0079] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A point cloud segmentation method for window components on the exterior walls of buildings. It is characterized in that The following steps are involved: (1) The principal component analysis method is used to obtain the main direction of the 3D point cloud, and it is rotated to the coordinate axis direction for rough calibration. The 3D point cloud is then projected along the coordinate axis perpendicular to the facade and rasterized. The bottom edge of the projected image is fitted using the least squares method, and the angle of the point cloud facade is precisely calibrated based on the direction of the fitted straight line. (2) The calibrated point cloud is projected onto the facade plane and rasterized. The highest pixel in each column is taken as the top contour of the building. The contour line segments are fitted based on the Hough transform. The roof contour line is determined by clustering the straight line segment parameters. Based on this, the building facade group is segmented into independent building facades to obtain the facade point cloud of a single building. (3) For the facade point cloud of a single building, the main plane of the point cloud is extracted by the random sample consistency method, the main plane of the point cloud is projected in the horizontal direction and the density distribution of the point cloud is statistically analyzed. After filtering the density distribution curve, the DBSCAN clustering method is used to cluster and analyze its maximum points. Based on the maximum points, the facade point cloud is segmented into single-floor point clouds; (4) For a single-floor point cloud, it is projected along the vertical plane and rasterized. Noise is removed by pixel dilation and erosion. Then, through horizontal and vertical one-dimensional projection, the projection density curve is analyzed to segment the window point cloud.

2. The window component point cloud segmentation method applicable to the exterior wall of a building complex according to claim 1, It is characterized in that The step (1) specifically includes the following sub-steps: (1.1) The principal direction of the three-dimensional point cloud is calculated by the principal component analysis method. Specifically, for the three-dimensional point cloud coordinate matrix with n rows and 3 columns, First, the coordinate data is centered so that the average coordinate value of all three-dimensional point clouds is located at the origin of the coordinate axis; then, based on the centered coordinate data, the covariance matrix of the coordinate matrix is ​​calculated, and the covariance matrix is ​​subjected to singular value decomposition to obtain three eigenvalues ​​and their corresponding eigenvectors, where the eigenvector corresponding to the maximum eigenvalue is the main direction of the three-dimensional point cloud; (1.2) Calculate the angle between the main direction and the coordinate axis, and rotate the point cloud to the direction parallel to the main axis according to the angle to achieve a rough calibration of the 3D point cloud. Specifically, first, the eigenvector corresponding to the main direction As a direction vector, divide each component of the direction vector by the length of the direction vector to get the unit vector ; Then calculate the first angle between the direction vector and the x-axis on the xz plane based on the unit vector , and the second angle between the direction vector and the y-axis ; Secondly, according to the first angle Rotate the 3D point cloud around the y-axis until the direction vector is parallel to the xy plane, and then according to the second angle Rotate the 3D point cloud around the z-axis until the direction vector is parallel to the y-axis to achieve a rough calibration of the 3D point cloud and obtain the coordinate matrix of the 3D point cloud after preliminary calibration. ; (1.3) The three-dimensional point cloud of the building complex is projected along the coordinate axis direction perpendicular to the facade and rasterized. The bottom pixel is taken as the contour of the building in contact with the ground. A straight line is fitted using the least squares method. The inclination angle of the point cloud is obtained based on the slope of the obtained straight line. , according to the tilt angle Rotate the 3D point cloud around the x-axis to achieve precise calibration of the facade point cloud and obtain the calibrated 3D point cloud coordinate matrix .

3. The window component point cloud segmentation method applicable to the exterior wall of a building complex according to claim 2, It is characterized in that In the step (1.2), the first angle and the second angle The calculation formulas are: ; ; in, , , They are the x-axis, y-axis, and z-axis coordinates of the unit vector respectively; In the step (1.2), the three-dimensional point cloud coordinate matrix after the preliminary calibration is The calculation formula is: ; in, is the original three-dimensional point cloud coordinate matrix; is the first rotation matrix, which is used to represent the rotation process of the three-dimensional point cloud around the y-axis. ; is the second rotation matrix, which is used to represent the rotation process of the three-dimensional point cloud around the z-axis. .

4. The window component point cloud segmentation method applicable to the exterior wall of a building complex according to claim 2, It is characterized in that In the step (1.3), the tilt angle The calculation formula is: ; Where k is the slope of the fitted line; In the step (1.3), the three-dimensional point cloud coordinate matrix after the precise calibration is The calculation formula is: ; in, is the third rotation matrix, which is used to represent the rotation process of the three-dimensional point cloud around the x-axis. .

5. The window component point cloud segmentation method applicable to the exterior wall of a building complex according to claim 1, It is characterized in that The step (2) specifically includes: The calibrated point cloud is projected in the direction perpendicular to the facade and rasterized. The pixel coordinates of the highest point in each column are taken as the top contour of the building. For the rasterized top contour, the contour line segments are fitted using Hough transform to obtain the straight line segment parameters. ,in represents the length of the perpendicular line from the origin to the straight line segment, Represents the angle between the perpendicular line from the origin to the straight line segment and the positive direction of the x-axis; the DBSCAN clustering method is used to cluster the grid points in the parameter space to obtain multiple clusters and their corresponding cluster centers. Each cluster represents the roof of a building. All straight line segments are classified based on this, and the cluster center is used as the straight line segment parameter of the corresponding cluster; for all straight line segments in each category, the maximum and minimum values ​​of the coordinates of the straight line segment endpoints are selected as the horizontal coordinates of the endpoints of the cluster, and the vertical coordinates of the endpoints are calculated according to the straight line segment parameters of the cluster center to realize the merging of the straight line segments in each cluster; the endpoints of the merged straight line segments are clustered to cluster the head and tail endpoints of adjacent straight line segments into the same cluster; the cluster center of each cluster is taken as the reference point for facade segmentation, and the coordinate range of the segmentation area is determined according to the reference point; the facade point cloud is sliced ​​according to the coordinate range of the segmentation area to obtain the facade point cloud of a single building.

6. The window component point cloud segmentation method applicable to the exterior wall of a building complex according to claim 1, It is characterized in that The step (3) specifically includes: For the facade point cloud of a single building, the random sample consistency method is used to fit the main plane of the point cloud and remove noise points at the same time; the main plane of the point cloud is projected in the horizontal direction to obtain a one-dimensional point cloud, and the density distribution of the point cloud is statistically analyzed to obtain the density distribution curve of the point cloud; after smoothing and filtering the density distribution curve of the point cloud, the maximum point of the density distribution curve is calculated, and the DBSCAN clustering method is used to cluster the vertical coordinates of the maximum points, and the cluster with the largest number of points is taken as the confidence cluster, and the horizontal coordinates of the points in the confidence cluster are taken as the segmentation points. The facade point cloud of a single building is segmented to obtain a single-floor point cloud.

7. The window component point cloud segmentation method applicable to the exterior wall of a building complex according to claim 1, It is characterized in that The step (4) specifically includes: For the single-floor point cloud, the point cloud data of the single floor is projected along the vertical plane direction and rasterized; the obtained raster image is expanded and eroded using a 3×3 pixel core to eliminate small holes and remove noise; based on the processed raster image, the horizontal and vertical pixel distribution are statistically analyzed, and the horizontal pixel distribution curve and the vertical pixel distribution curve are drawn respectively; the boundary of the window projection is determined according to the start and end positions of the horizontal segment in the pixel distribution curve; the corner points of the window can be determined by combining the projection boundaries of the rows and columns of the window to complete the segmentation of the window point cloud.

Citation Information

Patent Citations

  • Automatic segmentation method for point cloud of facade of large scene city building

    CN105844629A

  • Optimal reconstruction method for a complex three-dimensional building point cloud roof and a side surface

    CN109993783A

  • Building facade three-dimensional reconstruction method based on knapsack type three-dimensional laser point cloud data

    CN110717983A

  • Method for detecting surface flatness of precast beam based on three-dimensional point cloud model

    US20240177291A1