A method for extracting track area based on laser point cloud data
By collecting and processing the laser point cloud data, the reference curve was screened and fitted, and the rail line area was indirectly extracted, which solved the problem of short detection distance in the existing technology, and increased the distance and accuracy of obstacle detection.
Patent Information
- Application Number
- CN202311014777.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2043-08-14
AI Technical Summary
When extracting rail-mounted areas, the camera is greatly affected by light and weather and has poor anti-interference ability. When lidar directly detects rails, the detection distance is short and is limited by lidar performance.
By collecting the laser point cloud data in front of the train, the laser point cloud data of the reference object is screened and the reference objects are screened.
Under the limitation of lidar performance, the detection distance of the rail area is increased, and the detection distance and accuracy of obstacles are increased.
Smart Images

Figure CN116994226B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of rail transit, and in particular to a method for extracting a track area based on laser point cloud data. Background Art
[0002] Autonomous obstacle detection technology for trains is of great significance to ensuring the safety of train operations. The track area is a sensitive area for obstacle detection, so extracting the track area is a prerequisite for obstacle detection.
[0003] Currently, the mainstream method of extracting track areas is to use cameras and lidar to directly detect rails to determine the track area. However, cameras are greatly affected by light and weather and have poor anti-interference capabilities. Directly detecting rails with lidar requires high density of laser point cloud data. Under the current limitations of lidar performance, the detection distance that can be achieved by this method is relatively short. Summary of the invention
[0004] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a track area extraction method based on laser point cloud data, taking the side walls on both sides of the track area parallel to the rails as reference objects, and indirectly extracting the track area by detecting the reference objects, thereby improving the detection distance of the track area.
[0005] The present invention is implemented by the following technical solution: A method for extracting a track area based on laser point cloud data, comprising the following steps:
[0006] 1. A method for extracting a track area based on laser point cloud data, characterized in that it comprises the following steps:
[0007] S1. Collect laser point cloud data in front of the train, and filter out incomplete laser point cloud data caused by the limitation of the laser radar field of view and laser point cloud data beyond the maximum detection distance;
[0008] S2. In the remaining laser point cloud data, the laser point cloud data are screened and clustered using a fixed distance segmentation method, and the main cluster obtained after clustering represents the laser point cloud data of the reference object;
[0009] S3, projecting the laser point cloud data of the reference object onto a horizontal plane, fitting the reference object curve based on the improved differential evolution algorithm, with the reference object curve on the left side of the train as the upper boundary and the reference object curve on the right side of the train as the lower boundary;
[0010] S4, based on the laser point cloud data volume-density two-step determination method, a target boundary line is selected from the upper and lower boundaries obtained by fitting;
[0011] S5. Calculate the center line of the track area based on the target boundary line;
[0012] S6. Set a threshold value L, use the height difference between the upper and lower boundaries as a basis for judgment, and select the track area boundary line expansion method or the track area center line expansion method in sections to calculate the track area.
[0013] 2. The laser point cloud data of the reference object screened based on the fixed distance segmentation method in step S2 specifically includes the following steps:
[0014] S21, dividing the selected laser point cloud data into intervals of length a, finding k highest points in each interval, calculating their average value as the average height of the upper boundary, and finding k lowest points in each interval, calculating their average value as the average height of the lower boundary;
[0015] S22. In each interval, the average height of the upper boundary is used as a reference to extend downward by a distance of b, and the average height of the lower boundary is used as a reference to extend upward by a distance of b, so as to finally form an upper and a lower selection area;
[0016] S23, selecting all laser point cloud data in the upper and lower selected areas in each interval;
[0017] S24, respectively combining the laser point cloud data of the upper and lower selected areas to form upper and lower boundaries with an average width of b.
[0018] 3. In step S3, fitting the reference curve based on the improved differential evolution algorithm specifically includes the following steps:
[0019] S31, randomly generating an initial population, which includes m randomly generated individuals I, and the elements in individual I are all the terms of the curve polynomial;
[0020] S32, the i-th individual G in the population i The mutation operation is performed as follows, and the individual after mutation is recorded as G i ', the population of the first iteration is the initial population:
[0021] G i '=I a +k mutate ×(I b -I c )
[0022] Among them, k mutate is the mutation probability, I a ,I b ,I c are three randomly generated individuals;
[0023] S33, perform a crossover selection operation on the individuals generated in this iteration, and the individuals after the crossover selection are recorded as G" i , the crossover selection operation of the jth element in the individual is:
[0024]
[0025] S34, calculating the root mean square error, and if the obtained root mean square error is smaller, updating the optimal solution;
[0026] S35, repeat steps S32 to S34 until all individuals in the population are traversed;
[0027] S36. Repeat steps S32 to S35 until the maximum number of iterations n is reached.
[0028] 4. Step S4: Selecting the target boundary line based on the laser point cloud data volume-density two-step determination method. The specific steps are as follows:
[0029] Calculate the difference between the upper and lower boundary laser point cloud data volumes to determine whether the difference exceeds the set threshold. If it exceeds the threshold, directly select the boundary with more laser point clouds as the target boundary line; if it does not exceed the threshold, calculate the root mean square error of the upper and lower boundaries, and select the boundary represented by the smaller root mean square error as the target boundary line. The formula is as follows:
[0030]
[0031] Among them, A represents the upper boundary, B represents the lower boundary, T represents the target boundary line, and n A Represents the number of laser point cloud data of the upper boundary, n B represents the number of laser point cloud data at the lower boundary, μ is the threshold coefficient, RMSE(A) represents the root mean square error of the upper boundary, and RMSE(B) represents the root mean square error of the lower boundary.
[0032] 5. In step S6, the segmented selection using the track area boundary line expansion method or the track area center line expansion method, the track area calculation specifically includes the following steps:
[0033] S61, reuse and select the highest point and the lowest point of the upper and lower boundaries, and start from the first unit interval, calculate the average height of multiple highest points of the upper boundary and the average height of multiple lowest points of the lower boundary within each unit interval, and record them as h respectively. up 、h down ;
[0034] S62, a user-defined threshold L, if the difference between the average height of the highest point and the average height of the lowest point is less than or equal to the threshold, the track area centerline expansion method is used; if the difference between the average height of the highest point and the average height of the lowest point is greater than the threshold, the track area boundary line expansion method is used;
[0035] S63, in the track area boundary line expansion method, if the target boundary line is the upper boundary, then expand from the upper boundary downward extendDistance; if the target boundary line is the lower boundary, then expand upward from the lower boundary h extend distance to form a track area; in the track area centerline expansion method, the track area centerline is expanded upward and downward simultaneously The distance is used to form the track area, that is, the track area can be expressed by the following formula:
[0036]
[0037] Compared with the prior art, the present invention has the following advantages:
[0038] The present invention does not extract the track area by directly detecting the rails, but uses the side walls of the track area parallel to the rails as reference objects. By detecting reference objects with larger volumes and more point cloud data, the rails are indirectly extracted and the track area is determined. The detection distance of the track area is increased within the limitations of the laser radar performance, which helps to improve the obstacle detection distance and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a schematic diagram of the method flow of the present invention;
[0040] Figure 2 A schematic diagram of the laser radar installation position and the information contained in the laser point cloud data in the embodiment;
[0041] Figure 3 A schematic diagram of obtaining upper and lower selection areas when screening reference object laser point cloud data in an embodiment;
[0042] Figure 4 This is a result diagram of the laser point cloud data for screening reference objects in the embodiment, where: Figure 4 (b) is the lower boundary result, Figure 4 (c) is the upper boundary result;
[0043] Figure 5 This is a clustering result diagram of the laser point cloud data of the reference object in the embodiment, where: Figure 5 (a) is the lower boundary result, Figure 5 (b) is the upper boundary result;
[0044] Figure 6 A result map for selecting a target boundary line in the embodiment;
[0045] Figure 7 This is a diagram of the track area extraction result in the embodiment; DETAILED DESCRIPTION
[0046] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0047] Example
[0048] like Figure 1 As shown, a track area extraction method based on laser radar includes the following steps:
[0049] S1. Collect laser point cloud data in front of the train, and filter out incomplete laser point cloud data caused by the limitation of the laser radar field of view and laser point cloud data beyond the maximum detection distance;
[0050] S2. In the remaining laser point cloud data, the laser point cloud data are screened and clustered using a fixed distance segmentation method, and the main cluster obtained after clustering represents the laser point cloud data of the reference object;
[0051] S3, projecting the laser point cloud data of the reference object onto a horizontal plane, fitting the reference object curve based on the improved differential evolution algorithm, with the reference object curve on the left side of the train as the upper boundary and the reference object curve on the right side of the train as the lower boundary;
[0052] S4, based on the laser point cloud data volume-density two-step determination method, a target boundary line is selected from the upper and lower boundaries obtained by fitting;
[0053] S5. Calculate the center line of the track area based on the target boundary line;
[0054] S6. Setting a threshold value L, using the height difference between the upper and lower boundaries as a basis for judgment, and selecting the track area boundary line expansion method or the track area center line expansion method for segmented selection to calculate the track area;
[0055] Through the above steps, the track area is indirectly extracted based on the laser point cloud data in front of the train, and the detection distance of the track area is increased within the performance limitation of the lidar.
[0056] Specifically, in step S2, screening the laser point cloud data of the reference object based on the fixed distance segmentation method specifically includes the following steps:
[0057] S21, dividing the selected laser point cloud data into intervals of length a, finding k highest points in each interval, calculating their average value as the average height of the upper boundary, and finding k lowest points in each interval, calculating their average value as the average height of the lower boundary;
[0058] S22. In each interval, the average height of the upper boundary is used as a reference to extend downward by a distance of b, and the average height of the lower boundary is used as a reference to extend upward by a distance of b, so as to finally form an upper and a lower selection area;
[0059] S23, selecting all laser point cloud data in the upper and lower selected areas in each interval;
[0060] S24, respectively combining the laser point cloud data of the upper and lower selected areas to form upper and lower boundaries with an average width of b.
[0061] Specifically, in step S3, fitting the reference curve based on the improved differential evolution algorithm specifically includes the following steps:
[0062] S31, randomly generating an initial population, which includes m randomly generated individuals I, and the elements in individual I are all the terms of the curve polynomial;
[0063] S32, the i-th individual G in the population i The mutation operation is performed as follows, and the individual after mutation is recorded as G i ', the population of the first iteration is the initial population:
[0064] G i '=I a +k mutate ×(I b -I c )
[0065] Among them, k mutate is the mutation probability, I a ,I b ,I c are three randomly generated individuals;
[0066] S33, perform a crossover selection operation on the individuals generated in this iteration, and the individuals after the crossover selection are recorded as G" i , the crossover selection operation of the jth element in the individual is:
[0067]
[0068] S34, calculating the root mean square error, and if the obtained root mean square error is smaller, updating the optimal solution;
[0069] S35, repeat steps S32 to S34 until all individuals in the population are traversed;
[0070] S36. Repeat steps S32 to S35 until the maximum number of iterations n is reached.
[0071] Specifically, the target boundary line is selected based on the laser point cloud data volume-density two-step determination method in step S4, including the following steps:
[0072] Calculate the difference between the upper and lower boundary laser point cloud data volumes to determine whether the difference exceeds the set threshold. If it exceeds the threshold, directly select the boundary with more laser point clouds as the target boundary line; if it does not exceed the threshold, calculate the root mean square error of the upper and lower boundaries, and select the boundary represented by the smaller root mean square error as the target boundary line. The formula is as follows:
[0073]
[0074] Among them, A represents the upper boundary, B represents the lower boundary, T represents the target boundary line, and n A Represents the number of laser point cloud data of the upper boundary, n B represents the number of laser point cloud data at the lower boundary, μ is the threshold coefficient, RMSE(A) represents the root mean square error of the upper boundary, and RMSE(B) represents the root mean square error of the lower boundary.
[0075] Specifically, in step S6, the segmented selection of using the track area boundary line extension or the track area center line extension, and the calculation of the track area include the following steps:
[0076] S61, reuse and select the highest point and the lowest point of the upper and lower boundaries, and start from the first unit interval, calculate the average height of multiple highest points of the upper boundary and the average height of multiple lowest points of the lower boundary within each unit interval, and record them as h respectively. up 、h down ;
[0077] S62, a user-defined threshold L, if the difference between the average height of the highest point and the average height of the lowest point is less than or equal to the threshold, the track area centerline expansion method is used; if the difference between the average height of the highest point and the average height of the lowest point is greater than the threshold, the track area boundary line expansion method is used;
[0078] S63, in the track area boundary line expansion method, if the target boundary line is the upper boundary, then expand from the upper boundary downward extend Distance; if the target boundary line is the lower boundary, then expand upward from the lower boundary h extend distance to form a track area; in the track area centerline expansion method, the track area centerline is expanded upward and downward simultaneously The distance is used to form the track area, that is, the track area can be expressed by the following formula:
[0079]
[0080] In order to verify the effectiveness of the technical solution, this embodiment is described by taking the operation of a subway line train as an example.
[0081] (I) Collecting laser point cloud data during train operation on Shanghai Metro Line 11. The laser radar installation location and the information contained in the laser point cloud data are as follows: Figure 2 As shown. The laser radar is installed on the front windshield of the train, at a height of h from the ground. Taking point P as an example, the information contained in the laser point cloud data is explained: Among them, is the angle of the laser point cloud data point relative to the laser radar in the vertical upward direction and the horizontal forward direction, and r is the distance between the laser point cloud data point and the laser radar. With the projection point of the laser radar on the ground as the origin of the coordinates, the train forward direction as the X axis, and the vertical upward direction as the Z axis, a right-handed rectangular coordinate system is established, and the coordinates (x, y, z) of the laser point cloud data point can be calculated by the following formula:
[0082]
[0083] z=rcosθ+h
[0084] (ii) Filter out the laser point cloud data in the range of 0 to 40 m and over 150 m, and select the laser point cloud data in the range of 40 m to 150 m as the object for subsequent operation and processing;
[0085] (III) Filtering and clustering the laser point cloud data based on the fixed distance segmentation method to obtain the laser point cloud data of the reference object. The specific steps are as follows:
[0086] (1) In the laser point cloud data of 40m to 150m, with a = 1m as the interval, find the three highest points in each interval and calculate the average value as the average height of the upper boundary of the interval, and find the three lowest points in each interval and calculate the average value as the average height of the lower boundary of the interval;
[0087] (2) In each interval, the average height of the upper boundary is used as the benchmark to expand downward by b = 2m, and at the same time, the average height of the lower boundary is used as the benchmark to expand upward by b = 2m, finally forming the upper and lower selection areas, such as Figure 3 As shown;
[0088] (3) Select all laser point cloud data in the upper and lower selection areas within each interval;
[0089] (4) The laser point cloud data of the upper and lower selected areas are combined to form upper and lower boundaries with an average width of 2 m, as shown in Figure 4 shown.
[0090] (5) The laser point cloud data obtained after screening are clustered using the DBSCAN clustering method. The parameter domain radius r = 20 m and the number threshold m of cluster laser point cloud data are set to 20% of the total data set. Two boundaries representing the reference objects in the track area are obtained, as shown in Figure 5 As shown;
[0091] (iv) projecting the reference object laser point cloud data onto a horizontal plane;
[0092] (V) For the two-dimensional laser point cloud data, the reference curve is fitted based on the improved differential algorithm. The specific steps are as follows:
[0093] (1) Randomly generate an initial population of m = 20 individuals, each of which contains three items, A1, A2, and A3. The resulting curve polynomial is: A1x 2 +A2x+A3;
[0094] (2) Set the mutation probability k mutate =0.8, randomly generate three individuals I a ,I b ,I c , the i-th individual G i According to formula G i '=I a +k mutate ×(I b -I c ) to perform mutation operation, and the individual after mutation is recorded as G i ';
[0095] (3) Set the crossover probability k crossover =0.8, crossover selection is performed on the individuals generated in this iteration, and the individuals after crossover selection are recorded as G' i ', G' i The crossover selection operation for the jth element in ' is:
[0096]
[0097] (4) y i Transformed into the y coordinate value of the i-th sample point in the two-dimensional laser point cloud data, y i 'Converted into the y coordinate value corresponding to the x coordinate value of the i-th sample point in the two-dimensional laser point cloud data on the prediction curve, according to the formula Calculate the root mean square error (RMSE), and update the optimal solution when the root mean square error decreases;
[0098] (5) Repeat steps (2) to (4) until all 20 individuals in the population have been traversed;
[0099] (6) Repeat steps (2) to (5) until the maximum number of iterations is 80, and use the optimal solution as the reference curve fitting result.
[0100] (VI) Set the threshold coefficient β = 3 and calculate the target boundary line according to the formula:
[0101]
[0102] The target boundary line selection results are as follows: Figure 6 As shown;
[0103] (VII) Move the target boundary line to the average of the average height of the highest point and the average height of the lowest point, which is regarded as the center line of the track area;
[0104] (VIII) Calculate the horizontal extent of the track area by using the method of extending from the track area boundary line or from the track area center line in sections. The specific steps are as follows:
[0105] (1) Reuse the laser point cloud data of the highest and lowest points of the upper and lower boundaries, starting from 40 to 41 m, and calculate the average height of multiple highest points on the upper boundary and the average height of multiple lowest points on the lower boundary within every 1 m, denoted as h up 、h down ;
[0106] (2) Set the threshold value L = 6m. If the difference between the average height of the highest point and the average height of the lowest point is less than or equal to L, the track area centerline expansion method is used; if the difference between the average height of the highest point and the average height of the lowest point is greater than L, the track area boundary line expansion method is used;
[0107] (3) Set h extend =2.6m, when using the track area boundary line expansion method, if the target boundary line is the upper boundary, then expand from the upper boundary downward h extend ; If the target boundary line is the lower boundary, then expand h from the lower boundary upward extend Distance to form the track area; when using the track area centerline expansion method, expand upward and downward from the track area centerline at the same time The distance is used to form the track area, that is, the track area can be expressed by the following formula:
[0108]
[0109] Finally, the track area extraction result can be obtained as follows Figure 7 shown.
[0110] In summary, this technical solution realizes indirect detection of rails by detecting tunnel walls, protective walls and sound barriers parallel to the rails. Under the premise of existing lidar performance limitations, it can increase the detection distance of the track area, which helps to improve the obstacle detection distance and accuracy.
Claims
1. A method for extracting track area based on laser point cloud data, characterized in that: The following steps are involved: S1. Collect laser point cloud data in front of the train, and filter out incomplete laser point cloud data caused by the limitation of the laser radar field of view and laser point cloud data beyond the maximum detection distance; S2. In the remaining laser point cloud data, the laser point cloud data are screened and clustered using a fixed distance segmentation method, and the main cluster obtained after clustering represents the laser point cloud data of the reference object; S3. Projecting the laser point cloud data of the reference object onto a horizontal plane, fitting the reference object curve based on the improved differential evolution algorithm, with the reference object curve on the left side of the train as the upper boundary and the reference object curve on the right side of the train as the lower boundary; fitting the reference object curve based on the improved differential evolution algorithm specifically includes the following steps: S31, randomly generating an initial population, which includes m randomly generated individuals I, and the elements in individual I are all the terms of the curve polynomial; S32, the i-th individual G in the population i The mutation operation is performed as follows, and the individual after mutation is recorded as G i ', the population of the first iteration is the initial population: G i '=I a +k mutate ×(I b -I c ) Among them, k mutate is the mutation probability, I a ,I b ,I c are three randomly generated individuals; S33, perform a crossover selection operation on the individuals generated in this iteration, and the individuals after the crossover selection are recorded as G" i , the crossover selection operation of the jth element in the individual is: S34, calculating the root mean square error, and if the obtained root mean square error is smaller, updating the optimal solution; S35, repeat steps S32 to S34 until all individuals in the population are traversed; S36, repeat steps S32 to S35 until the maximum number of iterations n is reached; S4. Based on the two-step determination method of laser point cloud data volume and density, a target boundary line is selected from the upper and lower boundaries obtained by fitting. The specific steps are as follows: Calculate the difference between the upper and lower boundary laser point cloud data volumes to determine whether the difference exceeds the set threshold. If it exceeds the threshold, directly select the boundary with more laser point clouds as the target boundary line; if it does not exceed the threshold, calculate the root mean square error of the upper and lower boundaries, and select the boundary represented by the smaller root mean square error as the target boundary line. The formula is as follows: Among them, A represents the upper boundary, B represents the lower boundary, T represents the target boundary line, and n A Represents the number of laser point cloud data of the upper boundary, n B represents the number of laser point cloud data at the lower boundary, μ is the threshold coefficient, RMSE(A) represents the root mean square error of the upper boundary, and RMSE(B) represents the root mean square error of the lower boundary; S5. Calculate the center line of the track area based on the target boundary line; S6. Setting a threshold value L, using the height difference between the upper and lower boundaries as a basis for judgment, and selecting the track area boundary line extension method or the track area center line extension method in sections to calculate the track area, specifically including the following steps: S61, reuse and select the highest point and the lowest point of the upper and lower boundaries, and start from the first unit interval, calculate the average height of multiple highest points of the upper boundary and the average height of multiple lowest points of the lower boundary within each unit interval, and record them as h respectively. up 、h down ; S62, a user-defined threshold L, if the difference between the average height of the highest point and the average height of the lowest point is less than or equal to the threshold, the track area centerline expansion method is used; if the difference between the average height of the highest point and the average height of the lowest point is greater than the threshold, the track area boundary line expansion method is used; S63, in the track area boundary line expansion method, if the target boundary line is the upper boundary, then expand downward from the upper boundary extend Distance; if the target boundary line is the lower boundary, then expand upward from the lower boundary h extend distance to form a track area; in the track area centerline expansion method, the track area centerline is expanded upward and downward simultaneously The distance is used to form the track area, that is, the track area can be expressed by the following formula:
2. The method for extracting track area based on laser point cloud data according to claim 1, characterized in that: The step S2 of screening the laser point cloud data of the reference object based on the fixed distance segmentation method specifically includes the following steps: S21, dividing the selected laser point cloud data into intervals of length a, finding k highest points in each interval, calculating their average value as the average height of the upper boundary, and finding k lowest points in each interval, calculating their average value as the average height of the lower boundary; S22. In each interval, the average height of the upper boundary is used as a reference to extend downward by a distance of b, and the average height of the lower boundary is used as a reference to extend upward by a distance of b, so as to finally form an upper and a lower selection area; S23, selecting all laser point cloud data in the upper and lower selected areas in each interval; S24, respectively combining the laser point cloud data of the upper and lower selected areas to form upper and lower boundaries with an average width of b.
Citation Information
Patent Citations
Track center line automatic detection method based on vehicle-mounted mobile laser point cloud
CN110647798A
Laser radar-based in-tunnel train active obstacle detection system and method
CN112230245A