Train recognition method and device based on point cloud data, equipment and readable storage medium
By constructing a ground point cloud segmentation model and adaptive neighborhood radius clustering, combined with train size screening, the accuracy problem of train identification and alignment in railway freight automation was solved, and accurate identification of train position was achieved.
Patent Information
- Application Number
- CN202611085571.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-11-03
AI Technical Summary
In existing technologies, the ability to accurately identify and align trains in railway freight automation is limited, mainly because ground point clouds and non-train object point clouds are mixed, and point clouds in the connecting areas of multiple train cars are stuck together, making it difficult for conventional clustering methods to effectively segment them, resulting in low identification accuracy.
By constructing a ground point cloud segmentation model to filter ground point cloud data, using adaptive neighborhood radius for clustering, and combining preset train size for filtering, the train location is identified.
It improves the accuracy and reliability of train identification, ensuring that the identification result is an individual train, and enhances the identification and alignment capabilities of automated equipment.
Smart Images

Figure CN123033015A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of railway freight automation, and specifically to a train identification method, apparatus, equipment, and readable storage medium based on point cloud data. Background Technology
[0002] In the field of railway freight automation, such as automated loading, unloading and vehicle positioning systems, it is necessary to accurately identify trains in order to complete tasks such as precise alignment.
[0003] In related technologies, the received raw point cloud data is typically clustered and segmented directly to extract the target object. However, in actual railway stations, ground point clouds and point cloud information of non-train objects are mixed in with the target train point cloud, significantly increasing the difficulty of clustering and segmentation. Furthermore, multiple train cars are tightly connected by connecting devices, causing the point clouds in the connecting areas to stick together. Conventional clustering methods using fixed thresholds struggle to simultaneously address multiple requirements such as ground filtering, interference removal, and correct disconnection at the sticking points, resulting in low accuracy of the segmentation results.
[0004] The low accuracy of the segmentation results makes it impossible to uniquely determine the position of the target train based on the spatial arrangement of the segmentation results, which restricts the ability of automated equipment to accurately identify and align the target train. Summary of the Invention
[0005] In view of this, the present invention aims to provide a train identification method, apparatus, device and readable storage medium based on point cloud data, so as to solve the technical problem that the accurate identification and positioning capability of target trains is limited in the prior art.
[0006] This invention provides a train recognition method based on point cloud data, the method comprising: Receive point cloud data sent by radar; A ground point cloud segmentation model is constructed, and ground point cloud data in the point cloud data is filtered out based on the ground point cloud segmentation model to obtain non-ground point cloud data. The non-ground point cloud data is clustered based on an adaptive neighborhood radius to obtain a set of clusters. Based on the cluster set and the preset train size, the target cluster set is obtained; Based on the target cluster set, the position value of the train is identified.
[0007] In one possible embodiment, constructing a ground point cloud segmentation model and filtering ground point cloud data from the point cloud data based on the ground point cloud segmentation model includes: Equations for constructing a ground point cloud segmentation model based on planar normal vectors; The RANSAC algorithm based on a plane model is used to iteratively solve the parameters of the equation using maximum likelihood estimation. Based on the parameters, points with a distance less than the first threshold are identified as ground points and filtered out to obtain the non-ground point cloud data.
[0008] In one possible embodiment, obtaining the target cluster set based on the cluster set and the preset train size includes: Calculate the length, width, and height of the 3D bounding box for each cluster; Based on the preset train dimensions and the length, width, and height of the three-dimensional bounding box of each cluster, the differences in length, width, and height are calculated. Based on the difference, the target cluster set is obtained.
[0009] In one possible embodiment, the adaptive neighborhood radius is dynamically determined based on the local density ρ of the point cloud data, and the formula for calculating the adaptive neighborhood radius is: , where r cluster Let r be the adaptive neighborhood radius. min r is the preset lower limit of the radius. max ρ is the preset upper limit of radius, k is the scaling factor, and ρ is the local density of the point cloud data.
[0010] In one possible embodiment, identifying the train's location value based on the target cluster set includes: Calculate the positional representation value of each target cluster in the target cluster set, perpendicular to the direction of carriage arrangement; The position representative values are sorted, and the target cluster corresponding to the position representative value at the middle position is determined as the middle train, and the position value of the middle train is obtained.
[0011] In one possible embodiment, the position representation value is the projected coordinate of the centroid of each target cluster on the Y-axis in the lidar coordinate system; the lidar coordinate system takes the installation position of the lidar as the origin, the X-axis is along the direction of the railway track, the Y-axis is perpendicular to the direction of the track, and the Z-axis is vertically upward.
[0012] In one possible embodiment, prior to constructing the ground point cloud segmentation model, the method further includes: Statistical filtering is performed on the point cloud data to remove outlier noise points.
[0013] Secondly, the present invention provides a train recognition device based on point cloud data. Thirdly, the present invention provides a control device, the device comprising: a memory and a processor; the memory being used to store relevant program code; the processor being used to call the program code to execute the train recognition method based on point cloud data as described in any of the implementations of the first aspect.
[0014] Fourthly, the present invention provides a computer-readable storage medium for storing a computer program for executing the train recognition method based on point cloud data as described in any implementation of the first aspect above.
[0015] Fifthly, the present invention provides a computer program product, the computer program product comprising a computer program / instruction, which, when executed by a processor, implements the train recognition method based on point cloud data as described in any of the implementations of the first aspect.
[0016] In the above implementation of the present invention, point cloud data transmitted by radar is received; a ground point cloud segmentation model is constructed; and ground point cloud data in the point cloud data is filtered based on the ground point cloud segmentation model to obtain non-ground point cloud data. By pre-constructing the ground point cloud segmentation model and filtering out ground point cloud data, the interference of large-area ground feature point clouds such as railway track bed and ballast on clustering and size calculation is eliminated, avoiding the incorrect clustering of ground points into train point cloud clusters. The non-ground point cloud data is clustered based on an adaptive neighborhood radius to obtain a set of clusters. By using an adaptive neighborhood radius for clustering, the inherent inability of traditional fixed threshold clustering to adapt to uneven point cloud density is overcome. The adaptive radius can automatically adopt a smaller neighborhood radius in areas of adhesion such as couplers and buffers, thereby effectively breaking the point cloud adhesion between different carriages and improving the accuracy of clustering. Based on the set of clusters and the preset train size, a target cluster set is obtained; and based on the target cluster set, the position value of the train is identified. Meanwhile, by combining the preset nominal size of the train to filter the clusters, false targets that do not match the geometric features of the train can be accurately eliminated, ensuring that the final set of target clusters participating in the location identification is the individual train, thereby significantly improving the reliability of the identification results. Attached Figure Description
[0017] Figure 1 A flowchart of a train recognition method based on point cloud data provided in an embodiment of the present invention.
[0018] Figure 2 This is a schematic diagram of a train to be identified, provided as an embodiment of the present invention.
[0019] Figure 3 This is a flowchart of step S102 provided in an embodiment of the present invention.
[0020] Figure 4 This is a flowchart of step S104 provided in an embodiment of the present invention.
[0021] Figure 5 This is a schematic diagram of a control device provided in an embodiment of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] In the field of railway freight automation, such as automated loading, unloading and vehicle positioning systems, it is necessary to accurately identify trains in order to complete tasks such as precise alignment.
[0024] In related technologies, the received raw point cloud data is typically clustered and segmented directly to extract the target object. However, in actual railway stations, ground point clouds and point cloud information of non-train objects are mixed in with the target train point cloud, significantly increasing the difficulty of clustering and segmentation. Furthermore, multiple train cars are tightly connected by connecting devices, causing the point clouds in the connecting areas to stick together. Conventional clustering methods using fixed thresholds struggle to simultaneously address multiple requirements such as ground filtering, interference removal, and correct disconnection at the sticking points, resulting in low accuracy of the segmentation results.
[0025] The low accuracy of the segmentation results makes it impossible to uniquely determine the position of the target train based on the spatial arrangement of the segmentation results, which restricts the ability of automated equipment to accurately identify and align the target train.
[0026] To address this, the present invention receives point cloud data transmitted by radar; constructs a ground point cloud segmentation model; and filters ground point cloud data from the point cloud data based on the ground point cloud segmentation model to obtain non-ground point cloud data. By pre-constructing the ground point cloud segmentation model and filtering out ground point cloud data, the interference of large-area ground feature point clouds such as railway track bed and ballast on clustering and size calculation is eliminated, preventing ground points from being incorrectly clustered into train point cloud clusters. The non-ground point cloud data is clustered based on an adaptive neighborhood radius to obtain a set of clusters. By using an adaptive neighborhood radius for clustering, the inherent inability of traditional fixed-threshold clustering to adapt to uneven point cloud density is overcome. The adaptive radius can automatically adopt a smaller neighborhood radius in areas of adhesion such as couplers and buffers, thereby effectively breaking the point cloud adhesion between different carriages and improving the accuracy of clustering. Based on the set of clusters and a preset train size, a target cluster set is obtained; and based on the target cluster set, the train's position value is identified. Meanwhile, by combining the preset nominal size of the train to filter the clusters, false targets that do not match the geometric features of the train can be accurately eliminated, ensuring that the final set of target clusters participating in the location identification is the individual train, thereby significantly improving the reliability of the identification results.
[0027] Before providing a detailed description of the embodiments of the present invention in this embodiment, a brief description of one implementation environment of the present invention will be given first.
[0028] The train identification system can be deployed within the operational area of a railway station and mainly consists of a lidar system and control equipment. The lidar is mounted on a fixed bracket on one side of the operational area, and its scanning field covers the scene in front of the parked train cars on the tracks, capable of completely scanning at least three open wagons coupled side-by-side. The control equipment is connected to the lidar via a wired communication link, receiving the 3D point cloud data output by the lidar and processing the point cloud data to identify the train.
[0029] In terms of coordinate system setup, the installation location of the lidar is used as the origin. The X-axis extends along the railway track, the Y-axis is perpendicular to the track and lies in the horizontal plane, and the Z-axis is vertically upward. Multiple open wagons parked on the track are arranged sequentially along the X-axis, and the wagons are connected by couplers and buffers to form the target scene to be identified.
[0030] In the data flow direction, the lidar periodically scans the scene ahead according to a set scanning frequency, transmitting the collected raw point cloud data to the control equipment in the form of data frames. The control equipment sequentially performs operations such as filtering, ground separation, clustering, target filtering, and position determination on the received point cloud data to obtain the train's point cloud data and its position information. The position information includes the train's three-dimensional coordinates in the radar coordinate system and its attitude angles in the roll, pitch, and yaw directions. The position information can serve as the input basis for subsequent control processes such as automated loading and unloading and alignment operations.
[0031] The above system constitutes the operating platform for the method of the present invention, and the specific point cloud processing flow will be described in detail below with reference to the accompanying drawings.
[0032] Figure 1 The diagram shown is a schematic flowchart of a train recognition method based on point cloud data according to an embodiment of the present invention. The method is executed by the aforementioned control device and includes the following steps: Step S101: Receive point cloud data sent by the radar.
[0033] In this embodiment, the control device is connected to a lidar mounted on a fixed bracket on one side of the work area via a wired communication link, and receives 3D point cloud data output by the lidar periodically scanning the scene in front according to a set scanning frequency. The point cloud data can be represented as a set of points: , where each point p i It carries the three-dimensional spatial coordinate information of the point in the lidar coordinate system. In some embodiments, such as Figure 2 As shown, the foreground scene includes at least three open train wagons coupled side-by-side. As a specific implementation, the lidar can be a mechanically rotating multi-line lidar, or a solid-state lidar, MEMS lidar, or semi-solid-state lidar, as long as it can output point cloud data reflecting the three-dimensional geometric shape of the foreground scene. The communication link between the control device and the lidar can, but is not limited to, industrial Ethernet, CAN bus, or dedicated fiber optic link. In this invention, point cloud data refers to data describing the spatial geometry of the measured scene in the form of a discrete three-dimensional coordinate point set. It may contain only coordinate information, or it may further include additional attributes such as reflection intensity, echo count, and timestamp.
[0034] In one embodiment, to further improve the quality of the input data for the ground point cloud segmentation model, after receiving the point cloud data, the method may further include: Statistical filtering is performed on the point cloud data to remove outlier noise points.
[0035] In practical implementation, the air in actual railway station operations often contains suspended particulate matter such as dust, water mist, and rain / snow particles. During LiDAR scanning, the diffuse reflection of these particles generates a certain number of outlier noise points in the point cloud data. If these noise points are not processed, they may affect the accuracy of interior point statistics in the subsequent RANSAC ground fitting stage, or form false connectivity bridges in the adaptive clustering stage, thus reducing the overall segmentation accuracy. Therefore, statistical filtering is performed on the point cloud data. This statistical filtering can determine outliers for each point based on the statistical distribution of neighborhood distances: for each point in the original point cloud, first, its K nearest neighbors are queried within its neighborhood, and the mean distance from the point to these K nearest neighbors is calculated; then, based on the mean neighborhood distances of all points, an overall mean μ and standard deviation σ are constructed. Points whose mean neighborhood distance exceeds the range of μ ± α·σ are identified as outliers and removed, where α is a configurable standard deviation multiplier, for example, a value between 1.0 and 3.0, and K can be an integer between 10 and 50. As an alternative, outlier removal can also employ radius-based filtering. This involves counting the number of points in the neighborhood of each point, with a set radius as the center, and removing points whose neighborhood count is below a set threshold. Alternatively, voxel-based filtering can be used to downsample and denoise the point cloud. By inserting a statistical filtering step at the beginning of the process, higher-quality point cloud data can be provided for subsequent steps such as ground point cloud segmentation, adaptive clustering, and size selection.
[0036] Step S102: Construct a ground point cloud segmentation model, and filter the ground point cloud data in the point cloud data based on the ground point cloud segmentation model to obtain non-ground point cloud data.
[0037] In this embodiment, considering that the railway track bed is generally flat but may have minor undulations caused by ballast, a ground point cloud segmentation model based on a planar model can be constructed. Points belonging to the track subgrade and ground area in the point cloud data are identified as ground points and removed, while the point cloud data of vehicles and other non-ground targets suspended above the ground are retained for subsequent processing. The ground point cloud segmentation model can be based on planar equations. To build, where Let n be the plane normal vector, |n| = 1, and d be the distance from the origin to this plane. By solving for the parameters (n, d) of this equation, the plane that best fits the actual ground can be determined. Then, using this plane as a reference, ground points can be separated from the original point cloud. This method effectively reduces the number of interfering points in subsequent clustering stages and avoids missegmentation caused by the adhesion of ground point clouds to the vehicle bottom point cloud.
[0038] As one specific implementation method, see Figure 3The construction of the ground point cloud segmentation model, and the filtering of ground point cloud data in the point cloud data based on the ground point cloud segmentation model, includes: S1021, Equations for constructing a ground point cloud segmentation model based on planar normal vectors; S1022, The RANSAC algorithm based on the plane model is used to iteratively solve the parameters of the equation using the maximum likelihood estimation method; S1023, Based on the parameters, points with a distance less than the first threshold are identified as ground points and filtered out to obtain the non-ground point cloud data.
[0039] Specifically, the ground plane is expressed as In the form of, Let be the plane normal vector, satisfying the normalization constraint ‖n‖=1, and d be the directed distance from the origin of the lidar coordinate system to this plane. This equation can completely characterize any candidate plane in three-dimensional space with three independent parameters, facilitating subsequent iterative fitting using these three parameters as the unknowns.
[0040] In each iteration, a number of points are randomly selected from the original point cloud as a minimum sample set, which is used to fit a candidate plane. And count the distances from the point cloud data to the candidate plane, which do not exceed a set threshold τ. plane The number of points is taken as the number of interior points of the candidate plane. Using the indicator function I(·) to count the points that satisfy the interior point condition, the objective function can be expressed as: That is, the plane parameters that maximize the number of interior points are selected as the optimal parameters. In the maximum likelihood sense, this objective function is equivalent to the maximum likelihood estimation of the plane parameters, assuming that the interior points follow a zero-mean Gaussian distribution and the exterior points follow a uniform distribution. This makes the fitting process for the ground plane robust to a small number of non-ground points and noise points. As an alternative, parameter solving can also employ least squares fitting, weighted least squares fitting, or robust fitting based on M-estimation, all of which can achieve stable estimation of the ground plane parameters.
[0041] To obtain the optimal parameters Then, iterate through each point p in the original point cloud data. i Calculate its distance to the optimal ground plane. If the distance is less than the first threshold, i.e., τ plane If so, then the point is determined to be a ground point and added to the ground point set P. ground The data is filtered out from the original point cloud data; conversely, it is retained in the non-ground point cloud. The first threshold is used as input for subsequent clustering and segmentation. It can be selected within a range of several centimeters based on factors such as the ranging accuracy of the lidar, the smoothness of the track bed, and the particle size of the ballast. For example, it can be 0.05 meters, 0.10 meters, or 0.15 meters. By adopting this method, ground point clouds can be removed while retaining the point clouds of vehicles and other measured targets. This significantly reduces the point cloud size and computational burden in subsequent clustering stages and avoids segmentation failures caused by the adhesion of ground points to the point cloud at the bottom of the vehicle.
[0042] Step S103: Cluster the non-ground point cloud data based on the adaptive neighborhood radius to obtain a set of clusters.
[0043] In this embodiment, for the non-ground point cloud P obj Spatial index structures such as KD-Tree are constructed to accelerate neighborhood retrieval. Specifically, this embodiment uses an adaptive neighborhood radius that dynamically changes with the local distribution characteristics of the point cloud for clustering. Specifically, for any two points in a non-ground point cloud... If its Euclidean distance If the radius of a point is smaller than the current adaptive neighborhood radius, both points are considered to be in the same connected component. After traversing all non-ground points using the connected component labeling algorithm, a cluster set can be generated. Each cluster represents a candidate independent object point cloud. The adaptive neighborhood radius refers to the distance metric parameter used in the segmentation process that dynamically changes with the distribution characteristics of the point cloud. It can be determined by local density, or by other quantities reflecting the distribution characteristics of the point cloud, such as local curvature, normal consistency, or distance from the radar. As long as it can achieve the function of tightening the segmentation boundary in the contiguous region and widening the segmentation boundary in the sparse region, it is acceptable.
[0044] In one specific embodiment, the adaptive neighborhood radius is dynamically determined based on the local density ρ of the point cloud data, and the calculation formula for the adaptive neighborhood radius is: , where r cluster Let r be the adaptive neighborhood radius. min r is the preset lower limit of the radius. max ρ is the preset upper limit of radius, k is the scaling factor, and ρ is the local density of the point cloud data.
[0045] In this embodiment, the formula for calculating the adaptive neighborhood radius is: , where r cluster Let r be the adaptive neighborhood radius. min r is the preset lower limit of the radius. max Here, k is a preset upper limit for the radius, k is a scaling factor, and ρ is the local density of the point cloud data. The physical dimension of the local density ρ of the point cloud is the cube root of its reciprocal, which represents the number of points per unit volume. In terms of dimensions, it is exactly length, reflecting the average distance between adjacent points within that local region. This is especially relevant when the local density of the point cloud is high, such as in the adhesion area near the radar and located at the junction of the carriages. Smaller values result in a tighter clustering neighborhood radius, which helps to forcibly separate the sticky point clouds of adjacent open wagons at the coupling point; when the local density of the point cloud is low, such as in sparse areas far from the radar, A larger value allows for a wider clustering neighborhood radius, preventing sparse point clouds belonging to the same open vehicle from being over-segmented into multiple fragmented clusters. The scaling factor k is used to map the average spacing to a suitable clustering radius, which can be determined through calibration based on the lidar angular resolution and operating distance range; for example, it can be selected within the range of 1.5 to 3.0. min To prevent over-segmentation due to excessively small radii in extremely dense regions, it can take values on the order of several centimeters, for example, 0.05 meters to 0.15 meters; r max To prevent undersegmentation due to excessively large radii in extremely sparse regions, the local density ρ can be on the order of tens of centimeters, for example, 0.30 meters to 0.80 meters. The local density ρ can be estimated by counting the number of points in a sphere's neighborhood centered on the point to be processed and dividing by the sphere's volume, or by using a KD-Tree query to find the K nearest neighbors and estimating the density using the cube of the distance to the K nearest neighbor. By employing the aforementioned adaptive neighborhood radius based on local density, the conflicting needs of cohesive segmentation and sparse aggregation can be addressed simultaneously during clustering, thereby further improving segmentation accuracy in scenarios with multiple open wagons coupled side-by-side. Furthermore, the proportionality coefficient k and its upper and lower limits r... min r max The values are not limited to the specific values mentioned above and can be adjusted according to the actual radar model, installation height, and vehicle parking distance range.
[0046] Step S104: Obtain the target cluster set based on the cluster set and the preset train size.
[0047] In this embodiment, after obtaining the cluster set C, shape features are extracted and filtered for each cluster. Interfering clusters such as roadside equipment, guardrails, and stockpiled materials that may be mixed in with the cluster set can be eliminated using the prior knowledge of the known geometric dimensions of the open wagon model. The nominal dimensions of a standard open wagon are pre-stored in the control device: length L0, width W0, and height H0. The three-dimensional bounding box dimensions of each cluster are compared with these nominal dimensions, and only clusters whose dimensions fall within the preset range are retained as open wagon candidates, forming the target cluster set. In this embodiment, n is typically 3, meaning the target cluster set contains point cloud clusters corresponding to three side-by-side open train wagons.
[0048] In one embodiment, see Figure 4 The step of obtaining the target cluster set based on the cluster set and the preset train size specifically includes: S1041, calculate the length, width, and height of the 3D bounding box for each cluster; S1042, based on the preset train size and the length, width and height of the three-dimensional bounding box of each cluster, calculate the difference between the length, width and height; S1043, Based on the difference, obtain the target cluster set.
[0049] For each cluster C in the set of clusters C, sub-pairs j Iterate through the three-dimensional coordinates of all points in the cluster, and take the extreme differences of these points along the X, Y, and Z axes as the length L of the cluster. j Width W j and high H j A 3D bounding box can be either an axis-aligned bounding box or an oriented bounding box. The axis-aligned bounding box implementation has lower computational complexity for length, width, and height, making it suitable for applications with high real-time requirements. The oriented bounding box implementation uses principal component analysis to first determine the principal direction of the cluster, then calculates the dimensions along that direction, which more accurately reflects the true geometric dimensions of the open vehicle under non-ideal conditions such as angled parking.
[0050] Based on the preset train dimensions and the length, width, and height of the three-dimensional bounding box of each cluster, the differences in length, width, and height are calculated. Specifically, the nominal dimensions of a standard open wagon are read, i.e., length L0, width W0, and height H0, and for each cluster C... j Calculate |L separately j -L0|、|W j -W0|、|H j -H0| Three differences are used to characterize the degree of deviation between the cluster size and the nominal open wagon size.
[0051] The three differences mentioned above are respectively compared with the preset tolerance threshold δ. L δ W δ H A comparison is made only if |L| is satisfied simultaneously. j -L0|≤δ L |W j -W0|≤δ W 、|H j -H0|≤δ H Under three constraints, include the cluster in the target cluster set C. car That is, the eigenvector constraint Ω can be expressed as: The tolerance threshold can be determined comprehensively based on vehicle model tolerance, point cloud sampling density, and the inherent error of the bounding box calculation method, for example, δ L The value can be 0.3 meters to 1.0 meters, δ W The value can be 0.1 m to 0.3 m, δ H The acceptable value is 0.1 meters to 0.3 meters. By adopting a screening method based on size difference, interference clusters formed by roadside facilities, material piles, pedestrians, or partially damaged targets in the clustering results can be effectively eliminated, providing reliable open wagon candidates for subsequent target determination.
[0052] Step S105: Based on the target cluster set, identify the position value of the train.
[0053] In this embodiment, in the target cluster set C car Based on this, the target train to be identified is further determined, such as the open wagon in the middle position, and the position value of the target open wagon is output. The position value may include the three-dimensional coordinates (x, y, z) of the target open wagon in the lidar coordinate system, and may further include the attitude angles in the roll, pitch, and yaw directions, thus forming six-degree-of-freedom pose information. After obtaining the position value, it can be used to coordinate on-site actuators such as loading machines, unloading machines, and reach stackers to complete subsequent operations such as alignment and loading / unloading. As a specific implementation method, the position value of the train can be identified by geometrically sorting the spatial arrangement of each cluster in the target cluster set, or by applying mathematical criteria to the centroid coordinates of the target cluster. Using this method, even if there is a certain symmetry error between the open wagons at both ends relative to the radar, the individual open wagon to be identified can still be locked.
[0054] In one embodiment, identifying the train's location value based on the target cluster set specifically includes: Calculate the positional representation value of each target cluster in the target cluster set, perpendicular to the direction of carriage arrangement; The position representative values are sorted, and the target cluster corresponding to the position representative value at the middle position is determined as the middle train, and the position value of the middle train is obtained.
[0055] Specifically, for the target cluster set C car Each cluster in Calculate the representative position value of the cluster in the lateral direction perpendicular to the length of the carriage. The representative position value can be the projected coordinates of the centroid of the cluster on the lateral coordinate axis, the projected coordinates of the center of the three-dimensional bounding box of the cluster on the lateral coordinate axis, or the coordinates of the midpoint of the projection interval of the cluster on the lateral coordinate axis, as long as it can represent the overall spatial position of the cluster in the lateral direction.
[0056] The calculated positional values are sorted in non-decreasing order to obtain an ordered sequence: ,in, When n is odd, it is in the middle position, i.e., the sorting index is... The cluster corresponding to the position value at that location is determined to be the intermediate train C. mid The system further outputs complete point cloud data and position values of the middle train. These position values can include the three-dimensional coordinates (x, y, z) of the middle train in the lidar coordinate system, as well as its attitude angles in the roll, pitch, and yaw directions. This ensures that the determination of the middle open wagon is based on its geometric positional relationship in the lateral arrangement direction, unaffected by minor dimensional differences or symmetry errors in the vehicles at both ends. As an alternative, when n is even, the cluster corresponding to either of the two representative position values in the middle can be identified as the middle train, or the cluster closer or farther from the radar can be identified as the middle train. Specific rules can be pre-agreed upon according to the needs of on-site operations. Through the above methods, this solution can locate the middle open wagon in complex scenarios, improving the reliability of identification in automated railway operations.
[0057] In one embodiment, the position representation value is the projected coordinate of the centroid of each target cluster on the Y-axis in the lidar coordinate system; the lidar coordinate system takes the installation position of the lidar as the origin, the X-axis is along the railway track direction, the Y-axis is perpendicular to the track direction, and the Z-axis is vertically upward.
[0058] In this scheme, the coordinate system of the lidar is consistent with the coordinate system setting in the aforementioned implementation environment. Specifically, the origin O is located at the lidar installation position, the X-axis extends along the railway track (i.e., the length direction of the open wagons), the Y-axis is perpendicular to the track direction in the horizontal plane (i.e., the lateral arrangement direction of the open wagons), and the Z-axis is vertically upward. This coordinate system setting allows multiple open wagons, coupled side-by-side, to be arranged sequentially along the X-axis, while the spatial differences between the wagons in the direction perpendicular to their arrangement are reflected on the Y-axis coordinate. For the selected cluster of n open wagon targets… The projected coordinates of its centroid on the Y-axis The calculation can be performed using the following formula: Where y(p) is the y-axis coordinate of point p within the cluster, | | represents the number of points within the cluster. Let n be the number of points within the cluster. Substituting the values into the aforementioned sorting process yields an ordered sequence, which can then be used to uniquely identify the middle open wagon based on the median criterion. This ensures that the positional representation values align with the geometric relationship between railway tracks and vehicles, avoiding the problem of recognition failure caused by inconsistencies between the lateral sorting direction in the universal coordinate system and the actual carriage arrangement direction. As an alternative, the positional representation values can also be the median, weighted average, or the Y-coordinate of the bounding box center of all points within the cluster.
[0059] Based on the method provided in the above embodiments, point cloud data transmitted by radar is received; a ground point cloud segmentation model is constructed; ground point cloud data in the point cloud data is filtered based on the ground point cloud segmentation model to obtain non-ground point cloud data. By pre-constructing the ground point cloud segmentation model and filtering out ground point cloud data, the interference of large-area ground feature point clouds such as railway track bed and ballast on clustering and size calculation is eliminated, avoiding the incorrect clustering of ground points into train point cloud clusters. The non-ground point cloud data is clustered based on an adaptive neighborhood radius to obtain a set of clusters. By using an adaptive neighborhood radius for clustering, the inherent inability of traditional fixed threshold clustering to adapt to uneven point cloud density is overcome. The adaptive radius can automatically adopt a smaller neighborhood radius in areas of adhesion such as couplers and buffers, thereby effectively breaking the adhesion of point clouds between different carriages and improving the accuracy of clustering; a target cluster set is obtained according to the set of clusters and a preset train size; and the position value of the train is identified based on the target cluster set. Meanwhile, by combining the preset nominal size of the train to filter the clusters, false targets that do not match the geometric features of the train can be accurately eliminated, ensuring that the final set of target clusters participating in the location identification is the individual train, thereby significantly improving the reliability of the identification results.
[0060] Based on the above method embodiments, this invention also provides a train recognition device based on point cloud data. The device includes a control device, which is used for: Receive point cloud data sent by radar; A ground point cloud segmentation model is constructed, and ground point cloud data in the point cloud data is filtered out based on the ground point cloud segmentation model to obtain non-ground point cloud data. The non-ground point cloud data is clustered based on an adaptive neighborhood radius to obtain a set of clusters. Based on the cluster set and the preset train size, the target cluster set is obtained; Based on the target cluster set, the position value of the train is identified.
[0061] In one possible implementation, constructing a ground point cloud segmentation model and filtering ground point cloud data from the point cloud data based on the ground point cloud segmentation model includes: Equations for constructing a ground point cloud segmentation model based on planar normal vectors; The RANSAC algorithm based on a plane model is used to iteratively solve the parameters of the equation using maximum likelihood estimation. Based on the parameters, points with a distance less than the first threshold are identified as ground points and filtered out to obtain the non-ground point cloud data.
[0062] In one possible implementation, obtaining the target cluster set based on the cluster set and the preset train size includes: Calculate the length, width, and height of the 3D bounding box for each cluster; Based on the preset train dimensions and the length, width, and height of the three-dimensional bounding box of each cluster, the differences in length, width, and height are calculated. Based on the difference, the target cluster set is obtained.
[0063] In one possible implementation, the adaptive neighborhood radius is dynamically determined based on the local density ρ of the point cloud data, and the formula for calculating the adaptive neighborhood radius is: , where r cluster Let r be the adaptive neighborhood radius. min r is the preset lower limit of the radius. max ρ is the preset upper limit of radius, k is the scaling factor, and ρ is the local density of the point cloud data.
[0064] In one possible implementation, identifying the train's position value based on the target cluster set includes: Calculate the positional representation value of each target cluster in the target cluster set, perpendicular to the direction of carriage arrangement; The position representative values are sorted, and the target cluster corresponding to the position representative value at the middle position is determined as the middle train, and the position value of the middle train is obtained.
[0065] In one possible implementation, the position representation value is the projected coordinate of the centroid of each target cluster on the Y-axis in the lidar coordinate system; the lidar coordinate system takes the installation position of the lidar as the origin, the X-axis is along the railway track direction, the Y-axis is perpendicular to the track direction, and the Z-axis is vertically upward.
[0066] In one possible implementation, prior to constructing the ground point cloud segmentation model, the method further includes: Statistical filtering is performed on the point cloud data to remove outlier noise points.
[0067] See Figure 5 , Figure 5 This is a schematic diagram of a control device provided in an embodiment of the present invention.
[0068] The control device 500 includes a memory 501 and a processor 502; the memory 501 is used to store relevant program code; the processor 502 is used to call the program code to execute the train recognition method based on point cloud data described in the above method embodiment.
[0069] Furthermore, embodiments of the present invention also provide a computer-readable storage medium for storing a computer program for executing the train recognition method based on point cloud data described in the above method embodiments.
[0070] This invention also provides a computer program product, which includes a computer program / instruction. When the computer program / instruction is executed by a processor, it implements the train recognition method based on point cloud data described in the above method embodiments.
[0071] It should be noted that the computer-readable medium described above in this invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0072] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of the present invention. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0073] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. In particular, for system or device embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The device embodiments described above are merely illustrative. The units or modules described as separate components may or may not be physically separate. The components shown as units or modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the units or modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0074] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functions, and operations that may be implemented according to various embodiments of the invention, including methods, apparatus, and devices. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0075] It should be understood that in this invention, "at least one (item)" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0076] It should also be noted that, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0077] The steps of the methods or algorithms described in conjunction with the embodiments disclosed in this invention can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0078] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A train recognition method based on point cloud data, characterized in that, The method includes: Receive point cloud data sent by radar; A ground point cloud segmentation model is constructed, and ground point cloud data in the point cloud data is filtered out based on the ground point cloud segmentation model to obtain non-ground point cloud data. The non-ground point cloud data is clustered based on an adaptive neighborhood radius to obtain a set of clusters. Based on the cluster set and the preset train size, the target cluster set is obtained; Based on the target cluster set, the position value of the train is identified.
2. The train identification method according to claim 1, characterized in that, The construction of the ground point cloud segmentation model, and the filtering of ground point cloud data in the point cloud data based on the ground point cloud segmentation model, includes: Equations for constructing a ground point cloud segmentation model based on planar normal vectors; The RANSAC algorithm based on a plane model is used to iteratively solve the parameters of the equation using maximum likelihood estimation. Based on the parameters, points with a distance less than the first threshold are identified as ground points and filtered out to obtain the non-ground point cloud data.
3. The train identification method according to claim 1, characterized in that, The step of obtaining the target cluster set based on the cluster set and the preset train size includes: Calculate the length, width, and height of the 3D bounding box for each cluster; Based on the preset train dimensions and the length, width, and height of the three-dimensional bounding box of each cluster, the differences in length, width, and height are calculated. Based on the difference, the target cluster set is obtained.
4. The train identification method according to claim 1, characterized in that, in, The adaptive neighborhood radius is dynamically determined based on the local density ρ of the point cloud data, and the calculation formula for the adaptive neighborhood radius is as follows: , where r cluster Let r be the adaptive neighborhood radius. min r is the preset lower limit of the radius. max ρ is the preset upper limit of radius, k is the scaling factor, and ρ is the local density of the point cloud data.
5. The train identification method according to claim 1, characterized in that, The process of identifying the train's location value based on the target cluster set includes: Calculate the positional representation value of each target cluster in the target cluster set, perpendicular to the direction of carriage arrangement; The position representative values are sorted, and the target cluster corresponding to the position representative value at the middle position is determined as the middle train, and the position value of the middle train is obtained.
6. The train identification method according to claim 5, characterized in that, The position representation value is the projected coordinate of the centroid of each target cluster on the Y-axis in the lidar coordinate system; the lidar coordinate system takes the installation position of the lidar as the origin, the X-axis is along the direction of the railway track, the Y-axis is perpendicular to the direction of the track, and the Z-axis is vertically upward.
7. The train identification method according to claim 1, characterized in that, Before constructing the ground point cloud segmentation model, the method further includes: Statistical filtering is performed on the point cloud data to remove outlier noise points.
8. A train recognition device based on point cloud data, characterized in that, The apparatus includes a control device, the control device being used for: Receive point cloud data sent by radar; A ground point cloud segmentation model is constructed, and ground point cloud data in the point cloud data is filtered out based on the ground point cloud segmentation model to obtain non-ground point cloud data. The non-ground point cloud data is clustered based on an adaptive neighborhood radius to obtain a set of clusters. Based on the cluster set and the preset train size, the target cluster set is obtained; Based on the target cluster set, the position value of the train is identified.
9. A control device, characterized in that, The device includes: a memory and a processor; the memory is used to store relevant program code; the processor is used to call the program code to execute the train recognition method based on point cloud data according to any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program for performing the train identification method based on point cloud data as described in any one of claims 1 to 7.
