Rail point cloud extraction method for existing lines
Through the method of eliminating non-rail point cloud data through pcd format file and centerline fitting, the problem of low and environmental interference identification in the existing technology is solved, and the reliability and accuracy are achieved, which improves the Railway operation efficiency.
Patent Information
- Application Number
- CN202111521005.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2041-12-13
AI Technical Summary
The existing rail point cloud extraction methods have problems such as low degree of automation recognition, long processing cycle, inability to solve the problem of weeds and shrubs, and insufficient accuracy, especially in suburban railway environments.
Use PCD format file to obtain rail point cloud data, eliminate non-rail point cloud data through centerline fitting and deviation setting value, combine the least squares method and parameter adjustment, and repeat the fit until the stop condition is met to achieve accurate extraction of rail point clouds. .
It improves the reliability and accuracy of rail point cloud extraction, and the extraction effect is better than the traditional least squares method fitting, which can better handle environmental interference and improves railway operation efficiency.
Smart Images

Figure CN114187342B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of rail transportation, and in particular relates to a method for extracting rail point clouds of an existing line. Background Art
[0002] With the development of economy and technology and the improvement of people's living standards, rail transit technology has been widely used in people's production and life, bringing endless convenience to people's production and life. Therefore, ensuring the safe and stable operation of rail transit has become one of the most important tasks of the rail transit system.
[0003] Rail point cloud extraction technology is an important part of rail transit technology. It can be applied to track modeling, track measurement, track maintenance and repair, railway limit modeling, etc. Rail point cloud extraction technology can effectively improve railway operation efficiency, reduce manual line time, and provide protection for workers' safety. In the laser radar point cloud scanning of the railway corridor, it is particularly important to accurately identify the position and shape of the rails. Therefore, how to improve the accuracy of point cloud recognition has become the research focus in this field.
[0004] There are two main methods for extracting rail point clouds: the first method is to cluster and identify rail point clouds from point clouds containing point cloud laser intensity based on point cloud laser intensity and the distance between point clouds; however, this method generally uses close-up image pixel extraction, which often requires manual intervention in the recognition process, has a low degree of automated recognition, has a long processing cycle, and cannot solve the problem of weeds and shrubs covering the railway. It has the defects of insufficient accuracy and being easily affected by the surrounding environment of the railway. The second method is to extract from point clouds that do not contain point cloud laser intensity based on the geometric features of the rails. First, the center line of the rails is determined by fitting using the least squares method, and then the rail point clouds are identified based on geometric information such as track gauge; however, the extraction process of this method is single, and for the mainline railway built in the suburbs, there are often weeds, trees, stones and other non-rail data around, so the line center line extracted by this method is not accurate, which makes the reliability and accuracy of the final rail point cloud extraction result poor. Summary of the invention
[0005] The purpose of the present invention is to provide a method for extracting rail point clouds of existing lines with high reliability, good accuracy and good extraction effect.
[0006] The rail point cloud extraction method of the existing line provided by the present invention comprises the following steps:
[0007] S1. Obtain the pcd format file of the existing line;
[0008] S2. Obtain rail point cloud data of the existing line according to the pcd format file obtained in step S1;
[0009] S3. Perform centerline fitting on the current rail point cloud data to obtain the centerline of the current rail point cloud;
[0010] S4. Separate the rail point cloud data on both sides of the center line;
[0011] S5. For the rail point cloud data on both sides of the center line, the non-rail point cloud data that deviates from the center line by a distance greater than the set value is eliminated to obtain the point cloud data on both sides of the center line after eliminating the non-rail point cloud data;
[0012] S6. Merge the point cloud data on both sides of the center line after eliminating the non-rail point cloud data to obtain new rail point cloud data, and use it as the current rail point cloud data;
[0013] S7. Repeat steps S3 to S6, resetting the deviation set value each time until the set stop condition is met, thereby obtaining the final rail point cloud extraction result of the existing line.
[0014] The step S3 of performing centerline fitting on the current rail point cloud data to obtain the centerline of the current rail point cloud specifically includes the following steps:
[0015] If it is the first time to fit the center line, the least square method is used to fit the center line of the current rail point cloud data to obtain the center line of the current rail point cloud; wherein the slope of the center line is k1, and the intercept of the center line is b1;
[0016] If the center line is fitted for the z+1th time, the slope of the center line is kept as k z , and calculate the center line intercept b of the z+1th fit z+1 for Where b z is the center line intercept calculated when fitting the center line for the zth time; d ave-L-z is the average distance from each point cloud data on the left side of the center line to the center line calculated during the zth non-rail point cloud data elimination operation; d ave-R-z is the average distance from each point cloud data on the right side of the center line to the center line calculated during the zth non-rail point cloud data elimination operation; θ z is the angle between the center line obtained by the z-th fitting and the x-axis; z is a positive integer.
[0017] The step S5, for the rail point cloud data on both sides of the center line, removes the non-rail point cloud data that deviates from the center line by a distance greater than a set value, and obtains the point cloud data after removing the non-rail point cloud data on both sides of the center line, specifically comprising the following steps:
[0018] For the zth non-rail point cloud data removal operation:
[0019] For the point cloud data on the left side of the center line, calculate the distance d from each point cloud data i to the center line i-z , and the average distance d from each point cloud data to the center line ave-L-z ; Then the following criteria are used to eliminate non-rail point cloud data: If d i-z ≥ρ L-z ·d ave-L-z , then the corresponding point cloud data i is removed; the remaining point cloud data that is not removed is the point cloud data on the left side of the center line after removing the non-rail point cloud data; ρ L-z is the point cloud removal parameter for the left rail, and ρ L-z >1;
[0020] For the point cloud data on the right side of the center line, calculate the distance d from each point cloud data j to the center line j-z , and the average distance d from each point cloud data to the center line ave-R-z ; Then the following criteria are used to eliminate non-rail point cloud data: If d j-z ≥ρ R-z ·d ave-R-z , then the corresponding point cloud data j is removed; the remaining point cloud data that is not removed is the point cloud data on the right side of the center line after removing the non-rail point cloud data; ρ R-z is the right rail point cloud removal parameter, and ρ R-z >1.
[0021] The deviation setting value is reset each time the step S7 is repeated. Specifically, the left rail point cloud removal parameter ρ is reset each time the step S7 is repeated. L-z and the right rail point cloud removal parameter ρ R-z , and ρ L-z >1 and ρ R-z >1.
[0022] The stop condition set in step S7 is specifically to use the following rules as the stop condition:
[0023] If | b z+1 -b z |·cosθ z <α, then it is determined that the set stop condition is met; where b z+1 is the center line intercept calculated when fitting the center line for the z+1th time; b z is the center line intercept calculated when fitting the center line for the zth time; θ z is the angle between the center line obtained by the z-th fitting and the x-axis; α is the set stop threshold parameter; z is a positive integer.
[0024] The rail point cloud extraction method for existing lines provided by the present invention not only realizes the rail point cloud extraction of existing lines through innovative algorithm design and parameter design, but also the extraction result is better than the result of the existing least squares fitting extraction, and the method of the present invention has higher reliability, better accuracy and better extraction effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 The figure is a schematic diagram of the method flow of the present invention.
[0026] Figure 2 This is a schematic diagram of point cloud data after classification and identification using the method of the present invention in an embodiment of the method of the present invention.
[0027] Figure 3 This is a schematic diagram of rail point cloud data manually extracted in an embodiment of the method of the present invention.
[0028] Figure 4 Schematic diagram of the histogram distribution of the distance from the rail point cloud to the center line in an embodiment of the inventive method. DETAILED DESCRIPTION
[0029] like Figure 1 The method flow chart of the method of the present invention is shown as follows: The rail point cloud extraction method of the existing line provided by the present invention comprises the following steps:
[0030] S1. Obtain the pcd format file of the existing line;
[0031] S2. Obtain rail point cloud data of the existing line according to the pcd format file obtained in step S1;
[0032] S3. Perform centerline fitting on the current rail point cloud data to obtain the centerline of the current rail point cloud; specifically, the steps include:
[0033] If it is the first time to fit the center line, the least square method is used to fit the center line of the current rail point cloud data to obtain the center line of the current rail point cloud; wherein the slope of the center line is k1, and the intercept of the center line is b1;
[0034] If the center line is fitted for the z+1th time, the slope of the center line is kept as k z , and calculate the center line intercept b of the z+1th fit z+1 for Where b z is the center line intercept calculated when fitting the center line for the zth time; d ave-L-z is the average distance from each point cloud data on the left side of the center line to the center line calculated during the zth non-rail point cloud data elimination operation; d ave-R-zis the average distance from each point cloud data on the right side of the center line to the center line calculated during the zth non-rail point cloud data elimination operation; θ z is the angle between the center line obtained by the z-th fitting and the x-axis; z is a positive integer;
[0035] S4. Separate the rail point cloud data on both sides of the center line;
[0036] S5. For the rail point cloud data on both sides of the center line, the non-rail point cloud data that deviates from the center line by a distance greater than the set value is eliminated to obtain the point cloud data on both sides of the center line after eliminating the non-rail point cloud data; specifically, the steps include:
[0037] For the zth non-rail point cloud data removal operation:
[0038] For the point cloud data on the left side of the center line, calculate the distance d from each point cloud data i to the center line i-z , and the average distance d from each point cloud data to the center line ave-L-z ; Then the following criteria are used to eliminate non-rail point cloud data: If d i-z ≥ρ L-z ·d ave-L-z , then the corresponding point cloud data i is removed; the remaining point cloud data that is not removed is the point cloud data on the left side of the center line after removing the non-rail point cloud data; ρ L-z is the point cloud removal parameter for the left rail, and ρ L-z >1;
[0039] For the point cloud data on the right side of the center line, calculate the distance d from each point cloud data j to the center line j-z , and the average distance d from each point cloud data to the center line ave-R-z ; Then the following criteria are used to eliminate non-rail point cloud data: If d j-z ≥ρ R-z ·d ave-R-z , then the corresponding point cloud data j is removed; the remaining point cloud data that is not removed is the point cloud data on the right side of the center line after removing the non-rail point cloud data; ρ R-z is the right rail point cloud removal parameter, and ρ R-z >1;
[0040] S6. Merge the point cloud data on both sides of the center line after eliminating the non-rail point cloud data to obtain new rail point cloud data, and use it as the current rail point cloud data;
[0041] S7. Repeat steps S3 to S6, resetting the deviation set value each time until the set stop condition is met, thereby obtaining the final rail point cloud extraction result of the existing line;
[0042] In the specific implementation, each time it is repeated, the left rail point cloud removal parameter ρ is reset L-z and the right rail point cloud removal parameter ρ R-z , and ρ L-z >1 and ρ R-z >1; where ρ L-z and ρ R-z The preferred value range of is 1.0 to 1.2;
[0043] In specific implementation, the following rules are used as stop conditions:
[0044] If | b z+1 -b z |·cosθ z <α, then it is determined that the set stop condition is met; where b z+1 is the center line intercept calculated when fitting the center line for the z+1th time; b z is the center line intercept calculated when fitting the center line for the zth time; θ z is the angle between the center line obtained by the z-th fitting and the x-axis; α is the set stop threshold parameter; z is a positive integer; wherein the value of α is preferably 0.03 to 0.07 meters.
[0045] The method of the present invention is further described below in conjunction with a specific embodiment:
[0046] Figure 2 This is a schematic diagram of point cloud data after classification and identification using the method of the present invention. Figure 3 The schematic diagram of the manually extracted rail point cloud data of the embodiment of the method of the present invention is shown in FIG. The effectiveness of the method of the present invention is evaluated through the following series of comparative calculations.
[0047] The coordinates and classification attributes (0,1) of each point are counted, and the statistical results are shown in Table 1; 1 represents that the algorithm determines it to be a rail, and 0 represents that the algorithm determines it to be a non-rail.
[0048] Table 1 (0,1) classification results
[0049] id x y z True classification Test classification 1 -195.999 -75.274 -1.5 1 1 …… …… …… …… …… …… 336618 -195.961 -74.455 -1.403 0 0
[0050] Table 2 is a schematic diagram of the classification result confusion matrix:
[0051] Table 2 Classification results confusion matrix results diagram
[0052]
[0053] Then calculate the evaluation index:
[0054] Accuracy
[0055] Recall
[0056] F-number
[0057] Where tp is the number of real rail points in the rail point cloud after being processed by the classification algorithm, fp is the number of non-rail points that are mistakenly classified as rail points after being processed by the classification algorithm, and fn is the number of rail points that are mistakenly classified as non-rail points after being processed by the classification algorithm.
[0058] It can be seen from the above evaluation indicators that the method of the present invention has very excellent accuracy and applicability.
[0059] like Figure 4 The following is a schematic diagram of the histogram distribution of the distance from the rail point cloud to the center line: Figure 4 It can be seen that the distance from the rail point to the calculated center line is distributed around 0.7185 m, i.e., half the track gauge. Compared with the aforementioned existing algorithms, the rail center line identified by the method of the present invention is more accurate.
Claims
1. A method for extracting rail point clouds of an existing line, comprising the following steps: S1. Obtain the pcd format file of the existing line; S2. Obtain rail point cloud data of the existing line according to the pcd format file obtained in step S1; S3. Perform centerline fitting on the current rail point cloud data to obtain the centerline of the current rail point cloud; specifically, the steps include: If it is the first time to fit the center line, the least square method is used to fit the center line of the current rail point cloud data to obtain the center line of the current rail point cloud; where, The slope of the center line is k1, and the intercept of the center line is b1; If the center line is fitted for the z+1th time, the slope of the center line is kept as k z , and calculate the center line intercept b of the z+1th fit z+1 for Where b z is the center line intercept calculated when fitting the center line for the zth time; d ave-L-z is the average distance from each point cloud data on the left side of the center line to the center line calculated during the zth non-rail point cloud data elimination operation; d ave-R-z is the average distance from each point cloud data on the right side of the center line to the center line calculated during the zth non-rail point cloud data elimination operation; θ z is the angle between the center line obtained by the z-th fitting and the x-axis; z is a positive integer; S4. Separate the rail point cloud data on both sides of the center line; S5. For the rail point cloud data on both sides of the center line, the non-rail point cloud data that deviates from the center line by a distance greater than the set value is eliminated to obtain the point cloud data on both sides of the center line after eliminating the non-rail point cloud data; S6. Merge the point cloud data on both sides of the center line after eliminating the non-rail point cloud data to obtain new rail point cloud data, and use it as the current rail point cloud data; S7. Repeat steps S3 to S6, resetting the deviation set value each time until the set stop condition is met, thereby obtaining the final rail point cloud extraction result of the existing line.
2. The rail point cloud extraction method for an existing line according to claim 1, characterized in that The step S5, for the rail point cloud data on both sides of the center line, removes the non-rail point cloud data that deviates from the center line by a distance greater than a set value, and obtains the point cloud data after removing the non-rail point cloud data on both sides of the center line, specifically comprising the following steps: For the zth non-rail point cloud data removal operation: For the point cloud data on the left side of the center line, calculate the distance d from each point cloud data i to the center line i-z , and the average distance d from each point cloud data to the center line ave-L-z ; Then the following criteria are used to eliminate non-rail point cloud data: If d i-z ≥ρ L-z ·d ave-L-z , then the corresponding point cloud data i is removed; the remaining point cloud data that is not removed is the point cloud data on the left side of the center line after removing the non-rail point cloud data; ρ L-z is the point cloud removal parameter for the left rail, and ρ L-z >1; For the point cloud data on the right side of the center line, calculate the distance d from each point cloud data j to the center line j-z , and the average distance d from each point cloud data to the center line ave-R-z ; Then the following criteria are used to eliminate non-rail point cloud data: If d j-z ≥ρ R-z ·d ave-R-z , then the corresponding point cloud data j is removed; the remaining point cloud data that is not removed is the point cloud data on the right side of the center line after removing the non-rail point cloud data; ρ R-z is the right rail point cloud removal parameter, and ρ R-z >1.
3. The rail point cloud extraction method for an existing line according to claim 2 is characterized in that The deviation setting value is reset each time the step S7 is repeated. Specifically, the left rail point cloud removal parameter ρ is reset each time the step S7 is repeated. L-z and the right rail point cloud removal parameter ρ R-z , and ρ L-z >1 and ρ R-z >1.
4. The rail point cloud extraction method for an existing line according to claim 3 is characterized in that The stop condition set in step S7 is specifically to use the following rules as the stop condition: If | b z+1 -b z |·cosθ z <α, then it is determined that the set stop condition is met; where b z+1 is the center line intercept calculated when fitting the center line for the z+1th time; b z is the center line intercept calculated when fitting the center line for the zth time; θ z is the angle between the center line obtained by the z-th fitting and the x-axis; α is the set stop threshold parameter; z is a positive integer.
