Large-scale engineering plane flatness calculation method based on point cloud
Through the plane segmentation, fitting and calculation steps based on point cloud, the problems of slow processing speed and insufficient accuracy in large-scale point cloud projects are solved, and efficient and accurate evaluation of plane flatness is achieved, which is suitable for airport runways and other scenarios.
Patent Information
- Application Number
- CN202411871151.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-07-22
AI Technical Summary
The prior art has problems such as slow processing speed, insufficient calculation accuracy and single functions in large-scale point cloud projects. Especially in the calculation of plane flatness such as airport runways, it is difficult to achieve efficient and accurate plane flatness evaluation.
The large-scale engineering plane flatness calculation method is adopted based on point cloud, and through the plane segmentation, plane fitting and plane degree/parallelism calculation steps, point cloud data is used for efficient segmentation and fitting, combined with the least squares method and iterative idea, the precise evaluation of the plane state is achieved.
It significantly improves the processing speed and calculation accuracy of large-scale point cloud data, realizes accurate evaluation of plane flatness, improves work efficiency and accuracy, and has a multi-functional comprehensive solution.
Smart Images

Figure CN120355642A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the research and development and application of a large-scale engineering plane flatness calculation method based on point cloud technology, and is a specialized method capable of calculating the plane flatness using point cloud data. Prior Art
[0002] In large-scale point cloud engineering, especially in the field of airport runway engineering, the accurate calculation and evaluation of the plane flatness state are crucial. However, traditional flatness calculation methods rely on manual measurement and drawing design, which are not only time-consuming and laborious, but also easily affected by human factors, resulting in inaccurate calculation results. To overcome this problem, calculation methods based on point cloud technology have gradually emerged.
[0003] However, the current point cloud-based plane calculation methods still face many challenges. First, when dealing with large-scale point cloud data, existing methods often have problems such as slow processing speed and high resource consumption, making it difficult to meet the requirements of calculation efficiency in practical applications. Second, although point cloud technology can provide high-precision three-dimensional information, existing methods often have problems with insufficient calculation accuracy in extracting plane point clouds and fitting planes, resulting in difficult accurate capture and quantification of minor changes in the plane. In addition, the application scenarios of existing methods are single, such as point cloud processing or data analysis, and lack an integrated solution for applying point cloud technology to large-scale engineering plane calculations.
[0004] Considering the particularity and complexity of large-scale point cloud engineering calculations, the present invention proposes a new point cloud-based large-scale engineering plane flatness calculation method, that is, first segment the plane data from the input point cloud, then fit the best plane based on the point cloud trend as a reference for flatness measurement, and finally calculate the flatness and parallelism based on the algorithm. This method can make full use of the high-precision and three-dimensional information advantages of point cloud technology to accurately calculate and evaluate the plane flatness state. Compared with the prior art, the present invention has significant advantages. First, by adopting a perfect algorithm process and data processing technology, the present invention improves the data processing efficiency and calculation accuracy, making the evaluation and calculation of the plane surface state more accurate and reliable. Second, by providing an integrated solution with multiple functions, the present invention meets various requirements for large-scale plane flatness calculations, improving work efficiency and accuracy. Summary of the Invention
[0005] 1. Object of the Invention
[0006] The object of the present invention is to provide a method for calculating the flatness of large-scale engineering planes based on point clouds, which aims to solve the problems in the prior art of large-scale point cloud engineering calculations, especially in some scenarios with high requirements for plane flatness, such as the flatness calculation of airport runways, including slow processing speed, insufficient calculation accuracy, and single function. By adopting a perfect algorithm process and data processing technology, the present invention can efficiently process large-scale point cloud data, improve calculation accuracy and efficiency. In addition, this method also integrates multiple functions, such as plane segmentation, plane fitting, calculation of flatness and parallelism, etc., which can meet various requirements of large-scale point cloud engineering calculations, so as to achieve accurate calculation and evaluation of the flatness state of the plane, and improve work efficiency and accuracy.
[0007] 2. Technical solution
[0008] This large-scale plane flatness method is divided into three major steps: plane segmentation, plane fitting, and calculation of flatness / parallelism. Plane segmentation is used to segment the point clouds belonging to the plane from the large-scale engineering scanned point clouds. First, the user inputs the plane segmentation parameters and creates a segmentation object. Secondly, the incoming point cloud data is processed using sector division and sector ring division. The point cloud is segmented into N sectors (Segments), and each sector is equally divided into M bins (Bins) by distance, completing the orderly numbering of the unordered point cloud. At the same time, each point cloud is downsampled from three dimensions to two dimensions . In each Segment, the calculation process of line fitting is added according to the lowest point in the z-axis direction saved in each Bin. Based on four conditions: the slope of the line, the intercept of the line on the z-axis, the error of line fitting, and the distance from the first point to the line, it is judged whether the fitted line meets the requirements. If it meets, it is added to the set of fitted lines in this Segment.
[0009] When judging the error of line fitting, the least squares method is used, and the root mean square error of the fitted line should not exceed the set error threshold . Here, the principle of line equation fitting using the least squares method in three-dimensional space is elaborated in detail.
[0010] In space, the point-direction expression equation of a line is:
[0011]
[0012] where, is the direction vector of the line equation; is the point on the line. Performing an equivalent transformation on this equation gives:
[0013]
[0014]
[0015] in, .
[0016] So the spatial straight line can be regarded as the intersection of the above two planes, that is, fitting the spatial straight line is fitting the two planes. We use the sum of squares of the residuals:
[0017]
[0018] The minimum parameters in the model are:
[0019]
[0020] Combining the above equations, we can get:
[0021]
[0022]
[0023]
[0024]
[0025] From this we can get , , , If you want to convert it into the standard equation of a straight line in space, you can first take an arbitrary Value, according to , , , You can find out , , then pick any one Value, according to , You can find out , Substitute the value into the standard equation.
[0026] After the plane is segmented, it is necessary to fit the plane first. The idea of iteration is used in the plane fitting process. Through multiple iterations and random sampling, the algorithm can gradually approach the global optimal solution and reduce the impact of outliers on the results. At the same time, in the plane fitting process, the main calculation formulas used are how to define the plane, find the plane equation, find the plane normal vector, and find the distance from the point to the plane. The details are as follows: We assume that the plane equation is defined as is the definition of a plane equation. If three points are given , , , to find the plane formed by these three points, the following steps can be followed:
[0027] Find the vector between two points and :
[0028]
[0029]
[0030] Find the cross product of the two vectors, that is :
[0031]
[0032] The resulting cross product is the normal vector of the plane equation :
[0033]
[0034]
[0035]
[0036]
[0037] When judging the in - point and out - point, the calculation of the distance from a point to a plane is used. Similarly, assume the plane equation , let be the normal vector of the plane. Take a point outside the plane, with coordinates , and then take a point inside the plane, with coordinates , then the distance from point to the plane is:
[0038]
[0039] where is the angle between vector and vector :
[0040]
[0041] Plane fitting will fit the best plane equation for calculating the flatness tolerance of the plane. The flatness tolerance can reflect the flatness of the plane. The smaller it is, the flatter the plane. Finally, calculate the parallelism tolerance of the plane relative to the horizontal plane. The parallelism tolerance reflects the horizontal degree of the plane. The smaller it is, the more parallel the plane is to the horizontal plane.
[0042] 3. Technical effects
[0043] The large-scale engineering plane flatness calculation method proposed by the present invention has remarkable technical effects. First, through an efficient point cloud data processing algorithm, the rapid loading and accurate analysis of large-scale point cloud data are realized, significantly improving the calculation speed and accuracy. Second, this method can accurately segment the plane point cloud and the obstacle point cloud, fit the most suitable plane equation, and accurately calculate the flatness tolerance and parallelism tolerance of the plane. In addition, a clear error handling mechanism effectively avoids errors caused by users' non-standard operations, improving the stability and usability of the method. In summary, the present invention has remarkable technical advantages and application values in the fields that require the detection of large-scale engineering plane flatness. Description of the Drawings
[0044] Figure 1 This is the large-scale engineering plane flatness calculation flow chart of the present invention.
[0045] Figure 2 This is the schematic diagram of the division of Segment and Bin of the present invention.
[0046] Figure 3 This is the straight line fitting flow chart of the present invention.
[0047] Figure 4 This is the plane fitting flow chart of the present invention.
[0048] Figure 5 This is the schematic diagram of the flatness of the present invention.
[0049] Figure 6 This is the schematic diagram of the parallelism of the present invention. Detailed Embodiments
[0050] When calculating the plane flatness, we first need to use the plane segmentation algorithm to segment the plane points and obstacle points in the input point cloud dataset. After segmentation, the plane point cloud is uneven, but most points tend to form a plane. Therefore, we use the plane fitting algorithm to extract the plane equation that best conforms to the plane trend and use it as the benchmark for flatness calculation. Finally, we calculate the flatness of the real plane according to the best-fitted plane equation; and calculate the parallelism according to the z size of the real plane point cloud set. The entire algorithm flow chart is as Figure 1 shown.
[0051] I. Plane Segmentation Algorithm:
[0052] The core of the algorithm is to divide the point cloud into N sectors (Segments), and each sector is equally divided into M containers (Bins) according to the distance, completing the orderly numbering of the unordered point cloud. At the same time, each point cloud Downsampling from three dimensions to two dimensions In each Segment, a linear fit is performed based on the lowest point in the z-axis direction saved in each Bin . Based on four conditions: the slope of the line, the intercept of the line on the z-axis, the error of the linear fit, and the distance from the first point to the line, it is determined whether the fitted line meets the requirements. If it meets the requirements, it is added to the set of fitted lines for that Segment. Finally, by determining whether the distance from each point to the fitted line is below the threshold, it is confirmed whether the point is a plane point or an obstacle point. The specific calculation steps are as follows:
[0053] 1. Acquisition of point cloud data and parameters: First, the user acquires the data transmitted by the lidar sensor and converts it into a 3D point cloud dataset represented by Euclidean distance. After inputting the point cloud data, the user needs to fill in the minimum and maximum search radii, specify the range for calculating the segmentation plane, fill in the maximum slope, sensor height, plane judgment threshold, maximum starting height of the plane, and other parameters.
[0054] 2. Division of Segments and Bins: To process the unordered point cloud in an orderly manner, we propose the division of Segments and Bins. First, with the acquisition device as the center, in the x-y plane, the point cloud set between the minimum search radius and the maximum search radius is selected as the segmentation object. The lidar point cloud is equally divided into 360 Segments at equal angular intervals, with an angle of 1 degree for each Segment. For each Segment, it is further equally divided into 120 Bins according to distance. Thus, each point corresponds to a (Segment, Bin). The division schematic diagram is as shown in Figure 2 .
[0055] 3. Data dimensionality reduction: We perform dimensionality reduction on the data. We convert the original three-dimensional data of each point cloud into two-dimensional data , where d is the distance from the point to the center in the polar coordinate system, and the formula is as follows:
[0056]
[0057] At the same time, we calculate the lowest point in each Bin to prepare for the linear fit.
[0058] 4. Extraction of the set of fitted lines: To screen the plane points in each Segment, we perform plane line extraction based on the lowest point in the z-axis direction saved in each Bin and then screen according to the set conditions. According to the screened lines and the set parameters, the points within the threshold range are the selected plane points. The specific steps of the linear fit are as follows:
[0059] (1) Obtain the lowest point of the first non-empty in the current Segment , and put it into the empty set P. This set is used to store the point set for fitting the local plane straight line in the current state.
[0060] (2) Starting from the next , enter the loop for fitting the current straight line. If is non-empty, obtain the lowest point of , and also put it into the set P. Otherwise, traverse the next Bin.
[0061] (3) At this time, if the number of points in P exceeds 2, fit a straight line according to the points in P. Next, determine whether the straight line meets the following four conditions: 1. The absolute value of the slope of the straight line does not exceed the set plane judgment threshold to exclude non-plane points. 2. When the slope is less than the minimum slope, the intercept of the straight line on the z-axis should not exceed the maximum start height to avoid misidentifying the point cloud higher than the plane as a plane. 3. The root mean square error of the straight line fitting does not exceed the set error threshold, which is a necessary process of the least squares method to ensure the accuracy of the fitted straight line. 4. Other parameters of the straight line satisfy the fitting requirements of the plane points. If satisfied, repeat step (2). Otherwise, perform step (4).
[0062] (4) If the straight line fitted by the points in P does not meet any of the conditions, delete the currently added point. If the number of points in P is greater than 3 at this moment, add the straight line fitted by the P set after deleting the current point to the straight line set S. At this moment, start fitting a new line segment, clear the P set, and repeat step (2).
[0063] (5) When all Bins in a Segment are traversed, end the loop. The fitted straight line of the current Segment is the straight line saved in the straight line set S.
[0064] The specific flowchart of the straight line fitting is as Figure 3 shown.
[0065] 5. Plane point cloud segmentation: Next, calculate the projection error of each point cloud point to the fitted plane line segments in the current and adjacent Segments. If it is less than the set threshold, it is considered a plane point, otherwise it is an obstacle point. The key here is to find the correct corresponding fitted straight line, requiring that the r value of the point meets to be considered the corresponding ground line segment. The specific steps of the plane point cloud segmentation are as follows:
[0066] (1) Within the Segment where the point is located, match and fit a straight line. If a suitable fitted straight line is matched, calculate the projection error and return it.
[0067] (2) If the fitting straight line is not successfully matched in (1), repeat step (1) within the neighboring Segment. Here, the neighboring Segment is defined as the left and right adjacent Segments with an angular difference less than the threshold.
[0068] (3) The points that cannot match the fitting straight line are obstacle points; for the points that have been matched with the fitting straight line, the points with a projection error less than the threshold are plane points, otherwise they are obstacle points.
[0069] II. Plane Fitting:
[0070] We perform plane fitting on the extracted plane point set. Plane fitting will extract the plane equation that best conforms to the trend of the point cloud. The main idea is to randomly find as few points as possible from all observations to fit the model. After fitting, calculate the residuals between the model and all observed data in turn. When the residual is less than the given threshold, it is judged as an inlier; when it is greater than the given threshold, it is judged as an outlier, and count the number of inliers. Then randomly select several points again to fit the model iteratively. If the number of inliers in the current fitting is greater than that of the previous model, the old model is iterated to the new model. The calculation steps are as follows:
[0071] 1. Randomly select three points from the segmented plane dataset and fit the initial plane according to the plane equation to obtain the initial plane.
[0072] 2. Calculate the distances from all points to the initial plane and classify the points as inliers or outliers according to a preset threshold. We set the distance threshold to 0.01. This value determines the maximum distance between a point and the plane. If the distance from a point to the plane is less than this threshold, the point is considered an inlier of the plane. If the distance of the point exceeds the threshold, it will be regarded as an outlier.
[0073] 3. Randomly select three points again from the segmented plane dataset and fit the plane again.
[0074] 4. If the number of inliers of the current plane is greater than that of the previous best plane, update the best plane.
[0075] 5. Repeat the above steps until the iteration threshold is reached, find the model parameters with the largest number of inliers, and finally fit the plane with the inliers again to obtain the final best plane. The specific flowchart of plane fitting is as Figure 4 shown.
[0076] Specifically, the iterative threshold needs to be estimated by the following method: Assume that the proportion of inliers in the data is p. When using 3 points for each plane simulation, the probability that a selected point is an inlier is , and the probability that a selected point is an outlier is . Therefore, the probability of consecutive failures is:
[0077]
[0078] The probability that all points are inliers is:
[0079]
[0080] Through the above formula, the final number of attempts required is:
[0081]
[0082] III. Flatness / Parallelism Calculation:
[0083] Flatness represents the degree of deviation between an object's surface and an ideal plane. In other words, it measures whether a surface is flat. The flatness error is the shortest distance between two parallel planes that sandwich the measurement points. The measured point coordinate values are the relative heights of each point in the vertical direction of the measurement plate. The distance between the highest point and the lowest point is not the shortest distance between the two parallel planes that sandwich the measurement points, that is, it is not the flatness error of the measured plane, but the parallelism error relative to the measurement reference. The flatness schematic diagram is as Figure 5 shown.
[0084] The flatness calculation method is as follows: By calculating the distance from each point in the point cloud to the fitted plane, find the maximum value and the minimum value of these distances. Assume that the best-fitted plane is , and the distance formula from a point to the plane is:
[0085]
[0086] The sum of the squares of the distances from all measured points to the ideal plane is:
[0087]
[0088] When the distance is the smallest, there are , , three points:
[0089]
[0090]
[0091]
[0092] As derived above, the actual flatness calculation formula:
[0093]
[0094] Parallelism describes whether the relative directions between two lines or two planes remain consistent. When two planes or lines are parallel, they will never intersect in space and always maintain the same distance. The higher the parallelism, the closer the angle between the two planes or lines is to 0°, and their relative directions are almost the same. The schematic diagram of parallelism is as Figure 6 shown.
[0095] The method for calculating parallelism is as follows: Obtain the Z coordinate of each point and find the maximum and minimum . The actual parallelism calculation formula is as follows:
[0096]
Claims
1. A method for calculating the flatness of a large-scale engineering plane based on point cloud, characterized in that, It includes the following steps: a) Plane segmentation: Receive point cloud data, segment the point cloud data into multiple sectors (Segments) according to preset parameters, further divide each sector into multiple bins, and perform dimensionality reduction processing on each point cloud, converting the three-dimensional data (x, y, z) into two-dimensional data (d, z), where d is the distance from the point to the center of the circle on the x-y plane; in each Segment, perform linear fitting based on the lowest point in the z-axis direction saved in each bin, and classify the points as plane points or obstacle points by judging whether the distance from each point to the fitted line is lower than the threshold; b) Plane fitting: Randomly select three points from the segmented plane dataset to fit the initial plane equation; calculate the distance from all points to the initial plane, and classify the points as inliers or outliers according to a preset threshold; randomly select three points again to fit the plane, and update the best plane if the number of inliers in the current plane is greater than that of the previous best plane; repeat the above steps until the preset number of iterations is reached to obtain the best-fitting plane equation; c) Flatness / parallelism calculation: By calculating the distance from each point in the point cloud to the fitted plane, find the maximum and minimum values of these distances. The flatness is the difference between the maximum distance and the minimum distance among all points; Obtain the Z coordinate of each point, find the maximum and minimum values of the Z coordinates, and calculate the difference between the maximum and minimum values of the Z coordinates of the points on the plane, which is the parallelism.
2. The method according to claim 1, wherein In step a), the dimensionality reduction processing is to convert the three-dimensional data (x, y, z) of each point cloud into two-dimensional data (d, z) through calculation, where d is the distance from the point to the center of the circle on the x-y plane.
3. The method according to claim 1, wherein In step a), the linear fitting includes the following steps: (1) Obtain the lowest point of the first non-empty in the current Segment , and put it into the empty set P; this set is used to store the point set for fitting the local plane straight line in the current state; (2) Starting from the next , enter the loop for the current straight line fitting; if is not empty, obtain the lowest point and also put it into the set P; otherwise, traverse the next Bin; (3) At this time, if the number of points in P exceeds 2, then judge whether the straight line fitted by the points in P meets the requirements; if it meets, repeat step (2); (4) If the straight line fitted by the points in P does not meet any condition, then delete the currently added point; if the number of points in P is greater than 3 at this moment, add the straight line fitted by the P set after deleting the current point to the straight line set S; at this moment, start fitting a new line segment, clear the P set, and repeat step (2); (5) When all bins in a Segment are traversed, end the loop; the fitted line of the current Segment is the line saved in the line set S.
4. The method according to claim 1, characterized in that, In step a), the specific steps of plane point cloud segmentation are as follows: (1) In the Segment where the point is located, match the fitted line. If a suitable fitted line is matched, calculate the projection error and return; (2) If the fitted line is not successfully matched in (1), then in the adjacent Segment, repeat step (1); (3) The points that cannot match the fitted line are obstacle points; for the points that have matched the fitted line, the points with a projection error less than the threshold are plane points, otherwise they are obstacle points.
5. The method according to claim 1, wherein In step b), the preset threshold is used to determine the maximum distance between a point and the plane. If the distance from the point to the plane is less than this threshold, the point is regarded as an inlier of the plane, otherwise it is regarded as an outlier.
6. A method for calculating the flatness of a large-scale engineering plane based on point cloud, characterized in that, This method realizes the calculation of the large-scale engineering plane flatness based on point cloud as described in any one of claims 1 to 5.