Method and System for Calculating Clearance of Facilities above Road Based on On-vehicle Laser Point Cloud
Through the improved rolling ball method and Kd-tree data structure, combined with the least squares method, the error problem of the clearance calculation of the facilities above the road is solved, and high-precision clearance calculation is achieved.
Patent Information
- Application Number
- CN202310661525.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-06
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2043-06-06
AI Technical Summary
The prior art has large errors when calculating the clearance of facilities above the road and is susceptible to abnormal points, making it difficult to accurately determine the road range and facility location.
The improved rolling ball method is used to extract the contour and delineate the road range. Combined with the Kd-tree data structure and the least squares method, the elevation is selected and the facilities above the road are identified, and the clearance is calculated by fitting the plane equation.
The accuracy and applicability of the clearance calculation of the facilities above the road are improved, the impact of abnormal points is reduced, and accurate extraction and clearance calculation of facilities without obvious morphological characteristics are achieved.
Smart Images

Figure CN116645653B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of on-vehicle lidar point cloud data processing, and particularly to a method and system for calculating the clearance of facilities above a road based on on-vehicle lidar point cloud. Background Art
[0002] Clearance is the vertical height that a road must meet to satisfy normal traffic requirements, that is, the vertical distance between the road surface and the facilities above it within the road range. In some road scenarios, especially some highway sections, there are some facilities spanning the road surface above the road (such as utility poles, overpasses, etc.). In the clearance direction, these facilities spanning the road surface have certain requirements for the height limit and safety of driving vehicles. The prior art generally uses the position and elevation information of the measured trajectory as a reference to complete the clearance calculation of the facilities above the road. However, problems such as vehicle movement deviation may occur during the measurement process, and there are errors in the determined road range. At the same time, using the trajectory position for point-by-point calculation is easily affected by abnormal points or noise points in the road surface point cloud. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method and system for calculating the clearance of facilities above a road based on on-vehicle lidar point cloud, which uses an improved rolling ball method to extract the road contour from the road surface point cloud to delimit the road range, screen the elevation and extract the facilities above the road, and calculate the road clearance, with high calculation accuracy and high applicability.
[0004] The present invention adopts the following technical solutions to solve the above technical problems:
[0005] A method for calculating the clearance of facilities above a road based on on-vehicle lidar point cloud includes the following steps:
[0006] S1. Extract the road surface from the on-vehicle lidar point cloud to obtain the road surface point cloud.
[0007] S2. Use the improved rolling ball method to extract the contour and delimit the road range from the road surface point cloud.
[0008] S3. Screen the elevation and identify the facilities above the road.
[0009] S4. Use the Kd-tree data structure to search for the N nearest road surface points in the planar projection of the facilities above the road.
[0010] S5. Fit the N road surface points into a plane equation by the least squares method and calculate the road clearance.
[0011] Further, in step S1, the specific content of the road surface extraction is:
[0012] Using the Kd-tree data structure, search for k points within the neighborhood of each point. Using the principal component analysis method, obtain the eigenvalues λ1, λ2, and λ3, and define the minimum eigenvalue as λ3, and its corresponding eigenvector as σ3; set the coordinates of the eigenvector σ3 as Z-axis direction The angle between the eigenvector σ3 and the Z-axis is θ. Extract the road surface point cloud. The specific calculation formula is:
[0013]
[0014]
[0015] Separate the road surface points with the angle θ ≤ θ z to obtain the road surface point cloud; where θ z is the angle threshold, and its value range is 0 to 0.05.
[0016] Furthermore, in step S2, the specific steps of contour extraction are as follows:
[0017] S201. Arbitrarily select a point p1(x1, y1, z1) in the road surface point cloud. Using the Kd-tree data structure, search for k points within the neighborhood. The value of k can be determined according to the actual situation, and it is 10 - 20. Set the distance between p1 and the k points within the neighborhood as d i , then the calculation formula for R is:
[0018]
[0019] where R represents the sum of the distances of the neighborhood points.
[0020] S202. Draw a circle with a radius of 2R, and place the road surface points located within the circle in the set S.
[0021] S203. Select a point p2(x2, y2, z2) in the set S. Calculate the coordinates of the center C1(x c1 , y c1 ) of the circle with a radius of R passing through point p1, and the coordinates of the center C2(x c2 , y c2 ) of the circle with a radius of R passing through point p2. The specific formulas are:
[0022]
[0023]
[0024]
[0025]
[0026]
[0027] Among them, P is set as an intermediate parameter.
[0028] S204. Calculate the distances from all points in set S to C1 and C2. If the distances from all points in set S to C1 or C2 are greater than R, then p2 is a boundary point; otherwise, go to step S203 to reselect p2.
[0029] Until all points in set S are traversed.
[0030] S205. Repeat steps S201 to S204 until all points in the road surface point cloud are traversed to obtain the road contour.
[0031] Furthermore, in step S3, the specific steps for identifying facilities above the road are as follows:
[0032] S301. Taking the highest value Z of the elevation of the road surface point cloud H as a reference, if the elevation Z of a point i satisfies Z i >Z H +Z G , then filter it out as a candidate point, where Z G is the elevation threshold.
[0033] S302. Select a candidate point and project it onto the XY plane, then add it to the segmented road surface point cloud.
[0034] S303. Use the improved rolling ball method to calculate the contour of the road surface point cloud with the candidate point added.
[0035] S304. If the candidate point is on the contour boundary line, it means it is not within the road range, so exclude it; if the candidate point is not on the contour boundary line, it means it is within the road range, so extract it.
[0036] S3 to 304 until each candidate point is judged.
[0037] S306. All the finally extracted candidate points are the required points of facilities above the road.
[0038] Furthermore, in step S5, the specific steps for calculating the road clearance are as follows:
[0039] S501. Arbitrarily select a point among the points of facilities above the road, project it onto the XY plane, and use the Kd-tree data structure to search for the N nearest road surface points on the XY plane.
[0040] S502. Select any point (x i , y i , z i), the plane equation fitted by the least squares method is obtained, and the specific formula is:
[0041]
[0042] where i = 1, 2,..., N.
[0043] The values of a, b, and c are solved, and thus the fitted plane equation ax + by - z + c = 0 is obtained.
[0044] S503. Set the coordinates of the facility point above the road as (X i , Y i , Z i ). According to the plane equation ax + by - z + c = 0, the road clearance at this place is:
[0045]
[0046] S504. Repeat steps S502 to S503 until the road clearances of N pavement points are obtained.
[0047] Furthermore, the present invention also proposes a road overhead facility clearance calculation system based on vehicle-mounted laser point cloud, including
[0048] A pavement point cloud module for extracting the pavement from the vehicle-mounted laser point cloud by using the Kd-tree data structure.
[0049] A road contour extraction module for extracting the contour of the pavement point cloud and delimiting the road range by using the improved rolling ball method.
[0050] A road overhead facility point module for screening the elevation and identifying the road overhead facilities.
[0051] A plane projection pavement point module for searching for the nearest N pavement points on the plane projection of the road overhead facilities by using the Kd-tree data structure.
[0052] A road clearance module for fitting the N pavement points into a plane equation by the least squares method and calculating the road clearance.
[0053] Furthermore, the present invention also proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the road overhead facility clearance calculation method based on vehicle-mounted laser point cloud described above are implemented.
[0054] Furthermore, the present invention also proposes a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is run by a processor, the road overhead facility clearance calculation method based on vehicle-mounted laser point cloud described above is executed.
[0055] The present invention adopts the above technical solutions. Compared with the prior art, its remarkable technical effects are as follows:
[0056] 1. By using the extracted road surface points, the road contour is determined and the road range is delimited. Feature recognition, fitting, and calculation of the clearance are performed on the positions of the upper facility points, realizing the extraction and clearance calculation of the attached facilities above the road without obvious morphological features.
[0057] 2. An improved rolling ball method is used to extract the contour and delimit the road range of the road surface point cloud. Different from the traditional rolling ball method, the main improvements are: (1) Set a dynamic R value, allowing the R value to adaptively change in areas with different densities, which is determined by the average distance between the search point and k points in the neighborhood, where the k points are searched through the Kd-tree data structure; (2) Encircle the search range with a radius of 2R, reducing the number of loops and improving the operation efficiency.
[0058] 3. For the extracted upper facility points of the road, the N road surface points closest to them in the XY plane are searched through the Kd-tree data structure, fitted into a plane equation by the least squares method, and the clearance is calculated, which can eliminate the influence of abnormal road surface points on the calculation result and transform the clearance calculation problem into a point-to-plane distance calculation problem. Brief Description of the Drawings
[0059] Figure 1 is the overall implementation flowchart of the present invention.
[0060] Figure 2 is a partial schematic diagram of the road surface contour line extraction in the present invention.
[0061] Figure 3 is the original vehicle-mounted laser point cloud in the embodiment of the present invention.
[0062] Figure 4 is the extraction result of the upper facilities of the road in the embodiment of the present invention.
[0063] Figure 5 is the clearance calculation result of the upper facilities of the road in the embodiment of the present invention. Detailed Embodiment
[0064] The present invention will be described in detail below with reference to the drawings and specific embodiments. This embodiment is implemented on the premise of the technical solution of the present invention, and detailed implementation methods and specific operation processes are given, but the protection scope of the present invention is not limited to the following embodiments. <(
[0065] The present invention proposes a method for calculating the clearance of upper facilities of a road based on vehicle-mounted laser point cloud, as Figure 1 shown, including the following steps:
[0066] S1. Extract the road surface from the on-vehicle laser point cloud. The specific content is as follows:
[0067] Use the Kd-tree data structure to search for 20 points in the neighborhood of each point. In this embodiment, a point is selected with three-dimensional coordinates of (522289.896, 3638004.298, 39.311). Through the principal component analysis method, the eigenvalues are obtained as λ1 = 1.727, λ2 = 0.0028, λ3 = 0.0021, and the corresponding eigenvectors are σ1(0.6357, 0.7315, 0.2465), σ2(-0.7543, 0.6565, -0.0033), σ3(-0.1643, -0.1839, 0.9661). The minimum eigenvalue is λ3. Extract the road surface point cloud according to the angle θ between the eigenvector σ3 and the vertical direction. The specific calculation formula is:
[0068]
[0069]
[0070] Separate the road surface points with the angle θ ≤ θ z to generate the road surface point cloud; where θ z is the angle threshold, with a value of 0.05.
[0071] The calculated θ is 0.2499. Since θ > θ z , this point does not belong to the road surface point cloud.
[0072] S2. Use the improved rolling ball method to extract the contour of the road surface point cloud and delimit the road range. The specific steps are as follows:
[0073] S201. Arbitrarily select a point p1 in the road surface point cloud with coordinates of (522218.081, 3638033.147, 37.769). Use the Kd-tree data structure to search for 50 points in the neighborhood. The distances between p1 and the 50 points in the neighborhood are 0.0220, 0.0402, 0.0744, 0.00786, 0.0815, 0.0904, 0.1076, 0.1170, 0.1602, 0.1632,...... Then the calculation formula for R is:
[0074]
[0075] where R represents the sum of the distances of the neighborhood points, and the value is 6.85.
[0076] S202. Draw a circle with a radius of 2R, that is, a radius of 13.7, and place the road surface points within the circle in the set S.
[0077] S203. Take a point p2 in the set S with coordinates (522219.504, 3638034.349, 37.841), and calculate the coordinates of the center C1(x c1 , y c1 ) of the circle passing through point p1 with radius R, and the coordinates of the center C2(x c2 , y c2 ) of the circle passing through point p2 with radius R. The specific formulas are as follows:
[0078]
[0079]
[0080]
[0081]
[0082]
[0083] Among them, P is set as an intermediate parameter; the calculation results are: P = 5.885, x c1 = 522211.7187, y c1 = 3638025.374, x c2 = 522227.2893, y c2 = 3638043.324; then the coordinates of the center C1 are (522211.7187, 3638025.374), and the coordinates of the center C2 are (522227.2893, 3638043.324).
[0084] S204. Calculate the distances from all points in the set S to C1 and C2. If the distances from all points in the set S to C1 or C2 are greater than R, then p2 is a boundary point; otherwise, go to step S203 to reselect p2.
[0085] Until all points in the set S are traversed.
[0086] S205. Repeat steps S201 to S204 until all points in the road surface point cloud are traversed to obtain the road contour, as Figure 2 shown.
[0087] S3. Screen the elevations and identify the facilities above the road. The specific steps are as follows:
[0088] S301. Taking the highest value Z H of the elevations of the road surface point cloud as the benchmark, if the elevation Z i of the point satisfies Z i > Z H + Z G , then screen it out as a candidate point.
[0089] Among them, Z H = 39.824; Z G represents the elevation threshold, which is 2m.
[0090] S302. Select a candidate point with coordinates (522219.455, 3638033.230, 45.828), project it onto the XY plane, and add it to the segmented road point cloud.
[0091] S303. Use the improved rolling ball method to calculate the contour of the updated road point cloud after adding the candidate point.
[0092] S304. If the candidate point is on the contour boundary line, it means it is not within the road range, so it is excluded; if the candidate point is not on the contour boundary line, it means it is within the road range, so it is extracted. The selected candidate point is not on the updated contour line, so it is not extracted.
[0093] S305. Repeat steps S302 to S304 until each candidate point is judged.
[0094] S306. All the finally extracted candidate points are the required points of the facilities above the road.
[0095] S4. Use the Kd-tree data structure to search for the 100 nearest road points in the plane projection of the facilities above the road.
[0096] S5. Fit the 100 road points into a plane equation by the least squares method to calculate the road clearance. The specific steps are as follows:
[0097] S501. Select any point among the points of the facilities above the road, project it onto the XY plane, and use the Kd-tree data structure to search for the 100 nearest road points on the XY plane.
[0098] S502. Select any point (x i , y i , z i ) from the 100 road points. The plane equation to be fitted is z = ax + by + c. According to the least squares principle, it is necessary to make the minimum, that is the minimum. Therefore, it is necessary to satisfy:
[0099]
[0100] That is, it is necessary to satisfy:
[0101]
[0102]
[0103]
[0104] The system of linear equations with three variables is transformed into matrix form as follows:
[0105]
[0106] It is obtained that a = 0.04596, b = 0.03278, and c = -1.432e+05.
[0107] S503. Set the coordinates of the facility point above the road as (522200.215, 3638045.214, 48.2039). According to the plane equation ax + by - z + c = 0, the road clearance at this location is:
[0108]
[0109] The road clearance should be 7.24 m.
[0110] S504. Repeat steps S502 to S503 until the road clearances of 100 road surface points are obtained.
[0111] In this embodiment, the experimental data selects the road point cloud data of a certain highway in Nanjing. As Figure 3 shown, there are overpasses, height limit devices and other facilities spanning the road surface above some areas of the road. In the clearance direction, these facilities have certain requirements for the height limit and safety of the driving vehicles. Extract the facilities above the road. As Figure 4 shown, the extraction effect of the facilities above the road is good. Further, calculate the clearances of the facilities above the road. As Figure 5 shown, the points with similar Y coordinates corresponding to the facilities above the road are the points corresponding to the same facility. There are a total of 5 facilities spanning the road surface in the data set.
[0112] Calculate the elevation difference between the facility points above the road and the road surface points below through the distance measurement function in the PCM software, and compare it with the road clearance calculated by the algorithm. The comparison results are shown in the following table. It can be seen from the results in Table 1 that the clearance calculation errors are all less than 0.1 m, and the accuracy is relatively high.
[0113] Table 1 Clearance calculation accuracy of facilities above the road
[0114] Clearance calculated by the algorithm (m) Manually measured clearance (m) Error (m) 7.83 7.89 -0.06 5.05 5.10 -0.05 10.84 10.80 +0.04 10.26 10.31 -0.05 7.99 8.08 -0.09 7.83 7.77 +0.06
[0115] An embodiment of the present invention also provides a clearance calculation system for facilities above a road based on vehicle-mounted lidar point cloud, including a road surface point cloud module, a road contour extraction module, a facilities point module above the road, a planar projection road surface point module, a road clearance module, and a computer program that can run on a processor. It should be noted that each module in the above system corresponds to the specific steps of the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in this embodiment, reference can be made to the method provided by the embodiment of the present invention.
[0116] An embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. It should be noted that each module in the above system corresponds to the specific steps of the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in this embodiment, reference can be made to the method provided by the embodiment of the present invention.
[0117] An embodiment of the present invention also provides a computer-readable storage medium storing a computer program. It should be noted that each module in the above system corresponds to the specific steps of the method provided by the embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. For technical details not described in detail in this embodiment, reference can be made to the method provided by the embodiment of the present invention.
[0118] The preferred specific embodiments of the present invention have been described in detail above. It should be understood that those of ordinary skill in the art can make many modifications and variations based on the concept of the present invention without creative efforts. Therefore, all technical solutions that can be obtained by those skilled in the art in the technical field of the present invention through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should fall within the protection scope determined by the claims.
Claims
1. A method for calculating the clearance of facilities above a road based on vehicle-mounted lidar point cloud, characterized in that Including: S1. Extract the road surface from the vehicle-mounted laser point cloud to obtain the road surface point cloud; S2. Improve the rolling ball method, specifically: Arbitrarily select a point in the road surface point cloud, use the Kd-tree data structure to search for several points in the neighborhood, and calculate the sum of the distances from this point to several points in the neighborhood; Draw a circle with twice the sum of the distances as the radius, and place the road surface points located in the circle in a set; Select a point in the set, and calculate the center coordinates of the circle passing through this point in the road surface point cloud with a radius equal to the sum of the distances from this point to several points in the neighborhood, and the center coordinates of the circle passing through this point in the set with the same radius as the previous circle; Calculate the distances from all points in the set to the two centers. If the distances from all points to center 1 or center 2 are greater than the radius of the above circle, then this point in the set is a boundary point; otherwise, reselect a point in the set; Use this rolling ball method to extract the contour of the road surface point cloud and delimit the road range; S3. Screen the elevation and identify the facilities above the road; S4. Use the Kd-tree data structure to search for the nearest N road surface points in the planar projection of the facilities above the road; S5. Fit the N road surface points into a plane equation by the least squares method to calculate the road clearance.
2. The method for calculating the clearance of facilities above a road based on vehicle-mounted laser point clouds according to claim 1, wherein, In step S1, the specific content of road surface extraction is: Using the Kd-tree data structure to search for k points within the neighborhood of each point, and using the principal component analysis method to obtain the eigenvalues λ1, λ2, λ3, and defining the minimum eigenvalue as λ3, and its corresponding eigenvector as σ3; setting the coordinates of the eigenvector σ3 as Z-axis direction The angle between the eigenvector σ3 and the Z-axis is θ, and the road surface point cloud is extracted. The specific calculation formula is: Separate the road surface points with the included angle θ ≤ θ z to obtain the road surface point cloud; where θ z is the included angle threshold value.
3. The method for calculating the clearance of facilities above a road based on on-vehicle lidar point cloud according to claim 1, wherein In step S2, the specific steps of contour extraction are as follows: S201. Arbitrarily select a point p1(x1, y1, z1) from the road surface point cloud, search for k points in the neighborhood using the Kd-tree data structure, and set the distances between p1 and the k points in the neighborhood as d i , and the calculation formula for R is as follows: Wherein, R represents the sum of the distances of the neighborhood points; S202. Draw a circle with a radius of 2R, and place the road surface points located in the circle in set S; S203. Take a point p2(x2, y2, z2) in the set S, and calculate the coordinates of the center C1(x c1 , y c1 ) of the circle with radius R passing through point p1, and the coordinates of the center C2(x c2 , y c2 ) of the circle with radius R passing through point p2. The specific formulas are as follows: Wherein, P is set as an intermediate parameter; S204. Calculate the distances from all points in set S to C1 and C2. If the distances from all points to C1 or C2 are greater than R, then p2 is a boundary point; otherwise, enter step S203 to reselect p2; Until all points in set S are traversed; S205. Repeat steps S201 to S204 until all points in the road surface point cloud are traversed to obtain the road contour.
4. The method for calculating the clearance of facilities above the road based on vehicle-mounted laser point cloud according to claim 3, wherein In step S3, the specific steps of screening the elevation and identifying the facilities above the road are as follows: S301. Taking the maximum value Z of the elevation of the road surface point cloud as the reference, if the elevation Z of a point H satisfies Z i >Z i +Z H +Z G , then filter it out as a candidate point, where Z G is the elevation threshold; S302. Select a candidate point and project it onto the XY plane, and add it to the segmented road surface point cloud; S303. Use the improved rolling ball method to calculate the contour of the road surface point cloud with the candidate point added; S304. If the candidate point is on the contour boundary line, it means it is not within the road range, so it is excluded; if the candidate point is not on the contour boundary line, it means it is within the road range, so it is extracted; S305. Repeat steps S302 to S304 until each candidate point is judged; S306. All the finally extracted candidate points are the required points of the facilities above the road.
5. The method for calculating the clearance of facilities above the road based on vehicle-mounted lidar point cloud according to claim 1, wherein In step S5, the specific steps of calculating the road clearance are as follows: S501. Arbitrarily select a point among the points of the facilities above the road, project it onto the XY plane, and use the Kd-tree data structure to search for the nearest N road surface points on the XY plane; S502. Select any point (x i , y i , z i ) from N pavement points, and obtain the plane equation fitted by the least squares method. The specific formula is as follows: Wherein, i = 1, 2,..., N; Solve to obtain the values of a, b, and c, so as to obtain the fitting plane equation ax + by - z + c = 0; S503. Set the coordinates of the facility point above the road as (X i , Y i , Z i ). According to the plane equation ax + by - z + c = 0, the road clearance at this location is as follows: S504. Repeat steps S502 to S503 until the road clearance of N road surface points is obtained.
6. A clearance calculation system for facilities above roads based on vehicle-mounted laser point clouds, characterized in that, Including The road surface point cloud module is used to extract the road surface from the vehicle-mounted laser point cloud by using the Kd-tree data structure; The road contour extraction module is used to extract the contour of the road surface point cloud and delimit the road range by using the improved rolling ball method; wherein, the improved rolling ball method is specifically as follows: Arbitrarily select a point in the road surface point cloud, search for several points in the neighborhood by using the Kd-tree data structure, and calculate the sum of the distances between this point and several points in the neighborhood; Make a circle with twice the sum of the distances as the radius, and place the road surface points located in the circle in a set; select a point in the set, and calculate the center coordinates of the circle passing through this point in the road surface point cloud and with a radius equal to the sum of the distances between this point and several points in the neighborhood, and the center coordinates of the circle passing through this point in the set and with the same radius as the aforementioned circle; Calculate the distances from all points in the set to the two centers. If the distances from all points to center 1 or center 2 are greater than the radius of the above circle, then this point in the set is a boundary point; otherwise, reselect a point in the set; The road overhead facility point module is used to screen the elevation and identify the road overhead facilities; The planar projection road surface point module is used to search for the nearest N road surface points in the planar projection of the road overhead facilities by using the Kd-tree data structure; The road clearance module is used to fit the N road surface points into a plane equation by the least square method and calculate the road clearance.
7. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is run by the processor, it executes the method described in any one of claims 1 to 5.