A train carriage positioning and segmentation method based on point cloud voxel rectangular grid
By using a point cloud voxel rectangular grid method, the problems of point cloud sparsity and non-uniqueness of train carriages caused by the installation height of lidar in the ore workshop were solved, enabling rapid and accurate positioning and segmentation of train carriages, and adapting to the needs of automated transformation in mining areas.
Patent Information
- Application Number
- CN202211030151.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-08-26
AI Technical Summary
In the ore workshop, the sparse and varied point cloud caused by the improper installation height of the lidar and the distance between it and the train carriage, as well as the non-uniqueness of the carriage, make it difficult to locate and segment the carriage.
A point cloud voxel rectangular grid method is adopted. Point clouds are collected by multiple lidars, ground point clouds are removed by integration and accumulation, the center coordinates of the carriage are obtained, rectangular gridding and centroid filtering are performed, and the carriage length and distance are calculated in combination with the actual carriage size constraints. Missing data is filled in and the carriage is finally segmented.
It enables rapid and accurate positioning and segmentation of each car in the ore workshop, adapting to sparse and varied point clouds, and adapting to scenarios with car movement and non-unique specifications, providing the prerequisites for automated transformation.
Smart Images

Figure CN115423824B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of target localization and segmentation in point cloud processing, and in particular to a method for localization and segmentation of train carriages based on point cloud voxel rectangular grids. Background Technology
[0002] Steel production is a crucial indicator of a nation's industrial strength. With the deepening of national industrialization, the demand for iron ore is increasing. In the automation upgrade of ore processing plants, multiple lidar sensors are often used to perceive the external environment. To scan the entire plant, lidar sensors are typically installed on the ceiling. However, this installation method often results in a significant difference between the distance of the lidar to the train and the distance between the open wagons in the ore processing plant. Under these conditions, the point cloud collected by the radar becomes very messy, sparse, and partially missing. As more ore accumulates in the wagons, the point cloud collected by the radar also changes continuously. Furthermore, the trains in the plant may have different models and sizes, and the trains may continue to move forward after loading some wagons. All these factors make the positioning and segmentation of the wagons difficult. Summary of the Invention
[0003] The purpose of this invention is to propose a point cloud localization and segmentation method for open wagons in mining areas based on the concept of point cloud voxels. This method can clearly and robustly locate and segment each wagon, and the accuracy meets the actual requirements.
[0004] The technical solution adopted by the present invention to achieve the above objectives is: a method for locating and segmenting train carriages based on point cloud voxel rectangular grids, characterized by comprising the following steps:
[0005] 1) Install multiple calibrated multi-laser radars in the ore workshop as required, collect point clouds of the target ore plant area through the multi-laser radars, and extract the point clouds of the train carriages in the ore workshop;
[0006] 2) Integrate and accumulate the train point cloud on the time axis t, and remove the ground point cloud from the train car point cloud to obtain the Z-axis coordinates of the center of all train cars; map and project the 3D train car point cloud after removing the ground onto the XY plane to obtain the planar point cloud of the train cars, and obtain the Y-axis coordinates of the center of all train cars.
[0007] 3) Rasterize the planar point cloud of the train carriage into rectangles and obtain the line density of the point cloud in each rectangle. Select the n grids with the highest line density of the point cloud; obtain the centroid of the point cloud in each rectangle of the first n grids, and sort the X coordinate values of the selected centroids in ascending order to form a one-dimensional array W.
[0008] 4) Based on the specifications and dimensions of the train carriages in the mining area, restrict the X-coordinate values of every three centroids in the one-dimensional array W in step 3), obtain the X-coordinates of the three adjacent centroids that meet the requirements, and calculate the X-axis coordinate value of the train carriage, the length of the train carriage, and the distance between each train carriage.
[0009] 5) Complete the point cloud data of other missing or unlocatable carriages based on the already located train carriages;
[0010] 6) Based on the location of each carriage and the calculated length of each carriage, the initial 3D train point cloud is segmented.
[0011] Step 1) specifically refers to:
[0012] 1-1) As required, multiple calibrated multi-laser radars are installed in the ore workshop, namely:
[0013] Multiple lidar units are configured according to the actual direction of the train track, that is, the X-axis of the unified world coordinate system of multiple lidar units is parallel to the direction of the train track, and the Y-axis of the world coordinate system is perpendicular to the direction of the train track.
[0014] 1-2) Radar point cloud acquisition is performed on the ore workshop. After obtaining the point cloud data of the ore workshop, the point cloud on the XYZ axis is truncated and the point cloud of the train carriage is extracted separately.
[0015] Step 2), obtaining the Z-axis coordinates of the centers of all train carriages, includes the following steps:
[0016] 2-1) Integrate the point cloud every T frames along the time axis t to synthesize a single frame of point cloud PC. T To make the processed point cloud denser, for point cloud PC T Statistical filters are used to remove outliers, resulting in the point cloud Q.
[0017] 2-2) Sort the z-coordinate values of the points in the point cloud Q in ascending order, and select the m points with the smallest z-coordinates to form a set A;
[0018] 2-3) Calculate the average z-coordinate value of all points in set A. mean Then, in the point cloud Q, the values less than z mean All points at +d0 are extracted and fitted to form an initial planar point cloud Q. src Where d0 is a threshold value set according to the actual situation;
[0019] For the initial planar point cloud Q src Fitting the point cloud plane, first for the point cloud Q src Perform covariance calculation to obtain the point cloud Q.src The complete covariance matrix M;
[0020] 2-4) Perform SVD decomposition on the covariance matrix M to obtain the vector corresponding to the minimum singular value, which is the normal vector of the fitting plane, n = (a, b, c). T Then, the parameters a, b, and c are obtained;
[0021] 2-5) Transfer the point cloud Q src Mean values on the x, y, z axes The fitting plane parameters d are obtained through fitting, and then the initial point cloud Q is obtained. src The fitting plane L;
[0022] 2-6) Calculate the distance d1 from a point in point cloud Q to the fitting plane L;
[0023] If d1 < dL, where dL is the maximum allowable value from a point in the point cloud to the fitted plane, then the point is a ground point; otherwise, if d1 ≥ dL, then the point is a non-ground point.
[0024] By traversing all points in the point cloud Q, we obtain the non-ground point cloud Q in the train point cloud Q. tar ;
[0025] 2-7) Obtain the maximum value z_max and minimum value z_min of the train point cloud along the Z-axis. Then, the Z-axis coordinates z_max of the center of all train carriages are obtained. tr The height of the train, Carriage_height, is as follows:
[0026]
[0027] In step 2), obtaining the Y-axis coordinates of the centers of all train carriages specifically involves:
[0028] The processed 3D train car point cloud is mapped to a 2D XY plane. The maximum value y_max and minimum value y_min on the Y-axis of the mapped point cloud plane are calculated. Then the Y-axis coordinates y_max and y_min of the centers of all train cars are obtained. tr And the width of the carriage, Carriage_width, that is:
[0029]
[0030] Step 3) includes the following steps:
[0031] 3-1) Divide the train planar point cloud into x_num rectangular grids along the X-axis, i.e.:
[0032]
[0033] Where length is the maximum length of the planar train point cloud in the X-axis direction, x_num is the total number of grids in the planar train point cloud, and Δl is the length of each grid in the X-axis direction.
[0034] After partitioning, we get a one-dimensional array W = {w1, w2, w3, ..., w x_num};
[0035] Among them, w x_num For the point cloud within each grid cell;
[0036] 3-2) The resulting one-dimensional array W = {w1, w2, w3, ..., w...} is partitioned. x_num Each point in the cloud is classified into its own point cloud according to formula (4). ix In the train planar point cloud, each point has a unique w. ix ,Right now:
[0037] ix = (x i -x_min) / Δl (4)
[0038] Where, x i x_min is the x-axis coordinate of each point in the train planar point cloud; x_min is the minimum x-axis coordinate; Δl is the length of each grid cell in the x-axis direction.
[0039] 3-3) Calculate w for each point cloud cluster sequentially. ix The point cloud line density, i.e.:
[0040] The total number of points in each point cloud cluster is divided by (the maximum Y-axis coordinate value of the point cloud cluster - the minimum Y-axis coordinate value of the point cloud cluster), yielding the set P = {P1, P2, P3, ..., P...}. x_num};
[0041] 3-4) Sort the set P from largest to smallest and take out the first num points. Find the point cloud cluster w corresponding to each of these num point cloud densities. ix Complete the one-dimensional array W = {w1, w2, w3, ..., w x_num}
[0042] In step 4), obtaining the length of the train carriages and the distance between each carriage is specifically as follows:
[0043] Calculate the X-axis coordinates of the centroid of each point cloud cluster in the one-dimensional array W and form a set list_x = {x g1 ,x g2 ,x g3 ,....,x gnum Sort the collection list_x in ascending order;
[0044] The centroid coordinates of three consecutively adjacent point cloud clusters on the X-axis are extracted to satisfy the following condition:
[0045]
[0046] Among them, l1, l2, l3, and l4 are the lengths of the dimensions that limit the positional relationship between the centroids of three adjacent point cloud clusters according to the actual size of the train carriage, which are used to filter out point cloud clusters that are regarded as the short side of the train carriage;
[0047] And the X-axis coordinate value of this carriage is x tr ,Right now:
[0048]
[0049] Where, x tr The center X-axis coordinate of the car is denoted as ; Carriage_length is the length of the car; Carriage_space is the gap between the two cars.
[0050] After iterating through all the values in the set list_x, calculate all the centroids that satisfy formula (8), and calculate the X coordinate of the corresponding carriage center according to formula (6);
[0051] The center position (x) of each car located by the received lidar data from the ore plant area. tr ,y tr ,z tr When the number of point clouds in the data collected by the lidar at a certain moment reaches a threshold, the position of each carriage is located.
[0052] Step 5) specifically involves:
[0053] 5-1) Calculate the center distance m between two carriages in front and behind where there is a gap in the point cloud. At the same time, calculate that the center distance m is k times train_lh, where train_lh is the sum of the length of a single carriage and the gap length between two consecutive carriages.
[0054] 5-2) When k>2, it can be determined that there is a missing car between the two carriages, and the number of missing cars is k-1. The X-axis coordinate of the center of the missing car is obtained by adding i+1 train_lh values to the X-axis coordinate of the center of the car preceding the missing car. <k-1;
[0055] 5-3) When the missing part is located in front of the already located carriage, compare the maximum X-axis coordinate value of the center position of the currently located carriage with the value of the missing part. endGiven the maximum coordinate value x_max on the X-axis of the current point cloud of the entire train carriage, if it satisfies formula (7), then the maximum X-axis coordinate value x_max at the center of the located carriage is... end Based on the current position, continue to fill in the corresponding m forward. l There are 10 carriages, and the center of each carriage is spaced apart by train_lh.
[0056] x end +(m l ·train_lh)<x_max (7)
[0057] Where, m l Take an integer greater than or equal to 0; train_lh = length of a single carriage + gap between every two carriages, in meters;
[0058] 5-4) When the missing part is located behind the already located carriage, compare the minimum X-axis coordinate value of the center position of the currently located carriage with that of the missing part. sta Given the minimum coordinate value x_min on the X-axis of the entire train point cloud, if it satisfies formula (8), then the minimum X-axis coordinate value x_min at the center of the located carriage is... sta Based on the current position, add r more carriages to the rear, with a spacing of train_lh between the center positions of each carriage;
[0059] x sta -r·train_lh>x_min (8)
[0060] Where r takes an integer greater than or equal to 0; train_lh = length of a single carriage + gap between every two carriages, m;
[0061] 5-5) Repeat steps 5-1) to 5-4) to complete all the missing parts of the carriages.
[0062] Step 7) specifically involves:
[0063] After locating each carriage of the train in the ore workshop, the actual point cloud of the carriages is segmented based on the position of the center of each carriage on the X-axis, i.e.:
[0064] The point cloud of the actual train is segmented and clustered if the distance from the center position of each carriage on the X-axis is less than or equal to half the length of a single carriage, so as to achieve the segmentation of the carriages.
[0065] The present invention has the following beneficial effects and advantages:
[0066] 1. In the automation and unmanned transformation of mining areas, this invention can quickly and accurately locate the position of each car responsible for transporting ore, and can serve as the "eyes" of the automatic control center of the mining area, providing the prerequisite for the realization of automation and unmanned transformation of the entire mining area.
[0067] 2. When using lidar to perceive open wagons, this invention can still robustly locate the center of each wagon even when the open wagon point cloud is missing or sparse in each frame.
[0068] 3. When using lidar to sense open wagons, even when the distance between the wagon compartments is too small relative to the distance between the lidar and the open wagon due to the lidar's fixed position being too far away, this invention can still robustly locate the center position of each wagon compartment.
[0069] 4. When using lidar to sense open wagons, even when the shape and volume of the point cloud in the wagon compartments change in real time with the size of the ore accumulation in the wagon compartments, the present invention can still locate the center of each wagon compartment without being affected.
[0070] 5. When the open wagon to be located does not remain stationary during real-time detection but undergoes a certain degree of movement, the present invention can still accurately locate the center position of each wagon.
[0071] 6. Even when the specifications of the open wagons are not unique during the positioning and detection process, the present invention can still automatically locate the center position of each wagon. Attached Figure Description
[0072] Figure 1 This is a diagram of the actual ore processing workshop of the present invention;
[0073] Figure 2 This is a radar scan point cloud image of the entire ore workshop according to the present invention;
[0074] Figure 3 This is the standalone train point cloud map of the present invention;
[0075] Figure 4 This is the train point cloud map after integral accumulation according to the present invention;
[0076] Figure 5 This is the train point cloud that has been projected onto the XY plane but has not been accumulated according to the present invention;
[0077] Figure 6 This is the projected and mapped XY plane and accumulated train point cloud of the present invention;
[0078] Figure 7 This is the train point cloud planar grid division diagram of the present invention;
[0079] Figure 8 This is a visualization of multiple point clouds extracted and superimposed by the present invention;
[0080] Figure 9 This is a schematic diagram of adjacent point clouds of the present invention;
[0081] Figure 10(a) is a complete and continuous carriage positioning diagram of the present invention;
[0082] Figure 10(b) is a partial carriage positioning diagram of the present invention;
[0083] Figure 10(c) is a complete diagram of the carriage positioning according to the present invention;
[0084] Figure 11 This is the point cloud map of a single carriage segmented as described in this invention; Detailed Implementation
[0085] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0086] A method for point cloud localization and segmentation of open wagon carriages in mining areas based on planar rectangular grids, the steps of which are as follows:
[0087] S1: Multiple lidar installation and configuration;
[0088] S2: Point cloud collection in the ore plant area, extracting the point cloud of the train section;
[0089] S3: Integrate and accumulate the train point cloud over time t, remove the ground from the train point cloud, and calculate the Z-axis coordinates of the centers of all train carriages.
[0090] S4: Map the 3D train point cloud after removing the ground to the plane and calculate the Y-axis coordinates of the centers of all train carriages;
[0091] S5: Rectangular rasterization of train planar point cloud;
[0092] S6: Calculate the line density of the point cloud in each rectangular grid cell, and select the n grid cells with the highest line density of the point cloud.
[0093] S7: Calculate the centroid of the point cloud in each selected rectangular grid, and sort the X coordinate values of these centroids in ascending order to form a one-dimensional array;
[0094] S8: Based on the specifications and dimensions of several open wagons that may appear in the mining area, restrict every three in the one-dimensional array obtained in S7, filter and locate the most accurate and robust wagon position, and calculate the wagon's X-axis coordinate value, the length of the wagon, and the distance between each wagon.
[0095] S9: Based on the already located train carriages, complete the parts of the train carriages that could not be located due to missing point cloud data or other reasons;
[0096] S10: Based on the already located position of each carriage and the calculated length of each carriage, segment the initial 3D train point cloud.
[0097] In S1, when multiple radars are installed and calibrated in the ore workshop, they are set according to the direction of the actual train track, that is, the X-axis of the world coordinate system of the final unified multi-radar system is parallel to the direction of the train track, and the Y-axis of the world coordinate system is perpendicular to the direction of the train track.
[0098] In step S2, radar point cloud data is collected from the ore workshop (actual workshop diagram as shown). Figure 1 As shown, the point cloud map of the entire ore workshop after collection is as follows: Figure 2 As shown, after obtaining the point cloud data of the ore workshop, point cloud truncation is performed on the XYZ axes to extract the point cloud of the train section separately, as shown below. Figure 3 As shown;
[0099] In this embodiment, based on the actual collected data of the ore workshop and the width of the train track, the points in each frame of the workshop point cloud that conform to formula (1) are individually truncated and extracted.
[0100]
[0101] In the formula: x, y, z are the coordinate values of the point cloud in the three directions of x, y, z axes, respectively, and m.
[0102] In S3, the method for removing the train point cloud from the ground and the method for calculating the Z-axis coordinate of the train carriage center are as follows:
[0103] like Figure 3 As shown, in order to solve the problem of the single-frame point cloud being too sparse when parsed from the rosbag data packets collected in real time from the actual field;
[0104] S3.1 can be achieved by integrating point clouds every T (20 in this paper) frames along the time axis t to synthesize a single point cloud PC. T Then, a unified processing method is used to make the point cloud that needs to be processed directly denser, i.e.: Figure 4 As shown, this is the train point cloud map after integration. Processing every 20 frames together will not have a significant impact on timeliness.
[0105] S3.2 Sort the z-coordinate values of the points in the point cloud Q from smallest to largest, and select the m points with the smallest z-coordinates to form a set A;
[0106] S3.3 Calculate the average z-coordinate of all points in set A.mean Then, in the point cloud Q, the values less than z mean All points at +d0 are extracted and fitted to form an initial planar point cloud Q. src Where d0 is a threshold value set according to the actual situation, and d0 is 0.1;
[0107] For the initial planar point cloud Q src Fitting the point cloud plane, first for the point cloud Q src Perform covariance calculation, i.e.:
[0108]
[0109] in, These are point cloud Q src The mean of the x, y, z coordinates; x i y i , z i Point cloud Q src The coordinates of any point x, y, z in the point cloud Q; N is the point cloud Q. src The total number of points;
[0110] Obtaining point cloud Q src The complete covariance matrix M is:
[0111]
[0112] 2-4) Perform SVD decomposition on the covariance matrix M to obtain the vector corresponding to the minimum singular value, which is the normal vector of the fitting plane, n = (a, b, c). T Then, the parameters a, b, and c are obtained;
[0113] 2-5) Transfer the point cloud Q src Mean values on the x, y, z axes Substituting X into formula (4) gives X = (x, y, z) T In the process, the fitting plane parameters d are obtained, and then the initial point cloud Q is obtained. src The fitting plane L;
[0114]
[0115] Where a, b, c, and d are planar parameters, and n = (a, b, c) T X = (x, y, z) T ;
[0116] 2-6) Calculate the distance d1 from a point in point cloud Q to the fitting plane L;
[0117] If d1 < dL, where dL is the maximum allowable value from a point in the point cloud to the fitted plane, then the point is a ground point; otherwise, if d1 ≥ dL, then the point is a non-ground point.
[0118] By traversing all points in the point cloud Q, we obtain the non-ground point cloud Q in the train point cloud Q. tar ;
[0119] 2-7) Obtain the maximum value z_max and minimum value z_min of the train point cloud along the Z-axis. Then, the Z-axis coordinates z_max of the center of all train carriages are obtained. tr The height of the train, Carriage_height, is as follows:
[0120]
[0121] In step S4, the 3D train point cloud processed as described above is mapped to the XY 2D plane, as shown in Figure 6. Figure 3 , Figure 4 , Figure 5 and Figure 6 The comparison clearly shows that the train point cloud processed using the above method is more complete and the train carriage outlines are more robust. At this point, the maximum value y_max and minimum value y_min on the Y-axis of the mapped point cloud plane can be directly calculated, thus determining the Y-axis coordinates of the centers of all train carriages. tr The width of the carriage, Carriage_width, can be calculated using the following formula:
[0122]
[0123] In S5-S10, the methods for rectangular rasterization of train planar point clouds and the methods for positioning and segmenting carriages are as follows:
[0124] S5.1 Divide the train planar point cloud processed by the above method into x_num(width×Δl) rectangular grids along the X-axis direction, as shown in Formula 6 and... Figure 7 .
[0125]
[0126] Where length is the maximum length of the planar train point cloud in the X-axis direction, x_num is the total number of grids in the planar train point cloud, and Δl is the length of each grid in the X-axis direction.
[0127] After partitioning, we get a one-dimensional array W = {w1, w2, w3, ..., w x_num};
[0128] Among them, w x_num For the point cloud within each grid cell;
[0129] S5.2 The resulting one-dimensional array W = {w1, w2, w3, ..., w...} is partitioned. x_numEach point in the cloud is classified into its own point cloud according to formula (7). ix In the train planar point cloud, each point has a unique w. ix ,Right now:
[0130] ix = (x i -x_min) / Δl (7)
[0131] Where, x i represents the x-axis coordinate value of each point in the train planar point cloud; x_min is the minimum coordinate value on the X-axis, and Δl is the length of each grid cell in the X-axis direction;
[0132] S5.3 Calculate w for each point cloud cluster sequentially. ix The point cloud line density, i.e.:
[0133] The total number of points in each point cloud cluster is divided by (the maximum Y-axis coordinate value of the point cloud cluster - the minimum Y-axis coordinate value of the point cloud cluster), yielding the set P = {P1, P2, P3, ..., P...}. x_num};
[0134] S5.4 Sort set P from largest to smallest and take out the first num points (num can be adjusted according to the size of the workshop, this paper takes 12), and find the point cloud cluster w corresponding to each of these num point cloud densities. ix The resulting num point cloud clusters are superimposed and visualized using Rviz, as shown below. Figure 8 As shown, complete the one-dimensional array W = {w1, w2, w3, ..., w...} x_num}
[0135] Because the point cloud of the metallic solid outline around the train carriage is denser than that of the ore under LiDAR scanning, and because the point cloud has undergone integration and accumulation processing along the time axis, the difference between the outline point cloud around the carriage and other point clouds becomes more obvious, i.e. Figure 7 As shown. The Y-axis coordinate of the carriage can be easily obtained above, so this paper will indirectly calculate the X-axis coordinate of the carriage by extracting the point cloud of the short side contour of the carriage.
[0136] Then, calculate the X-axis coordinates of the centroid of each point cloud cluster and form a set.
[0137] list_x = {x g1 ,x g2 ,x g3 ,....,x gnum}, sort the collection list_x in ascending order. For example... Figure 9 As shown, if the coordinates of the centroids of three consecutively adjacent point cloud clusters on the X-axis satisfy formula (8), then it can be determined according to:
[0138]
[0139] Among them, l1, l2, l3, and l4 are the approximate positional relationships between the centroids of three adjacent point cloud clusters (since there may be multiple types of train carriages, the values of l1, l2, l3, and l4 only need to be roughly determined by referring to the dimensions of several train carriages actually used in the workshop; in this paper, l1 = 1.5m, l2 = 0.6m, l3 = 15m, and l4 = 11m), used to filter out point cloud clusters that can be approximated as the short side of a train carriage.
[0140] The X-axis coordinate value of this carriage is x tr It can be obtained from formula (9).
[0141]
[0142] Where, x tr The center X-axis coordinate of the car is denoted as ; Carriage_length is the length of the car; Carriage_space is the gap between the two cars.
[0143] After iterating through all the values in the set list_x, we can calculate all the centroids in the point cloud of this frame that satisfy formula (8) after integration on the time axis, and finally calculate the X coordinate of the corresponding car center according to (9). At this point, we can automatically locate the center position (x) of each car from the received LiDAR data of the ore plant area. tr ,y tr ,z tr When the data collected by the lidar at a certain moment is good, the position of each carriage can be completely and continuously located using the method described in this paper (as shown in Figure 10(a), where the red cube is the visualized carriage marker).
[0144] When the lidar data scanned in the train area of the mineral aggregate plant is not good, the calculated carriage positioning result may be partially missing (as shown in Figure 10(b)). At this time, it is necessary to complete the missing part according to the positions of the carriages before and after the missing part that have been calculated under this frame of point cloud, that is, calculate the center distance m between the two carriages before and after the vacancy, and at the same time calculate that the center distance m is k times of train_lh (train_lh is the sum of the length of a single carriage and the gap length between two consecutive carriages calculated above). When k > 2, it can be determined that there is a missing carriage between the two carriages, and the number of missing carriages is k - 1. The X-axis coordinate of the center of the missing carriage can be obtained by adding i + 1 (i starts from 0 and increments by 1 each time, i < k - 1) train_lh to the X-axis coordinate value of the center of the carriage before the vacancy in turn, and finally complete the missing part of the carriage (as shown in Figure 10(c), where the higher carriages are the positions of the carriages that can be recognized initially, and the lower carriages are the ones completed at the missing positions later).
[0145] When the position of the missing part is in front of the located carriages, compare the maximum coordinate value x of the X-axis of the center position of the currently located carriages end and the maximum coordinate value x_max of the X-axis of the entire train carriage point cloud currently. If the formula (10) is satisfied, then on the basis of the maximum value x of the X-axis coordinate of the center of the located carriages end continue to complete m l carriages forward correspondingly, and the interval between the center positions of each carriage is train_lh;
[0146] x end +(m l ·train_lh) < x_max (10)
[0147] where, m l takes an integer greater than or equal to 0; train_lh = the length of a single carriage + the gap between every two carriages, m;
[0148] 5 - 4) When the position of the missing part is behind the located carriages, compare the minimum coordinate value x of the X-axis of the center position of the currently located carriages sta and the minimum coordinate value x_min of the X-axis of the entire current train point cloud. If the formula (11) is satisfied, then on the basis of the minimum value x of the X-axis coordinate of the center of the located carriages sta continue to complete r carriages backward correspondingly, and the interval between the center positions of each carriage is train_lh;
[0149] x sta-r·train_lh>x_min (11)
[0150] Where r takes an integer greater than or equal to 0; train_lh = length of a single carriage + gap between every two carriages, m;
[0151] After locating each car in the open wagon in the ore workshop, the actual train point cloud can be segmented based on the X-axis position of each car's center. Specifically, points in the actual train point cloud whose distance from the center of each car on the X-axis is less than or equal to half the length of a single car are grouped together. This completes the segmentation of the actual train point cloud into car sections. Figure 11 .
[0152] Therefore, the train carriage positioning and segmentation method proposed above can solve the adverse effects on carriage point cloud positioning and segmentation in the ore workshop caused by the large difference between the distance between the radar installation height and the train and the distance between the train carriages, resulting in overly dense point clouds between carriages, overly messy and sparse point clouds, changes in some train point clouds with the volume of ore in the carriages, the train moving forward after some carriages are loaded, and the fact that the type of train is not unique.
[0153] The embodiments described above are merely illustrative of specific implementations of the present invention, and while the descriptions are detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention.
Claims
1. A method for locating and segmenting train carriages based on point cloud voxel rectangular grids, characterized in that, Includes the following steps: 1) Install multiple calibrated multi-laser radars in the ore workshop as required, collect point clouds of the target ore plant area through the multi-laser radars, and extract the point clouds of the train carriages in the ore workshop; 2) Integrate and accumulate the train point cloud on the time axis t, remove the ground point cloud from the train car point cloud, and obtain the Z-axis coordinates of the center of all train cars; map and project the 3D train car point cloud after removing the ground onto the XY plane to obtain the planar point cloud of the train cars, and obtain the Y-axis coordinates of the center of all train cars. 3) Rasterize the planar point cloud of the train carriage into rectangles and obtain the line density of the point cloud in each rectangle. Select the n grids with the highest line density of the point cloud; obtain the centroid of the point cloud in each rectangle of the first n grids, and sort the X coordinate values of the selected centroids in ascending order to form a one-dimensional array W. Step 3) includes the following steps: 3-1) Divide the train planar point cloud into x_num rectangular grids along the X-axis, i.e.: Where length is the maximum length of the planar train point cloud in the X-axis direction, x_num is the total number of grids in the planar train point cloud, and Δl is the length of each grid in the X-axis direction. After partitioning, we get a one-dimensional array W = {w1, w2, w3, ..., w x_num }; Among them, w x_num For the point cloud within each grid cell; 3-2) The resulting one-dimensional array W = {w1, w2, w3, ..., w...} is partitioned. x_num Each point in the cloud is classified into its own point cloud according to formula (4). ix In the train planar point cloud, each point has a unique w. ix ,Right now: ix=(x i -x_min) / Δl(4) Where, x i represents the x-axis coordinate value of each point in the train planar point cloud; x_min is the minimum coordinate value on the X-axis, and Δl is the length of each grid cell in the X-axis direction; 3-3) Calculate w for each point cloud cluster sequentially. ix The point cloud line density, i.e.: The total number of points in each point cloud cluster is divided by (the maximum Y-axis coordinate value of the point cloud cluster - the minimum Y-axis coordinate value of the point cloud cluster), yielding the set P = {P1, P2, P3, ..., P...}. x_num }; 3-4) Sort the set P from largest to smallest and take out the first num points. Find the point cloud cluster w corresponding to each of these num point cloud densities. ix Complete the one-dimensional array W = {w1, w2, w3, ..., w x_num }; 4) Based on the specifications and dimensions of the train carriages in the mining area, restrict the X-coordinate values of every three centroids in the one-dimensional array W in step 3), obtain the X-coordinates of the three adjacent centroids that meet the requirements, and calculate the X-axis coordinate value of the train carriage, the length of the train carriage, and the distance between each train carriage. 5) Complete the point cloud data of other missing or unlocatable carriages based on the already located train carriages; 6) Based on the location of each carriage and the calculated length of each carriage, the initial 3D train point cloud is segmented.
2. The method for locating and segmenting train carriages based on point cloud voxel rectangular grids according to claim 1, characterized in that, Step 1) specifically refers to: 1-1) As required, multiple calibrated multi-laser radars are installed in the ore workshop, namely: Multiple lidar units are configured according to the actual direction of the train track, that is, the X-axis of the unified world coordinate system of multiple lidar units is parallel to the direction of the train track, and the Y-axis of the world coordinate system is perpendicular to the direction of the train track. 1-2) Radar point cloud acquisition is performed on the ore workshop. After obtaining the point cloud data of the ore workshop, the point cloud on the XYZ axis is truncated and the point cloud of the train carriage is extracted separately.
3. The method for locating and segmenting train carriages based on point cloud voxel rectangular grids according to claim 1, characterized in that, Step 2), obtaining the Z-axis coordinates of the centers of all train carriages, includes the following steps: 2-1) Integrate the point cloud every T frames along the time axis t to synthesize a single frame of point cloud PC. T To make the processed point cloud denser, for point cloud PC T Statistical filters are used to remove outliers, resulting in the point cloud Q. 2-2) Sort the z-coordinate values of the points in the point cloud Q in ascending order, and select the m points with the smallest z-coordinates to form a set A; 2-3) Calculate the average z-coordinate value of all points in set A. mean Then, in the point cloud Q, the values less than z mean All points at +d0 are extracted and fitted to form an initial planar point cloud Q. src Where d0 is a threshold value set according to the actual situation; For the initial planar point cloud Q src Fitting the point cloud plane, first for the point cloud Q src Perform covariance calculation to obtain the point cloud Q. src The complete covariance matrix M; 2-4) Perform SVD decomposition on the covariance matrix M to obtain the vector corresponding to the minimum singular value, which is the normal vector of the fitting plane, n = (a, b, c). T Then, the parameters a, b, and c are obtained; 2-5) Transfer the point cloud Q src Mean values on the x, y, z axes The fitting plane parameters d are obtained through fitting, and then the initial point cloud Q is obtained. src The fitting plane L; 2-6) Calculate the distance d1 from a point in point cloud Q to the fitting plane L; If d1 < dL, where dL is the maximum allowable value from a point in the point cloud to the fitted plane, then the point is a ground point; otherwise, if d1 ≥ dL, then the point is a non-ground point. By traversing all points in the point cloud Q, we obtain the non-ground point cloud Q in the train point cloud Q. tar ; 2-7) Obtain the maximum value z_max and minimum value z_min of the train point cloud along the Z-axis. Then, the Z-axis coordinates z_max of the center of all train carriages are obtained. tr The height of the train, Carriage_height, is as follows:
4. The method for locating and segmenting train carriages based on point cloud voxel rectangular grids according to claim 1, characterized in that, In step 2), obtaining the Y-axis coordinates of the centers of all train carriages specifically involves: The processed 3D train car point cloud is mapped to a 2D XY plane. The maximum value y_max and minimum value y_min on the Y-axis of the mapped point cloud plane are calculated. Then the Y-axis coordinates y_max and y_min of the centers of all train cars are obtained. tr And the width of the carriage, Carriage_width, that is:
5. The method for locating and segmenting train carriages based on point cloud voxel rectangular grids according to claim 1, characterized in that, In step 4), obtaining the length of the train carriages and the distance between each carriage is specifically as follows: Calculate the X-axis coordinates of the centroid of each point cloud cluster in the one-dimensional array W and form a set list_x = {x g1 ,x g2 ,x g3 ,....,x gnum Sort the collection list_x in ascending order; The centroid coordinates of three consecutively adjacent point cloud clusters on the X-axis are extracted to satisfy the following condition: Among them, l1, l2, l3, and l4 are the lengths of the dimensions that limit the positional relationship between the centroids of three adjacent point cloud clusters according to the actual size of the train carriage, which are used to filter out point cloud clusters that are regarded as the short side of the train carriage; The X-axis coordinate value of this carriage is x tr ,Right now: Where, x tr The center X-axis coordinate of the car is denoted as ; Carriage_length is the length of the car; Carriage_space is the gap between the two cars. After iterating through all the values in the set list_x, calculate all the centroids that satisfy formula (5), and calculate the X coordinate of the corresponding carriage center according to formula (6); The center position (x) of each car located by the received lidar data from the ore plant area. tr ,y tr ,z tr When the number of point clouds in the data collected by the lidar at a certain moment reaches a threshold, the position of each carriage is located.
6. The method for locating and segmenting train carriages based on point cloud voxel rectangular grids according to claim 1, characterized in that, Step 5) specifically involves: 5-1) Calculate the center distance m between two carriages in front and behind where there is a gap in the point cloud. At the same time, calculate that the center distance m is k times train_lh, where train_lh is the sum of the length of a single carriage and the gap length between two consecutive carriages. 5-2) When k>2, it can be determined that there is a missing car between the two carriages, and the number of missing cars is k-1. The X-axis coordinate of the center of the missing car is obtained by adding i+1 train_lh values to the X-axis coordinate of the center of the car preceding the missing car. <k-1; 5-3) When the missing part is located in front of the already located carriage, compare the maximum X-axis coordinate value of the center position of the currently located carriage with the value of the missing part. end Given the maximum coordinate value x_max on the X-axis of the current point cloud of the entire train carriage, if it satisfies formula (7), then the maximum X-axis coordinate value x_max at the center of the located carriage is... end Based on the current position, continue to fill in the corresponding m forward. l There are 10 carriages, and the center of each carriage is spaced apart by train_lh. x end +(m l ·train_lh)<x_max(7) Where, m l Take an integer greater than or equal to 0; train_lh = length of a single carriage + gap between every two carriages, in meters; 5-4) When the missing part is located behind the already located carriage, compare the minimum X-axis coordinate value of the center position of the currently located carriage with that of the missing part. sta Given the minimum coordinate value x_min on the X-axis of the entire train point cloud, if it satisfies formula (8), then the minimum X-axis coordinate value x_min at the center of the located carriage is... sta Based on the current position, add r more carriages to the rear, with a spacing of train_lh between the center positions of each carriage; x sta -r·train_lh>x_min(8) Where r takes an integer greater than or equal to 0; train_lh = length of a single carriage + gap between every two carriages, m; 5-5) Repeat steps 5-1) to 5-4) to complete all the missing parts of the carriages.
7. The method for locating and segmenting train carriages based on point cloud voxel rectangular grids according to claim 1, characterized in that, Step 6) specifically refers to: After locating each carriage of the train in the ore workshop, the actual point cloud of the carriages is segmented based on the position of the center of each carriage on the X-axis, i.e.: The point cloud of the actual train is segmented and clustered if the distance from the center position of each carriage on the X-axis is less than or equal to half the length of a single carriage, so as to achieve the segmentation of the carriages.
Citation Information
Patent Citations
Compartment positioning method, device and system, and computer readable storage medium
CN112432647A
Open wagon carriage state detection device and method
CN112731441A