Train speed measurement positioning method, device and equipment and storage medium
Through the calculation of the fitted straight line and feature point displacement of the laser sensor scanning points, real-time train speed measurement and positioning without offline map construction is achieved, solving the problem of high computational complexity in the existing technology and is suitable for rail transit in complex environments.
Patent Information
- Application Number
- CN202510379258.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-06-27
AI Technical Summary
The existing two-dimensional laser speed measurement and positioning methods require offline mapping, which has high computational complexity and is difficult to meet the operational needs of some rail transits.
By obtaining multiple scanning points and scan images scanned by the laser sensor, the fitted straight line of the scanning point is determined, the feature points are extracted, and the displacement of the feature points between the two adjacent frames of scanned images are calculated to realize real-time train speed measurement and positioning.
No offline map construction is required, real-time train speed measurement and positioning is realized, reducing calculation complexity, and is suitable for environments where the electromagnetic environment is complex and sleeper deployment has no obvious characteristics.
Smart Images

Figure CN120207404A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular, to a train speed measurement and positioning method, device, equipment, and storage medium. Background Art
[0002] LiDAR has always been an ideal tool for industrial measurement due to its high measurement accuracy. However, due to its high cost, it has not been widely used. In recent years, due to the cost reduction of LiDAR, especially two-dimensional LiDAR, LiDAR has been more widely used.
[0003] Currently, the main method for two-dimensional LiDAR speed measurement and positioning is to first establish a map through a mapping algorithm, then compare the current position with the map to calculate the current location, and then achieve speed measurement and positioning. This method requires offline mapping and the deployment of maps of all possible train routes in on-vehicle equipment, which cannot meet the operation requirements of this positioning in some rail transit systems. Summary of the Invention
[0004] The present invention provides a train speed measurement and positioning method, device, equipment, and storage medium, which can realize the calculation of train speed measurement and positioning in real time without offline mapping and reduce the calculation complexity.
[0005] In a first aspect, an embodiment of the present disclosure provides a train speed measurement and positioning method, including:
[0006] Obtain a plurality of scan points and a scan image composed of the plurality of scan points. For each scan point, determine a fitting line of the scan point, where the scan point is obtained by a laser sensor disposed on the train scanning the environment, or is scanned by a laser sensor disposed in the train running environment;
[0007] Determine feature points from the scan points according to the fitting lines corresponding to the respective scan points;
[0008] Determine the displacement of the feature points between two adjacent frames of scan images to obtain a train speed measurement and positioning result.
[0009] In a second aspect, an embodiment of the present disclosure provides a train speed measurement and positioning device, including:
[0010] A fitting line determination module, configured to obtain a plurality of scan points and a scan image composed of the plurality of scan points, and for each scan point, determine a fitting line of the scan point, where the scan point is obtained by a laser sensor disposed on the train scanning the environment, or is scanned by a laser sensor disposed in the train running environment;
[0011] A feature point determination module, configured to determine feature points from the scan points according to the fitting lines corresponding to the respective scan points;
[0012] A speed measurement and positioning module, configured to determine the displacement of the feature points between two adjacent frames of scanned images, so as to obtain a train speed measurement and positioning result.
[0013] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0014] At least one processor; and
[0015] A memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor can execute a train speed measurement and positioning method provided in the first aspect of the above embodiments.
[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, which stores computer instructions for causing a processor to implement a train speed measurement and positioning method provided in the first aspect of the above embodiments when executed.
[0018] A train speed measurement and positioning method, device, equipment and storage medium according to an embodiment of the present invention include obtaining a plurality of scan points and a scanned image composed of the plurality of scan points, and for each scan point, determining a fitting straight line of the scan point, wherein the scan points are obtained by scanning the environment with a laser sensor disposed on the train, or are scanned by a laser sensor disposed in the train driving environment; determining feature points from the scan points according to the fitting straight lines corresponding to the respective scan points; and determining the displacement of the feature points between two adjacent frames of scanned images to obtain a train speed measurement and positioning result. The above technical solution can realize the calculation of train speed measurement and positioning in real time without offline map building, and reduce the calculation complexity.
[0019] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0021] Figure 1 is a flowchart of a train speed measurement and positioning method provided in Embodiment 1 of the present invention;
[0022] Figure 2 It is an example diagram of a scanned image provided by the first embodiment of the present invention;
[0023] Figure 3 It is an example diagram of fitting a straight line to scanned points provided by the first embodiment of the present invention;
[0024] Figure 4 It is another example diagram of fitting a straight line to scanned points provided by the first embodiment of the present invention;
[0025] Figure 5 It is an example diagram of a scanned map provided by the first embodiment of the present invention;
[0026] Figure 6 It is another example diagram of a scanned map provided by the first embodiment of the present invention;
[0027] Figure 7 It is a flowchart of a train speed measurement and positioning method provided by the second embodiment of the present invention;
[0028] Figure 8 It is an example diagram of a feature point provided by the second embodiment of the present invention;
[0029] Figure 9 It is an example diagram related to a target feature point provided by the second embodiment of the present invention;
[0030] Figure 10 It is a schematic structural diagram of a train speed measurement and positioning device provided by the third embodiment of the present invention;
[0031] Figure 11 It is a schematic structural diagram of an electronic device provided by the fourth embodiment of the present invention. Detailed implementation manners
[0032] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0033] It should be noted that in the description and claims of the present invention and the above-mentioned drawings, terms such as "first", "second" and "target" are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0034] In the aspect of rail transit train positioning technology, for wheel-rail vehicles, speed sensors plus radar accelerators and other methods have been mostly used for a long time. Due to the influence of the change of wheel diameter value, equipment such as speed transmitters needs to be maintained manually regularly, otherwise there will be safety risks. For non-wheel-rail vehicles, there is currently no mature positioning solution.
[0035] Related technologies based on lidar for positioning have been widely used in many industries. Rail transit train positioning mainly relies on speed sensors, Doppler reflection radar, accelerometers, etc. for comprehensive positioning. How to achieve speed measurement and positioning efficiently and accurately in new types of rail transit such as maglev and suspended rail has become a research hotspot in the industry.
[0036] Currently existing two-dimensional lidar mapping and positioning methods. After creating a grid map, matching positioning is performed. Represented by Simultaneous Localization and Mapping (Cartographer), Lidar-based Localization and Mapping Algorithm (Hectorslam), Simultaneous Localization and Mapping Algorithm based on 2D Lidar (gmapping), etc., the creation of the map is divided into front and back ends. The front end uses the technology of scan matching. For each frame of scan data, the map can be constructed by using the scan matching insertion method at the best estimated position, or by methods such as the Gauss-Newton method and particle filter method. These methods have a large memory occupancy and a large algorithm volume.
[0037] Therefore, this solution provides a train speed measurement and positioning method, which does not require offline mapping, can calculate the train speed measurement and positioning in real time, reduces the calculation complexity, and can be applied to the rail transit operation environment with strong electromagnetic environment impact on trains and no obvious features in the deployment of sleepers.
[0038] Embodiment 1
[0039] Figure 1The figure is a flowchart of a train speed measurement and positioning method provided in the first embodiment of the present invention. This embodiment is applicable to the situation of real-time train speed measurement and positioning calculation. This method can be executed by a train speed measurement and positioning device, which can be implemented in the form of hardware and / or software.
[0040] As Figure 1 shown, the method includes:
[0041] S101. Obtain a plurality of scan points and a scan image composed of the plurality of scan points. For each scan point, determine a fitting line of the scan point, where the scan points are obtained by a laser sensor arranged on the train scanning the environment, or are obtained by a laser sensor arranged in the train driving environment scanning.
[0042] In this embodiment, a scan point can be understood as a position point obtained by scanning with a laser sensor, which is a two-dimensional structure representing an object or a scene. For example, a pillar in a train platform exists in the form of a scan point in the scan image obtained by scanning with a laser sensor. A scan image can be understood as a two-dimensional image formed by combining a plurality of scan points. The number of scan points on a single scan image is related to the performance of the laser sensor. The stronger the ranging performance of the laser sensor, the more scan points there are. The laser sensor, that is, the laser scanner, can be handheld, or can be arranged on the train driver's cab, or can be arranged in the train driving environment, which can be a tunnel, a platform, etc. This embodiment does not limit this. The fitting line can be understood as a line corresponding to the scan point. The scan point may be located on its corresponding fitting line, or there may be a certain distance from the fitting line.
[0043] Specifically, obtain the scan image collected by each time frame of the laser sensor. Figure 2 The figure is an example diagram of a scan image provided in the first embodiment of the present invention. As Figure 2 shown, identify each scan point on the scan image. For each scan point, form a scan point set corresponding to the scan point. Based on the position coordinates of the scan points in the scan point set, determine the slope parameter and intercept parameter corresponding to the scan point, and then obtain the fitting line of the scan point based on the slope parameter and intercept parameter. Each scan point has its corresponding fitting line. Figure 3 The figure is an example diagram of a scan point fitting line provided in the first embodiment of the present invention. As Figure 3 shown, in an environment where the obstacle arrangement is relatively complex, the positions of the scan points are irregular, and the scan points and their fitting lines are as Figure 3 shown; Figure 4 The figure is another example diagram of a scan point fitting line provided in the first embodiment of the present invention. As Figure 4 shown, in an environment where the obstacle arrangement is relatively simple, the scan points are relatively regular, and the scan points and their fitting lines are asFigure 4 As shown. It can be understood that since the determination of the fitting line of the scanning points needs to consider the position coordinate factors of other scanning points, therefore, no matter Figure 3 or Figure 4 the image shown, there are cases where the scanning points are not on their fitting lines.
[0044] S102. Determine the characteristic points from each scanning point according to the fitting line corresponding to each scanning point.
[0045] In this embodiment, the characteristic points can be understood as relatively special points among the scanning points. For example, they can be inflection points, edge points, or points with higher quality.
[0046] Specifically, determine the distance between each scanning point and its adjacent scanning points, compare these distances, and determine the scanning point with the largest distance as the edge characteristic point. Or, determine whether there is only one adjacent scanning point in the front and back directions for each scanning point. If so, determine this scanning point as the edge characteristic point. Each scanning point has its fitting line. For a single scanning point, take its own fitting line and the fitting lines of the adjacent scanning points in the front and back directions of this scanning point, calculate the included angle between the fitting lines corresponding to the two adjacent scanning points of this scanning point, and determine the scanning point corresponding to the largest included angle among the obtained included angles as the characteristic point. This characteristic point is the point representing the physical characteristics of the scanning point, that is, the inflection point. In addition, take the distance between a single scanning point and its own fitting line, and determine the scanning point corresponding to the smallest distance among the obtained distances as the characteristic point. This characteristic point is the scanning point representing the fitting quality of the fitting line.
[0047] S103. Determine the displacement of the characteristic points between two adjacent frames of scanning images to obtain the train speed measurement and positioning result.
[0048] In this embodiment, the train speed measurement and positioning result includes the positioning result and the speed measurement result. The positioning result is the current coordinate position of the characteristic point, and the speed measurement result is the traveling speed of the train. It can also include the acceleration of the train.
[0049] Perform alignment matching on the front and back two scanning pictures, so that the displacement change state corresponding to the two scanning pictures can be deduced, and then the train speed can be measured. Specifically, match two adjacent frames of scanning images, identify the horizontal and vertical translation distances and rotation angles of the same characteristic point between the two adjacent frames of images, calculate the current coordinates of the characteristic point based on this translation distance and rotation angle, and calculate the traveling speed (and can also include the acceleration) of the train based on the difference between the current coordinates of the characteristic point in the current frame and the coordinates in the previous frame to obtain the train speed measurement and positioning result.
[0050] A train speed measurement and positioning method provided by an embodiment of the present invention includes obtaining a plurality of scan points and a scan image composed of the plurality of scan points. For each scan point, a fitting straight line of the scan point is determined, where the scan point is obtained by a laser sensor disposed on the train scanning the environment, or is obtained by a laser sensor disposed in the train driving environment scanning; according to the fitting straight lines corresponding to the respective scan points, feature points are determined from the respective scan points; the displacement of the feature points between two adjacent frames of scan images is determined to obtain a train speed measurement and positioning result. In the above technical solution, a two-dimensional laser positioning algorithm is designed based on the Lidar Odometry and Mapping (LOAM). By using the characteristic that the laser accurately measures the distance to the ground positioning points, through the change of the distance of the main obstacle feature points in a similar environment in different periods, the relative position change of the train in space is accurately judged, and then information such as the speed and acceleration of the train is calculated, and the position of the vehicle-mounted device where the laser device is located is quickly measured, and the traveling speed of the vehicle-mounted device is calculated. This solution does not require offline mapping, only requires one laser scanner, and does not require the auxiliary conditions of an Inertial Measurement Unit (IMU) and an Occupancy Grid Map (ODOM), and can realize data acquisition and further measurement and positioning calculation. The required hardware structure is simple, while the simplicity of the algorithm is improved and the calculation complexity is reduced; the two major functions of speed measurement and positioning are simultaneously realized through a set of methods, which not only improves the usability of the system, but also reduces the system complexity and greatly reduces the production and maintenance costs; the matching processing time of each frame of data transplanted in the embedded kernel main board is about 5 ms, which greatly improves the real-time performance of software processing and meets the real-time requirements of the rail transit for the positioning algorithm; in addition, the implementation of this method has strong adaptability to the surrounding environment of the train, can avoid the influence caused by electromagnetic interference of vehicles such as maglev trains, and has strong anti-interference ability.
[0051] As a first alternative embodiment of this embodiment, the method further includes:
[0052] a. Select a reference feature point.
[0053] In this embodiment, the reference feature point can be understood as a calibration point, which is a fixed feature point that does not change with the time frame.
[0054] Specifically, establish a life parameter value for each feature point. The feature points used in each match will increase the life parameter value, and the typical feature points with the highest life parameter value are selected as the reference feature points, and the non-typical interference points are quickly filtered.
[0055] b. With the reference feature points as the benchmark, match two adjacent frames of scanned images to determine the corresponding map construction points, and iterate in a loop until the last map construction point is determined, thus completing the construction of the scanned map.
[0056] In this embodiment, the map construction points can be understood as the points used to construct the map. Essentially, they are still scanned points and feature points, but their functions are different. Here, these points are used to achieve the construction of the scanned map. The scanned map can be understood as an image that can reflect the environmental structure formed by matching and combining multiple scanned images within a period of time.
[0057] Figure 5 is an example diagram of a scanned map provided by Embodiment 1 of the present invention. As Figure 5 shown, in the prior art, the construction of the scanned map is often carried out by accumulating the horizontal and vertical translation distances between two adjacent frames. Since there may be certain errors in the horizontal and vertical translation distances between each adjacent two frames, therefore, through the iterative matching of multiple scanned images and the iterative accumulation of multiple horizontal and vertical translation distances, there will be a situation of error accumulation, resulting in a large deformation of the constructed scanned map as Figure 5 shown. Figure 6 is another example diagram of a scanned map provided by Embodiment 1 of the present invention. As Figure 6 shown, in this alternative embodiment, based on the concept of the average precision value of feature points (Mean Average Precision, MAP), typical feature points are saved as the common points (i.e., reference feature points) in the MAP. The scanned points on each frame of the scanned image are preferentially matched with the reference feature points, and the matching is carried out with a single feature point as the benchmark to obtain a scanned map as Figure 6 shown, avoiding the problem of error accumulation caused by constructing the map based on the distances between two adjacent points between two adjacent frames.
[0058] Thus, the cumulative effect of errors between each frame can be greatly reduced, and the operation efficiency of the algorithm can be improved.
[0059] It can be understood that through the test of drawing a circular scene map as Figure 6 shown, it is verified that this method can achieve a very good closed-loop matching function without backend closed-loop processing, and further verifies the accuracy of speed measurement and positioning.
[0060] Embodiment 2
[0061] Figure 7 is a flowchart of a train speed measurement and positioning method provided by Embodiment 2 of the present invention. This embodiment is a further optimization of any of the above embodiments and is applicable to the situation of real-time train speed measurement and positioning calculation. This method can be executed by a train speed measurement and positioning device, and the train speed measurement and positioning device can be implemented in the form of hardware and / or software.
[0062] As Figure 7 shown, the method includes:
[0063] S201. Obtain multiple scan points and a scan image composed of multiple scan points.
[0064] S202. Determine the current scan point, and form a current scan point set corresponding to the previous scan point. The current scan point set includes the current scan point and the reference scan points of the current scan point. The reference scan points are the adjacent scan points of the current scan point.
[0065] In this embodiment, the current scan point can be understood as the scan point that is the calculation subject at the current moment, and each scan point can be used as the current scan point. The current scan point set can be understood as the scan point set composed of the current scan point and the reference scan points of the current scan point. The reference scan points can be understood as the scan points of the current scan point in the forward and backward directions, and there can be multiple reference scan points.
[0066] Specifically, determine the current scan point, take N points adjacent to the current scan point before and after as the reference scan points, and form the current scan point set of the current scan point based on the current scan point and the reference scan points of the current scan point.
[0067] S203. According to the coordinates of the current scan point and each reference scan point, fit and form a fitting line for the current scan point.
[0068] In this embodiment, according to the abscissa and ordinate of the current scan point, as well as the abscissa and ordinate of each reference scan point, determine the average abscissa value and the average ordinate value relative to the entire current scan point set. Based on the average abscissa value and the average ordinate value, as well as the abscissa and ordinate of the current scan point, calculate the slope parameter and the intercept parameter of the current scan point, and then determine the fitting line of the current scan point.
[0069] Optionally, fitting and forming a fitting line for the current scan point according to the coordinates of the current scan point and each reference scan point includes:
[0070] S2031. Determine the average abscissa value and the average ordinate value corresponding to the current scan point set according to the coordinates of the current scan point and the coordinates of each reference scan point.
[0071] In this embodiment, the average abscissa value can be understood as the average value of the abscissas of all scan points in the current scan point set. The average ordinate value can be understood as the average value of the ordinates of all scan points in the current scan point set.
[0072] Specifically, determine the abscissa of the current scanning point and the abscissas of each reference scanning point in the current scanning point set, and obtain the average abscissa x corresponding to the current scanning point set based on these abscissas. a Determine the ordinate of the current scanning point and the ordinates of each reference scanning point in the current scanning point set, and obtain the average ordinate y corresponding to the current scanning point set based on these ordinates. a 。
[0073] S2032. Determine the current slope according to the current abscissa and current ordinate of the current scanning point, as well as the average abscissa and average ordinate.
[0074] In this embodiment, the current abscissa can be understood as the abscissa of the current scanning point, the current ordinate can be understood as the ordinate of the current scanning point, and the current slope can be understood as the slope parameter corresponding to the current scanning point.
[0075] Specifically, according to the current abscissa xi i and the current ordinate yi i of the current scanning point i, as well as the average abscissa x a and the average ordinate y a , calculate the current slope k through k = ∑(|xi i -x a |)(|yi i -y a |) / ∑(|xi i -x a |)^2.
[0076] S2033. Determine the current intercept according to the current abscissa, current ordinate and current slope.
[0077] In this embodiment, the current intercept can be understood as the intercept parameter corresponding to the current scanning point.
[0078] Specifically, according to the current abscissa x i , the current ordinate y i and the current slope k, determine the current intercept b through b = y a -kx a .
[0079] S2034. Form a fitting line for the current scanning point based on the current slope and current intercept.
[0080] In this embodiment, based on the current slope k and current intercept b, fit and form a fitting line y = kx + b for the current scanning point.
[0081] S204. For each current scan point, determine the forward fitting line of the forward reference scan point, the backward fitting line of the backward reference scan point, and the current fitting line of the current scan point, and determine the intermediate feature points based on the forward fitting line, the backward fitting line, and the current fitting line.
[0082] In this embodiment, the forward reference scan point can be understood as the previous reference scan point of the current scan point, and the forward fitting line can be understood as the fitting line of the forward reference scan point. The backward reference scan point can be understood as the next reference scan point of the current scan point, and the backward fitting line can be understood as the fitting line of the backward reference scan point. The current fitting line can be understood as the fitting line of the current scan point. The intermediate feature point can be understood as a scan point with typical features located at a non-edge position in the line segment composed of multiple scan points, and there is at least one scan point on both adjacent sides of it. Figure 8 It is an example diagram of a feature point provided in the second embodiment of the present invention. As Figure 8 shown, the green scan points in the figure are the intermediate feature points.
[0083] Specifically, for each current scan point, determine the forward fitting line of the forward reference scan point, the backward fitting line of the backward reference scan point, and the current fitting line of the current scan point. Determine one intermediate feature point according to the angle between the forward fitting line and the backward fitting line, and determine another intermediate feature point according to the linear distance between the current scan point and the current fitting line.
[0084] Optionally, determining the intermediate feature points based on the forward fitting line, the backward fitting line, and the current fitting line includes:
[0085] S2041. Determine the current angle between the forward fitting line and the backward fitting line, and add the current angle to the current angle set corresponding to the current scan point.
[0086] In this embodiment, the current angle can be understood as the angle between the forward fitting line and the backward fitting line, and each current scan point has its corresponding current angle. The current angle set can be understood as a set composed of the current angles corresponding to several adjacent scan points, and can correspond to the current scan point set of the current scan point.
[0087] Specifically, calculate the angle between the forward fitting line of the forward reference scan point of the current scan point and the backward fitting line of the backward reference scan point to obtain the current angle of the current scan point, and add the current angle to the pre-constructed current angle set.
[0088] S2042. Determine the current distance between the current scan point and the current fitting line, and add the current distance to the current distance set corresponding to the current scan point.
[0089] In this embodiment, the current distance can be understood as the vertical distance between the current scan point and its corresponding current fitting line. Each current scan point has its corresponding current distance, and the minimum value of the current distance is 0, indicating that the current scan point falls on the current fitting line. The current distance set can be understood as a set composed of the current distances corresponding to several adjacent scan points, and can correspond to the current scan point set of the current scan point.
[0090] Specifically, calculate the vertical distance between the position coordinates of the current scan point and the fitting line of the current scan point to obtain the current distance of the current scan point, and add the current distance to the pre-constructed current distance set.
[0091] S2043. Determine the scan points corresponding to the current angles that meet the angle condition in the current angle set as the first intermediate feature points, and determine the scan points corresponding to the current distances that meet the distance condition in the current distance set as the second intermediate feature points.
[0092] In this embodiment, the angle condition can be understood as the condition for determining the first intermediate feature points based on the magnitude of the angle value. The first intermediate feature points can be understood as the points representing the physical characteristics of the scan points, that is, the inflection points. The distance condition can be understood as the condition for determining the second intermediate feature points based on the magnitude of the distance value. The second intermediate feature points can be understood as the scan points representing the fitting quality of the fitting line.
[0093] Specifically, determine the current angle with the largest angle value in the current angle set. This current angle meets the angle condition, and determine the scan point corresponding to this current angle as the first intermediate feature point representing the inflection point. Determine the current distance with the smallest distance value in the current distance set. This current distance meets the distance condition, and determine the scan point corresponding to this current distance as the first intermediate feature point representing high line fitting quality.
[0094] S205. For each current scan point, determine whether the current scan point meets the edge point confirmation condition. If it meets, determine the current scan point as an edge feature point.
[0095] In this embodiment, the edge point confirmation condition can be understood as the condition for confirming whether the current scan point is an edge feature point. For example, there is at most one scan point around the current scan point, or the distance between the edge scan point and the surrounding scan points is too far. The edge feature point can be understood as a scan point with typical characteristics located at the edge position in the line segment composed of multiple scan points. As Figure 8 shown, the blue scan points in the figure are the edge feature points.
[0096] Specifically, first, it is determined whether there are reference scan points in the front and rear directions of the current scan point. If there is at most one reference scan point in the front and rear directions, it is determined that the edge point confirmation condition is satisfied, and the current scan point is determined as an edge feature point. If there are reference scan points in both the front and rear directions, the forward distance between the current scan point and the forward reference scan point, and the backward distance between the current scan point and the backward reference scan point are calculated. The forward distance is added to the forward distance set, and the backward distance is added to the backward distance set. The forward distance set can be understood as a set composed of forward distances corresponding to several adjacent scan points, which can correspond to the current scan point set of the current scan point. The backward distance set can be understood as a set composed of backward distances corresponding to several adjacent scan points, which can correspond to the current scan point set of the current scan point. The scan point corresponding to the maximum value of the forward distance is taken from the forward distance set and determined as the edge scan point, and the scan point corresponding to the maximum value of the backward distance is taken from the backward distance set and determined as the edge scan point.
[0097] S206. Match two adjacent frames of scanned images, determine the translation distance and rotation angle of the target feature point between the two adjacent frames of scanned images, and determine the current coordinates of the target feature point according to the translation distance, rotation angle, and the initial coordinates of the target feature point.
[0098] In this embodiment, the target feature point can be understood as a feature point whose position needs to be determined. If the embodiment of the present invention is applied to the case where a laser sensor is arranged in a train running environment, the target feature point can be understood as a certain point on the train, such as a point at the head position or a point at the center position of the train, so as to realize train positioning. The initial coordinates can be understood as the position coordinates of the target feature point in the previous time frame, and the current coordinates can be understood as the position coordinates of the target feature point in the current time frame.
[0099] Specifically, Figure 9 FIG. is an example diagram of a target feature point provided in the second embodiment of the present invention. As Figure 9 shown, the scan points on the previous frame of scanned image are represented by black small dots, and the scan points on the next frame of scanned image are represented by red small dots. The two frames of scanned images are matched, and a reference feature point (for example, Figure 9 the green point in, because its position on the two adjacent frames of scanned images is always or extremely approximate, so, it is represented by one point) and a target feature point (for example, Figure 9The red large dots and yellow large dots (the red large dot is the position of the target feature point on the previous frame of scanned image, and the yellow large dot is the position of the target feature point on the next frame of scanned image), and connect the reference feature point and the target feature point to obtain the connection line between the reference feature point and the target feature point (obtain the orange connection line corresponding to the previous frame of scanned image and the blue connection line corresponding to the next frame of scanned image). Match the adjacent two frames of scanned images to determine the rotation angle t between the connection lines corresponding to the adjacent two frames of scanned images (that is, the included angle between the orange connection line and the blue connection line), and obtain the rotation parameters of t, including a = cos(t), b = -sin(t), c = sin(t), d = -cos(t); determine the translation distance e in the horizontal axis direction (that is, the distance in the x direction between the red large dot and the yellow large dot) and the translation distance f in the vertical axis direction (that is, the distance in the y direction between the red large dot and the yellow large dot) of the target feature point on the adjacent two frames of scanned images. According to the initial coordinates (x, y) of the target feature point, the rotation parameters a, b, c, d corresponding to the rotation angle t, and the translation distances e and f, through calculate to obtain the current coordinates (x', y') of the target feature point.
[0100] S207. Determine the displacement of the target feature point between the adjacent two frames of scanned images based on the current coordinates and the initial coordinates.
[0101] In this embodiment, calculate the differences in the x and y directions between the current coordinates (x', y') and the initial coordinates (x, y), and further obtain the displacement of the target feature point between the adjacent two frames of scanned images, that is, the distance value between the current coordinates and the initial coordinates.
[0102] S208. Determine the train speed measurement and positioning result according to the displacement and the time difference between the adjacent two frames.
[0103] In this embodiment, divide the displacement by the time difference between the adjacent two frames to obtain the train running speed, that is, the train speed measurement and positioning result.
[0104] A train speed measurement and positioning method provided by an embodiment of the present invention includes obtaining a plurality of scan points and a scan image composed of the plurality of scan points; determining a current scan point to form a current scan point set corresponding to a previous scan point, where the current scan point set includes the current scan point and a reference scan point of the current scan point, and the reference scan point is an adjacent scan point of the current scan point; fitting a straight line for the current scan point according to the coordinates of the current scan point and each reference scan point; for each current scan point, determining a forward fitting straight line of a forward reference scan point and a backward fitting straight line of a backward reference scan point of the current scan point, as well as a current fitting straight line of the current scan point, and determining an intermediate feature point according to the forward fitting straight line, the backward fitting straight line, and the current fitting straight line; for each current scan point, determining whether the current scan point meets an edge point confirmation condition, and if so, determining the current scan point as an edge feature point; matching two adjacent frames of scan images to determine a translation distance and a rotation angle of a target feature point between the two adjacent frames of scan images, and determining a current coordinate of the target feature point according to the translation distance, the rotation angle, and an initial coordinate of the target feature point; determining a displacement of the target feature point between the two adjacent frames of scan images based on the current coordinate and the initial coordinate; and determining a train speed measurement and positioning result according to the displacement and a time difference between the two adjacent frames. According to the above technical solution, this solution does not require offline map building. Only one laser scanner is needed to collect data and perform further measurement and positioning calculations. The required hardware structure is simple, while the simplicity of the algorithm is improved and the calculation complexity is reduced; the two major functions of speed measurement and positioning are realized simultaneously through a set of methods, which not only improves the usability of the system, but also reduces the system complexity and greatly reduces the production and maintenance costs; the real-time performance of software processing is greatly improved to meet the real-time requirements of the positioning algorithm for rail transit; in addition, the implementation of this method has strong adaptability to the surrounding environment of the train and can avoid the influence caused by electromagnetic interference of vehicles such as maglev trains, and has strong anti-interference ability.
[0105] Embodiment III
[0106] Figure 10 is a schematic structural diagram of a train speed measurement and positioning device provided by Embodiment III of the present invention. As Figure 10 shown, the device includes:
[0107] A fitting straight line determination module 31, configured to obtain a plurality of scan points and a scan image composed of the plurality of scan points, and for each scan point, determine a fitting straight line of the scan point, where the scan point is obtained by scanning the environment by a laser sensor disposed on the train, or is obtained by scanning by a laser sensor disposed in the train running environment;
[0108] A feature point determination module 32, configured to determine a feature point from each of the scan points according to the fitting straight lines corresponding to the scan points;
[0109] The speed measurement and positioning module 33 is used to determine the displacement of the feature point between two adjacent frames of scanned images, and obtain the train speed measurement and positioning result.
[0110] The train speed measurement and positioning device adopted in this technical solution does not require offline map building, and can calculate the train speed measurement and positioning in real time, reducing the calculation complexity.
[0111] Optionally, the fitting straight line determination module 31 includes:
[0112] The scanning point set determination unit is used to determine the current scanning point, and form the current scanning point set corresponding to the previous scanning point. The current scanning point set includes the current scanning point and the reference scanning point of the current scanning point. The reference scanning point is the adjacent scanning point of the current scanning point;
[0113] The fitting straight line determination unit is used to fit and form a fitting straight line for the current scanning point according to the coordinates of the current scanning point and the coordinates of each reference scanning point.
[0114] Optionally, the fitting straight line determination unit is specifically used for:
[0115] Determine the average value of the abscissa and the average value of the ordinate corresponding to the current scanning point set according to the coordinates of the current scanning point and the coordinates of each reference scanning point;
[0116] Determine the current slope according to the current abscissa and current ordinate of the current scanning point, and the average value of the abscissa and the average value of the ordinate;
[0117] Determine the current intercept according to the current abscissa, current ordinate and the current slope;
[0118] Based on the current slope and the current intercept, form a fitting straight line for the current scanning point.
[0119] Optionally, the feature point determination module 32 includes:
[0120] The intermediate feature point determination unit is used to, for each current scanning point, determine the forward fitting straight line of the forward reference scanning point and the backward fitting straight line of the backward reference scanning point of the current scanning point, as well as the current fitting straight line of the current scanning point, and determine the intermediate feature point according to the forward fitting straight line, the backward fitting straight line and the current fitting straight line;
[0121] The edge feature point determination unit is used to, for each current scanning point, determine whether the current scanning point meets the edge point confirmation condition. If it meets, determine the current scanning point as the edge feature point.
[0122] Optionally, the intermediate feature point determination unit is specifically used for:
[0123] Determine the current angle between the forward fitting line and the backward fitting line, and add the current angle to the current angle set corresponding to the current scanning point;
[0124] Determine the current distance between the current scanning point and the current fitting line, and add the current distance to the current distance set corresponding to the current scanning point;
[0125] Determine the scanning points corresponding to the current angles in the current angle set that meet the angle condition as the first intermediate feature points, and determine the scanning points corresponding to the current distances in the current distance set that meet the distance condition as the second intermediate feature points.
[0126] Optionally, the speed measurement and positioning module 33 is specifically configured to:
[0127] Match two adjacent frames of scanned images, determine the translation distance and rotation angle of the target feature point between the two adjacent frames of scanned images, and determine the current coordinates of the target feature point according to the translation distance, rotation angle, and the initial coordinates of the target feature point;
[0128] Determine the displacement of the target feature point between two adjacent frames of scanned images based on the current coordinates and the initial coordinates;
[0129] Determine the train speed measurement and positioning result according to the displacement and the time difference between two adjacent frames.
[0130] Optionally, the method further includes a map construction module, which is specifically configured to:
[0131] Select a reference feature point;
[0132] Taking the reference feature point as a reference, match two adjacent frames of scanned images, determine the corresponding map construction points, and iterate until the last map construction point is determined to complete the construction of the scanned map.
[0133] The train speed measurement and positioning device provided by the embodiments of the present invention can execute the train speed measurement and positioning method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0134] Embodiment 4
[0135] Figure 11FIG. 0 is a schematic structural diagram of an electronic device provided in Embodiment 4 of the present invention. The electronic device is intended to represent various forms of digital computers, such as, for example, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as, for example, personal digital assistants, cellular telephones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described herein and / or claimed.
[0136] As Figure 11 shown, the electronic device 40 includes at least one processor 41, and a memory communicatively connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc. The memory stores a computer program executable by the at least one processor. The processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 into the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0137] A plurality of components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a magnetic disk, an optical disc, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0138] The processor 41 may be various general-purpose and / or special-purpose processing components having processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as the train speed measurement and positioning method.
[0139] In some embodiments, the train speed measurement and positioning method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the train speed measurement and positioning method described above can be performed. Alternatively, in other embodiments, the processor 41 can be configured to execute the train speed measurement and positioning method by any other suitable means (e.g., by means of firmware).
[0140] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), systems on a chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.
[0141] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer programs are executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0142] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0143] To provide for interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide for interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).
[0144] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0145] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, solving the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0146] It should be understood that various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is imposed herein.
[0147] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A train speed measurement and positioning method, characterized in that: include: Acquire a plurality of scanning points and a scanning image composed of the plurality of scanning points, and determine a fitting straight line of the scanning point for each scanning point, wherein the scanning point is obtained by scanning an environment with a laser sensor disposed on a train, or is obtained by scanning an environment in which a train is traveling; Determining feature points from each scanning point according to the fitting straight line corresponding to each scanning point; The displacement of the feature point between two adjacent frames of scanned images is determined to obtain a train speed measurement and positioning result.
2. The method according to claim 1, characterized in that The step of determining a fitting straight line for each scanning point includes: Determine a current scanning point to form a current scanning point set corresponding to a previous scanning point, wherein the current scanning point set includes the current scanning point and a reference scanning point of the current scanning point, wherein the reference scanning point is an adjacent scanning point of the current scanning point; A fitting straight line for the current scanning point is formed by fitting according to the coordinates of the current scanning point and each of the reference scanning points.
3. The method according to claim 2, characterized in that The step of fitting a fitting straight line for the current scanning point according to the coordinates of the current scanning point and each of the reference scanning points comprises: Determine the average value of the horizontal coordinate and the average value of the vertical coordinate corresponding to the current scanning point set according to the coordinate of the current scanning point and the coordinate of each of the reference scanning points; Determine a current slope according to a current abscissa and a current ordinate of the current scanning point, and an average value of the abscissa and an average value of the ordinate; Determine a current intercept according to the current abscissa, the current ordinate and the current slope; A fitting straight line for the current scanning point is formed based on the current slope and the current intercept.
4. The method according to claim 1, characterized in that The step of determining a feature point from each scanning point according to a fitting straight line corresponding to each scanning point comprises: For each current scanning point, determine a forward fitting line of a forward reference scanning point of the current scanning point, a backward fitting line of a backward reference scanning point, and a current fitting line of the current scanning point, and determine an intermediate feature point according to the forward fitting line, the backward fitting line, and the current fitting line; For each current scanning point, determine whether the current scanning point meets the edge point confirmation condition, and if so, determine the current scanning point as an edge feature point.
5. The method according to claim 4, characterized in that The determining of the intermediate feature points according to the forward fitting straight line, the backward fitting straight line and the current fitting straight line comprises: Determine a current angle between the forward fitting straight line and the backward fitting straight line, and add the current angle to a current angle set corresponding to the current scanning point; Determine a current distance between the current scanning point and the current fitting line, and add the current distance to a current distance set corresponding to the current scanning point; The scanning point corresponding to the current angle that meets the angle condition in the current angle set is determined as the first intermediate feature point, and the scanning point corresponding to the current distance that meets the distance condition in the current distance set is determined as the second intermediate feature point.
6. The method according to claim 1, characterized in that The step of determining the displacement of the feature point between two adjacent frames of scanned images to obtain a train speed measurement and positioning result includes: Matching two adjacent frames of scanned images to determine the translation distance and rotation angle of the target feature point between the two adjacent frames of scanned images, and determining the current coordinates of the target feature point according to the translation distance, rotation angle and initial coordinates of the target feature point; Determine the displacement of the target feature point between two adjacent frames of scanned images based on the current coordinates and the initial coordinates; The train speed measurement and positioning result is determined according to the displacement and the time difference between two adjacent frames.
7. The method according to claim 1, characterized in that Also includes: Take reference feature points; Based on the reference feature points, two adjacent frames of scanned images are matched to determine the corresponding map construction points, and the process is repeated until the last map construction point is determined, thus completing the scanned map construction.
8. A train speed measuring and positioning device, characterized in that: include: A fitting straight line determination module is used to obtain a plurality of scanning points and a scanning image composed of the plurality of scanning points, and determine a fitting straight line of the scanning point for each scanning point, wherein the scanning point is obtained by scanning an environment with a laser sensor disposed on the train, or is obtained by scanning an environment in which the train is traveling; A feature point determination module, used to determine a feature point from each scanning point according to a fitting straight line corresponding to each scanning point; The speed measurement and positioning module is used to determine the displacement of the feature point between two adjacent frames of scanned images to obtain the train speed measurement and positioning result.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute a train speed measurement and positioning method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement a train speed measurement and positioning method according to any one of claims 1 to 7 when executed.