Train positioning method and system based on binocular vision and electronic equipment
Through the train positioning method based on binocular vision, the train position is calculated using image processing and recognition technology, and the problem of many middle rail-side equipment and high maintenance costs in the prior art is solved, and high precision and high reliability train positioning is achieved.
Patent Information
- Application Number
- CN202510034520.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-05-30
AI Technical Summary
The existing urban rail transit train positioning technology relies on a large number of electronic equipment on the rail, which has problems such as many fault points, low recovery efficiency, high construction cost and large maintenance workload. At the same time, the reliability and accuracy of train positioning may be affected by factors such as operating environment and wheel wear.
Using a train positioning method based on binocular vision, the original two-dimensional image of the same image target along the track is obtained through an image acquisition device, image processing and recognition are performed, majority voting judgment and binocular recognition parallax calculation are performed, image target parameter information is obtained, and train position is calculated based on line electronic map information.
It reduces the installation, construction and maintenance costs of rail-side equipment, improves the accuracy and reliability of train positioning, and avoids the problems of missing data and poor accuracy of monocular identification.
Smart Images

Figure CN120071267A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of urban rail transit train positioning, and particularly to a train positioning method, system and electronic device based on binocular vision. Background Art
[0002] With the rapid growth of the operation scale of urban rail transit and the continuous increase in passenger volume, the safety guarantee pressure of urban rail transit is increasing. The service demands and expectations for operation safety, comfort and punctuality are also getting higher and higher, which puts forward higher requirements for improving the automation and intelligence level of train operation. Train positioning is the basic and core function of the urban rail transit train operation control system, and is of great significance for realizing the safe operation of trains and improving the transport efficiency. The train positioning method in urban rail transit has been continuously upgraded with the update and iteration of the operation control system technology, evolving from using trackside axle counters or track circuits in fixed block systems to using trackside balises and on-vehicle speed measurement and positioning devices in moving block systems.
[0003] Currently, the mainstream train positioning solution relies on the on-vehicle BTM antenna to read the absolute position mileage information in the trackside balise, and combines on-vehicle devices such as speed sensors and accelerometers to calculate the relative position of the train for train positioning. Supplementary trackside axle counters or track circuits are further used to improve the safety and reliability of train positioning, which largely meets the train positioning requirements. However, adopting this solution requires the arrangement of a large number of trackside electronic devices, which has problems such as many fault points, low recovery efficiency, high construction costs and large maintenance workload; at the same time, affected by various reasons such as the operating environment and wheel wear, the reliability and accuracy of train positioning may decrease. In addition, the urban rail transit system needs to develop towards the direction of intelligence, greenness and intensification. Therefore, it is necessary to actively seek train positioning technologies based on intelligent technologies, and on the premise of ensuring the reliability of train positioning, reduce trackside devices as much as possible, thereby reducing the fault points of ground devices and controlling the construction and maintenance costs.
[0004] In recent years, machine vision technology has developed rapidly, and its application fields have gradually expanded. Nowadays, it has been widely applied in fields such as aerospace, biomedicine, traffic command, target recognition, and intelligent vehicle driverless. The train positioning technology based on machine vision is still in the research stage. Summary of the Invention
[0005] The main object of the present invention is to provide a train positioning method, system and electronic device based on binocular vision, aiming to solve at least one of the above technical problems.
[0006] To achieve the above object, the present invention provides a train positioning method based on binocular vision, including:
[0007] Simultaneously acquiring original two-dimensional images of the same image target along the track based on an image acquisition device;
[0008] Perform image processing and recognition on the original two-dimensional image to obtain processed data;
[0009] Perform majority voting determination based on the processed data to obtain a two-dimensional image with correct image target determination;
[0010] Perform binocular recognition parallax measurement based on the two-dimensional image with correct image target determination to obtain image target parameter information;
[0011] Obtain line electronic map information, and obtain the train position based on the image target parameter information and the line electronic map information.
[0012] In some embodiments, the performing image processing and recognition on the original two-dimensional image to obtain processed data includes:
[0013] Regard trackside equipment and signs as image target objects, and classify and label the image target objects to obtain image target samples along the track;
[0014] Train a target recognition model based on the image target samples to obtain a trained target recognition model;
[0015] Perform recognition and image processing on the original two-dimensional image according to the trained target recognition model to obtain processed data; wherein, the processed data includes a two-dimensional image and a corresponding multi-dimensional array.
[0016] In some embodiments, the performing majority voting determination based on the processed data to obtain a two-dimensional image with correct image target determination includes:
[0017] Set a preset train positioning accuracy rate;
[0018] Obtain the accuracy rate of the trained target recognition model;
[0019] Obtain a constraint condition based on the preset train positioning accuracy rate and the accuracy rate of the trained target recognition model;
[0020] Perform majority voting determination on the processed data according to the constraint condition to obtain a two-dimensional image with correct image target determination.
[0021] In some embodiments, the performing binocular recognition parallax measurement based on the two-dimensional image with correct image target determination to obtain image target parameter information includes:
[0022] Combine the two-dimensional images with correct image target determination in pairs to obtain multiple groups of two-dimensional image information; wherein, the two-dimensional image information includes a two-dimensional image and a corresponding multi-dimensional array;
[0023] Calculate the distance to the image target for each set of two-dimensional image information according to the binocular recognition algorithm to obtain the distance information from the train to the image target;
[0024] Assign the distance information from the train to the image target to the distance information in the multi-dimensional array;
[0025] Obtain the image target data information based on the coordinates of the image target and the distance information from the train to the image target.
[0026] In some embodiments, the calculating the distance to the image target for each set of two-dimensional image information according to the binocular recognition algorithm to obtain the distance information from the train to the image target includes:
[0027] Determine the three-dimensional coordinate information of the image target according to the two-dimensional image in each set of two-dimensional image information;
[0028] Obtain the transformation matrix and translation vector between the camera coordinate system of the left camera and the camera coordinate system of the right camera according to the installation position of the camera;
[0029] Obtain the transformation relationship between the two coordinate systems according to the transformation matrix and translation vector, and determine the corresponding relationship of the projection points on the imaging planes of the two cameras based on the transformation relationship;
[0030] Calculate the coordinates of the image target according to the three-dimensional coordinate information of the image target and the corresponding relationship of the projection points; wherein, the coordinates of the image target include the coordinates in the camera coordinate system of the left camera and the coordinates in the camera coordinate system of the right camera;
[0031] Calculate the distance information from the train to the image target based on the coordinates of the image target and the relative position relationship between the camera and the train according to the binocular recognition algorithm.
[0032] In some embodiments, the obtaining the line electronic map information and obtaining the train position based on the image target parameter information and the line electronic map information includes:
[0033] Eliminate abnormal data based on the support degree of the image target parameter information according to the Grubbs criterion to obtain the processed image target parameter information;
[0034] Calculate the distance measurement value between the train and the image target according to the processed image target parameter information by using the average weighting method;
[0035] Obtain the line electronic map information;
[0036] Obtain the train position based on the distance measurement value between the train and the image target and the line electronic map information.
[0037] In some embodiments, obtaining the train position based on the distance measurement value between the train and the image target and the line electronic map information includes:
[0038] Search for the Boolean variable in the processed image target parameter information to determine whether the image target is unique;
[0039] When the image target is unique, search in the line electronic map information according to the identity identifier in the processed image target parameter information to determine the electronic map data corresponding to the image target;
[0040] Determine the absolute mileage position of the image target in the line according to the electronic map data;
[0041] Calculate the train position based on the distance measurement value between the train and the image target and the absolute mileage position.
[0042] In addition, to achieve the above object, the present invention also proposes a train positioning system based on binocular vision, including:
[0043] An image acquisition module, configured to simultaneously acquire the original two-dimensional images of the same image target along the track based on an image acquisition device;
[0044] An image processing module, configured to perform image processing and recognition on the original two-dimensional images to obtain processed data;
[0045] The image processing module is further configured to perform a majority vote determination according to the processed data to obtain a two-dimensional image with a correct determination of the image target;
[0046] The image processing module is further configured to perform binocular recognition parallax measurement according to the two-dimensional image with a correct determination of the image target to obtain image target parameter information;
[0047] A train position calculation module, configured to obtain line electronic map information, and obtain the train position based on the image target parameter information and the line electronic map information.
[0048] In some embodiments, the image target includes devices and signs located along the track and signs providing train operation information:
[0049] The image acquisition device is arranged at different positions at the end of the train, and the number of the image acquisition devices is 2n + 1; where n is a positive integer.
[0050] In addition, to achieve the above object, the present invention further provides an electronic device, which includes: a memory, a processor, and a binocular vision-based train positioning program stored on the memory and executable on the processor. The binocular vision-based train positioning program is configured to implement the binocular vision-based train positioning method as described above. Description of the Drawings
[0051] Figure 1 FIG. is a schematic structural diagram of an electronic device for the hardware operating environment related to the solution of the embodiment of the present invention;
[0052] Figure 2 FIG. is a schematic flowchart of an embodiment of the train positioning method based on binocular vision of the present invention;
[0053] Figure 3 FIG. is a schematic diagram of the basic process of image processing related to the solution of the embodiment of the present invention;
[0054] Figure 4 FIG. is a binocular vision recognition schematic diagram related to the solution of the embodiment of the present invention;
[0055] Figure 5 FIG. is a schematic diagram of the basic process of the train independently calculating its position related to the solution of the embodiment of the present invention;
[0056] Figure 6 FIG. is a structural block diagram of an embodiment of the train positioning system based on binocular vision of the present invention;
[0057] Figure 7 FIG. is a schematic diagram of the train autonomous positioning process related to the solution of the embodiment of the present invention.
[0058] The realization, functional features, and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiments
[0059] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described 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 of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0060] It should be noted that all directional indications (such as up, down, left, right, front, back...) in the embodiments of the present invention are only used to explain the relative position relationship and movement conditions between components in a specific posture (as shown in the drawings). If the specific posture changes, the directional indications will also change accordingly.
[0061] In addition, the descriptions involving "first", "second", etc. in the present invention are only for descriptive purposes, and should not be construed as indicating or implying their relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions between various embodiments may be combined with each other, but it must be based on the ability of those of ordinary skill in the art to implement. When the combination of technical solutions results in contradictions or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0062] Referring to Figure 1 , Figure 1 is a schematic structural diagram of an electronic device for the hardware operating environment involved in the embodiment solution of the present invention.
[0063] As Figure 1 shown, the electronic device may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard). Optionally, the user interface 1003 may further include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM memory), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0064] Those skilled in the art can understand that Figure 1 the structure shown in
[0065] does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Figure 1 shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, a user interface module, and a train positioning program based on binocular vision.
[0066] In Figure 1In the electronic device shown, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be arranged in the electronic device, and the electronic device calls the binocular vision-based train positioning program stored in the memory 1005 through the processor 1001 and executes the binocular vision-based train positioning method provided by the embodiments of the present invention.
[0067] Traditional urban rail transit mainly relies on ground trackside equipment combined with on-vehicle positioning devices to achieve train positioning functions, which requires a large number of trackside electronic devices to be arranged. There are problems such as many fault points, low recovery efficiency after a fault, high construction costs, and large maintenance workloads. How to effectively reduce trackside equipment and ensure the reliability of train positioning is the key technical problem to be solved in this application.
[0068] In view of the deficiencies of current train positioning methods and the development of new technologies, the present invention proposes a binocular vision-based train positioning method, system, and electronic device.
[0069] Embodiments of the present invention provide a binocular vision-based train positioning method, referring to Figure 2 , Figure 2 which is a schematic flowchart of an embodiment of the binocular vision-based train positioning method of the present invention.
[0070] As Figure 2 shown, the binocular vision-based train positioning method includes:
[0071] Step S100: Simultaneously obtain the original two-dimensional images of the same image target along the track based on an image acquisition device;
[0072] Step S200: Perform image processing and recognition on the original two-dimensional images to obtain processed data;
[0073] Step S300: Perform a majority vote determination based on the processed data to obtain a two-dimensional image with a correct determination of the image target;
[0074] Step S400: Calculate the binocular recognition parallax based on the two-dimensional image with a correct determination of the image target to obtain image target parameter information;
[0075] Step S500: Obtain line electronic map information, and obtain the train position based on the image target parameter information and the line electronic map information.
[0076] It should be noted that the execution entity in this embodiment can be an electronic device, which can be a computer device with data processing functions, or other devices that can achieve the same or similar functions. This embodiment does not limit this. In this embodiment, a computer device is taken as an example for illustration.
[0077] It can be understood that in this embodiment, a train autonomous positioning method based on binocular recognition is proposed in combination with machine vision technology, enabling the train to complete autonomous positioning relying on on-vehicle equipment supplemented by other inherent trackside equipment or signs, which can effectively reduce a large number of positioning devices laid along the track in the original positioning system. The train positioning method based on binocular vision in this embodiment performs positioning based on image target detection and binocular recognition to calculate the distance. It adopts the method of simulating binocular observation of objects, uses high-speed cameras set at different positions at the end of the train to simultaneously capture the same target along the track, obtains images of the target from different perspectives and transmits them to the image processing module for computer image processing, identifies the feature information of the image target and the three-dimensional position information between the train and the image target, and further calculates the accurate train position through the train position calculation module, thereby completing the train positioning. The following is a detailed description in combination with specific steps.
[0078] In one embodiment, the original two-dimensional images of the same image target along the track are obtained simultaneously based on the image acquisition device.
[0079] Specifically, the image acquisition device can be a high-speed camera. High-speed cameras set at different positions at the end of the train are used to simultaneously capture the same target (image target) along the track, and images of the target from different perspectives are obtained.
[0080] Exemplarily, a high-speed camera is used as the on-vehicle device for acquiring images along the train operation track. 2n + 1 (n is a positive integer) high-speed cameras are set at the head and tail of the train respectively. The positions of the set high-speed cameras are fixed relative to the train and the acquired images can be obtained by the image processing module, and a certain distance needs to be maintained between two adjacent high-speed cameras to obtain images of the image target from different perspectives.
[0081] In one embodiment, image processing and recognition are performed on the original two-dimensional images to obtain processed data, including: using trackside equipment and signs as image target objects, classifying and marking the image target objects to obtain image target samples along the track; training a target recognition model based on the image target samples to obtain a trained target recognition model; performing recognition and image processing on the original two-dimensional images according to the trained target recognition model to obtain processed data; wherein the processed data includes two-dimensional images and corresponding multi-dimensional arrays.
[0082] It should be noted that the train position is calculated by accumulating its absolute position and relative running distance. To ensure the accuracy of the train's absolute mileage information and avoid the error of the relative running distance accumulated over a long time, it is necessary to supplement and install special identification signs at necessary positions on the line, such as curve sections with a small visible range of cameras and long sections with few unique image targets, to ensure that the on-board camera can always obtain image targets. It is necessary to clarify the trackside equipment and identification signs with significant features and easy to identify as image target objects, and classify and mark them, including whether they are unique, types (equipment type, identification sign type). Further, collect the image target samples along the selected line, and use deep learning technology to train the target recognition model to obtain the trained target recognition model.
[0083] In practical applications, determine the icon target type and data model: According to the trained target recognition model, the original two-dimensional images collected in real time by the high-speed camera can be recognized and processed, and the image targets in the original two-dimensional images can be recognized to obtain the multi-array Ob of the image targets, such as uniqueness, type (equipment type, identification sign type).
[0084] It can be understood that the on-board ATP / ATO equipment stores a line electronic map, which has functions of train speed protection and train running speed control. The line electronic map stores the parameters of the line and the parameters of the unique image targets. In the existing on-board line electronic map model (line electronic map), it is necessary to supplement the parameter information of the image targets along the line for train position calculation. These parameter information of the image targets along the line at least include the ID of the image target, the three-dimensional coordinate information in the line, whether it is unique, and the type. The image target ID is represented by id, which is the sequential number of the image targets in the running direction along the line, and the maximum value of the number is determined by the total number n of the image targets ob ; The three-dimensional coordinate is the position point information p = {(x, y, z)|x ∈ R, y ∈ R, z ∈ R}, and the values of x, y, and z are determined by the line coordinate system; whether it is unique is a Boolean variable b; the type ty value is preset according to the image target type. For example, the signal machine sign is 0, the turnout sign is 1, the mileage sign is 2, the air defense door is 3, the special identification sign A is 4, etc. This embodiment does not limit this.
[0085] Exemplarily, the image targets in the line electronic map are represented by a multi-array M ob indicating that at least 4 data {id, p, b, ty} need to be included. Among them, id = (0, 1, 2..., n ob -1); p ∈ P, where P represents the set of three-dimensional coordinates of the image targets in the line coordinate system; b = (0, 1), 1 represents unique, 0 represents non-unique; ty = (0, 1, 2..., n ty -1), n tyIndicates the total number of preselected image target types.
[0086] Exemplarily, the image targets (image target objects) include, but are not limited to, the devices and signs set beside the track during the construction of urban rail transit, such as signal machines, switches, point machines, civil air defense doors, flood prevention doors, fans, signal machine tags, switch tags, mileage markers, speed limit signs, etc.; the image targets can also be signs specifically used to provide train operation information and set beside the track.
[0087] It can be understood that the processed data includes a two-dimensional image and the corresponding image target data information. The image target data information (the image target data information transmitted by the image processing module to the position calculation module) can be represented by a multi-dimensional array Ob, which should at least contain 4 data {id, l, b, ty}. Among them, id is only assigned when an image target with uniqueness is recognized, and is empty at other times. id matches the information in the on-vehicle line electronic map; l represents the distance information from the train to the image target calculated based on binocular recognition, and is an array containing each element; b = (0, 1), 1 indicates unique, 0 indicates non-unique; ty = (0, 1, 2..., n ty -1), n ty Indicates the total number of preselected image target types.
[0088] In an embodiment, majority voting determination is performed based on the processed data to obtain a two-dimensional image with correct image target determination, including: setting a preset train positioning accuracy rate; obtaining the accuracy rate of the trained target recognition model; obtaining a constraint condition based on the preset train positioning accuracy rate and the accuracy rate of the trained target recognition model; and performing majority voting determination on the processed data according to the constraint condition to obtain a two-dimensional image with correct image target determination.
[0089] Specifically, image processing based on majority voting for target confirmation and binocular recognition distance measurement: Refer to Figure 3 the basic process of the image processing shown. In view of the fact that the image recognition model obtained through training (i.e., the trained target recognition model) has a certain error in a complex operating environment, and its accuracy rate is α (the accuracy rate of the trained target recognition model). In order to meet the requirement of the train positioning accuracy rate η, the data processed by the image processing module from the images collected by 2n + 1 cameras at the same moment is subjected to majority voting determination, and at least n + 1 image target determinations should be correct, and the following constraints (constraint conditions) need to be satisfied:
[0090]
[0091] In one embodiment, a correct two-dimensional image is determined according to the image target for binocular recognition parallax measurement to obtain image target parameter information, including: combining the two-dimensional images determined to be correct for the image target in pairs to obtain multiple groups of two-dimensional image information; wherein, the two-dimensional image information includes a two-dimensional image and a corresponding multi-element array; calculating the distance from the train to the image target for the image target in each group of two-dimensional image information according to the binocular recognition algorithm to obtain distance information from the train to the image target; assigning the distance information from the train to the image target to the distance information in the multi-element array; and obtaining image target data information according to the coordinates of the image target and the distance information from the train to the image target.
[0092] Exemplarily, after voting calculation, there are k (n + 1 ≤ k ≤ 2n + 1) two-dimensional images with correctly recognized targets (two-dimensional images determined to be correct for the image target), and these k images are combined in pairs to obtain groups of two-dimensional image information (multiple groups of two-dimensional image information). Further, the binocular recognition algorithm is used to calculate the distance of the target in the image, and the calculated distance information from the train to the image target is assigned to Ob.l (l in the multi-element array Ob represents the distance information from the train to the image target based on binocular recognition calculation), and the remaining data in Ob.l is assigned a null value.
[0093] In one embodiment, calculating the distance from the train to the image target for the image target in each group of two-dimensional image information according to the binocular recognition algorithm, including: determining the three-dimensional coordinate information of the image target according to the two-dimensional image in each group of two-dimensional image information; obtaining the transformation matrix and translation vector between the camera coordinate system of the left camera and the camera coordinate system of the right camera according to the installation position of the camera; obtaining the transformation relationship between the two coordinate systems according to the transformation matrix and translation vector, and determining the corresponding relationship of the projection points on the imaging planes of the two cameras based on the transformation relationship; calculating the coordinates of the image target according to the three-dimensional coordinate information of the image target and the corresponding relationship of the projection points; wherein, the coordinates of the image target include the coordinates in the camera coordinate system of the left camera and the coordinates in the camera coordinate system of the right camera; and calculating the distance information from the train to the image target according to the coordinates of the image target and the relative position relationship between the camera and the train based on the binocular recognition algorithm.
[0094] Specifically, referring to Figure 4 the schematic diagram of binocular recognition ranging (binocular vision recognition) shown in Figure 4 wherein the "left camera" and "right camera" respectively represent the cameras corresponding to the 2 two-dimensional images, and the optical centers of the cameras are both located at the center position of the imaging plane. Among them, the camera coordinate system of the left camera is O l -X l Y l Z l, the image coordinate system is O l,xy -x l y l , and the focal length is f l ; the camera coordinate system of the right camera is O r -X r Y r Z r , the image coordinate system is O r,xy -x r y r , and the focal length is f r . Figure 4 In " Figure 4 ", "P" represents the image target point beside the track, and the coordinates of the target point P in the image under the two camera coordinate systems are (X l , Y l , Z l ) and (X r , Y r , Z r ). Figure 4 In " Figure 4 ", "p l " and "p r " respectively represent the image positions where the target point P is imaged in the left and right cameras, and their coordinates in the left and right imaging coordinate systems are (x l , y l ) and (x r , y r ).
[0095] Specifically, according to the installation positions of the cameras, the transformation matrix R and the translation vector T between the two coordinate systems can be obtained as follows:
[0096]
[0097] The transformation relationship between the two coordinate systems is as follows:
[0098]
[0099] The corresponding relationship between the projection points on the imaging planes of the left and right cameras can be obtained:
[0100]
[0101] Furthermore, taking the left camera as the reference, the coordinate relationship of p in its camera coordinate system can be calculated as follows:
[0102] Z l = f l (f r T 1 -x r T 3 ) / (x r (R 31 x l + R32 y l +R 33 f l ) - f r (R 11 x l +R 12 y l +R 13 f l ))
[0103] X l =Z l x l / f l
[0104] Y l =Z l y l / f l
[0105] Furthermore, the distance between p and the train (the distance information from the train to the image target) can be calculated based on the coordinates of p and the relative position relationship between the camera and the train. The image target data information (including the coordinates of the image target and the distance information from the train to the image target) obtained by each group of binocular recognition is respectively sent to the train position calculation module.
[0106] In one embodiment, obtaining the line electronic map information and obtaining the train position based on the image target parameter information and the line electronic map information includes: eliminating abnormal data based on the Grubbs criterion according to the support degree of the image target parameter information to obtain the processed image target parameter information; calculating the distance measurement value between the train and the image target by using the average weighted method according to the processed image target parameter information; obtaining the line electronic map information; and obtaining the train position based on the distance measurement value between the train and the image target and the line electronic map information.
[0107] In one embodiment, obtaining the train position based on the distance measurement value between the train and the image target and the line electronic map information includes: searching for the Boolean variable in the processed image target parameter information to determine whether the image target is unique; when the image target is unique, searching in the line electronic map information according to the identity identifier in the processed image target parameter information to determine the electronic map data corresponding to the image target; determining the absolute mileage position of the image target in the line according to the electronic map data; and calculating the train position according to the distance measurement value between the train and the image target and the absolute mileage position.
[0108] Specifically, distance calculation based on the Grubbs criterion: Given that there may be random errors in the distance between the train and the target calculated by binocular recognition, the abnormal data in the distance information of the m groups of image targets at the same moment is eliminated based on the Grubbs criterion, and the abnormal values are replaced according to the support degree.
[0109] Exemplarily, denote the distance measurement values of the i-th and j-th groups at a certain moment as l i and l j , and their correlation is R ij , where i, j = {1, 2..., m} and i ≠ j, and there is:
[0110]
[0111] Among the m groups of distance measurement values, the calculated correlation values of the a-th and b-th (a, b = {1, 2..., m} and a ≠ b) groups are the largest. Normalize the correlation of the data results:
[0112]
[0113] Obviously, 0 ≤ r ij ≤ 1, the smaller r ij , the higher the correlation and the greater the support degree. When the two groups of distance values are the same, then r ij = 0. Let the support degree function be S ij = 1 - r ij , and construct a support degree matrix S:
[0114]
[0115] where S ij = S ji , and the support degree between the i-th group of distance measurement values and other groups of distance measurement values is S i .
[0116]
[0117] In an example, replace the abnormal data with the data with the highest support degree, and repeat the inspection until there is no abnormal data. Here, the distance measurement value l ob between the train and the target in the image can be calculated by using the average weighted method.
[0118] In this embodiment, the distance is calculated by binocular recognition parallax, effectively avoiding the problems of missing data information, poor accuracy in monocular recognition, and poor real-time performance in multiocular recognition data processing. Further, the weighted algorithm (using the average weighted method) is integrated to improve the accuracy of train positioning calculation.
[0119] Specifically, train autonomous positioning: Refer to Figure 5The basic process of train autonomous positioning shown in the figure is as follows. The image processing module controls the on-vehicle camera to capture images at a period of Δt, processes the collected images, and transmits the image processing information at any time t to the train position calculation module. The train position calculation module calculates the corresponding distance measurement value l between the train and the target in the image. ob (t).
[0120] Exemplarily, when the train has no initial position, it is required that the image target information provided by the image processing module contains an image target that can be matched with the information in the line electronic map, that is, an image target with uniqueness is required. The train position calculation module first determines whether the corresponding image target has uniqueness by searching for the Ob.b value in the image target information, and further searches for M in the line electronic map information that matches Ob.id ob .id, and determines the data of the corresponding image target in the base map to obtain the absolute mileage position S of the target in the line. ob , and then combines the distance l between the train and the target ob to calculate the position S of the train at this moment v (t) = S ob + l ob (t).
[0121] Exemplarily, the next moment of the train's operation is t + Δt. If there is an image target in the collected image information that can be matched with the information in the line electronic map, the train position S v (t + Δt) = S ob + l ob (t + Δt). If there is no image target in the collected image information that can be matched with the information in the line electronic map, then the train position S v (t + Δt) = S v (t) + Δl, where Δl is the displacement of the train within the period Δt, which can be calculated by the difference between the distances of the train to the image target in two calculations within the period Δt, Δl = l ob (t) - l ob (t + Δt). Based on this, the real-time speed v of the train can also be calculated as v = Δl / Δt.
[0122] It should be noted that since the acquisition of image targets is sequential, in a certain scenario, the absolute mileage position of the non-unique image target obtained can also be calculated by combining the electronic map information according to the order of the acquired image targets and adding a certain verification algorithm. In an example, there is a unique image target (ID denoted as id 1 ) and non-unique targets at subsequent positions (ID denoted as id 2 ) in the image information obtained by the train at a certain moment, and id is still obtained at the next moment 2When there is no non-unique target of the same type nearby, the specific location of the target can be determined according to the ID in the electronic map 1 and the ID 2 The ID difference in the data can clarify the specific location of the target. In another example, the combination of multiple image target types in the image (for example, there is only one speed limit sign behind the signal machine at a certain location along the whole line, and there is a civil air defense door behind the speed limit sign) is unique along the whole line. By searching the data information in the electronic map, the corresponding ID can also be obtained, and then the position mileage in the line can be obtained for the calculation and update of the absolute position of the train.
[0123] This embodiment provides a train positioning method based on binocular vision, including: simultaneously obtaining the original two-dimensional images of the same image target along the track based on an image acquisition device; performing image processing and recognition on the original two-dimensional images to obtain processed data; performing majority voting determination according to the processed data to obtain a two-dimensional image with correct image target determination; performing binocular recognition parallax measurement according to the two-dimensional image with correct image target determination to obtain image target parameter information; obtaining the information of the line electronic map, and obtaining the train position based on the image target parameter information and the line electronic map information. In the traditional train positioning technical solution, a large number of trackside electronic devices need to be arranged, which has problems such as many fault points, low recovery efficiency after faults, high construction costs, and large maintenance workloads. In this embodiment, there is no need to rely on these trackside electronic devices. The image target images on the running line are obtained through on-vehicle cameras, and the majority voting image target confirmation method effectively guarantees the correctness of target recognition; the distance is measured through binocular recognition parallax, effectively avoiding the problems of missing data information, poor accuracy in monocular recognition, and poor real-time data processing in multiocular recognition, and further fusing the weighted algorithm to improve the accuracy of train positioning calculation. Using the method described in this embodiment can reduce the installation, construction, and maintenance costs of trackside equipment while ensuring the accuracy of train positioning.
[0124] In addition, an embodiment of the present invention also provides a storage medium, on which a train positioning program based on binocular vision is stored. When the train positioning program based on binocular vision is executed by a processor, the steps of the train positioning method based on binocular vision described above are implemented.
[0125] Refer to Figure 6 , Figure 6 which is a structural block diagram of an embodiment of the train positioning system based on binocular vision of the present invention.
[0126] As Figure 6 shown, the train positioning system based on binocular vision includes:[[]]
[0127] An image acquisition module 10, configured to simultaneously obtain the original two-dimensional images of the same image target along the track based on an image acquisition device;
[0128] The image processing module 20 is configured to perform image processing and recognition on the original two-dimensional image to obtain processed data;
[0129] The image processing module 20 is further configured to perform a majority vote determination based on the processed data to obtain a two-dimensional image with correct determination of the image target;
[0130] The image processing module 20 is further configured to perform binocular recognition parallax measurement based on the two-dimensional image with correct determination of the image target to obtain image target parameter information;
[0131] The train position calculation module 30 is configured to obtain line electronic map information and obtain the train position based on the image target parameter information and the line electronic map information.
[0132] In one embodiment, the image target includes devices and signs located along the track and signs providing train operation information:
[0133] The image acquisition devices are arranged at different positions at the end of the train, and the number of the image acquisition devices is 2n + 1; where n is a positive integer.
[0134] Specifically, the train positioning system based on binocular vision performs positioning based on image target detection and binocular recognition distance measurement. As Figure 7 shown, the train positioning system based on binocular vision includes image acquisition devices such as high-speed cameras, an image processing module, a train position calculation module, and on-vehicle ATP / ATO. In this embodiment, the method of simulating binocular observation of an object is adopted, and high-speed cameras arranged at different positions at the end of the train are used to simultaneously capture the same target along the track, obtain images of the target from different perspectives and transmit them to the image processing module for computer image processing, identify the image target feature information and the three-dimensional position information between the train and the image target, and further calculate the accurate train position through the train position calculation module, thereby completing train positioning.
[0135] Exemplarily, the high-speed camera is an on-vehicle device for collecting images along the train operation track. 2n + 1 (n is a positive integer) high-speed cameras are respectively arranged at the head and tail of the train. The positions of the arranged high-speed cameras are fixed relative to the train and can be acquired by the image processing module, and a certain distance needs to be maintained between two cameras to obtain images of the image target from different perspectives. Figure 7 The "high-speed camera" in is multiple devices arranged at the end of the train for obtaining images of the image target along the line from different perspectives, and the positions of each camera are relatively fixed; in this embodiment, the method of majority vote is adopted to screen the scheme for correctly identifying the image target, so the number of cameras is 2n + 1.
[0136] Exemplarily, as Figure 7 shown,Figure 7 The "image targets along the line" herein refer to pre-defined devices and identification plates that have been set beside the track, including but not limited to signal lights, turnouts, point machines, civil air defense doors, flood prevention doors, fans, signal light tags, turnout tags, mileage markers, speed limit signs, etc.; the "image targets along the line" can also be identification plates specifically set beside the track for providing train operation information.
[0137] Exemplarily, as Figure 7 shown, the image processing module can be set in the on-vehicle safety computer to provide clock correction information for the on-vehicle high-speed cameras, ensuring the real-time synchronization of the shots taken by each high-speed camera; meanwhile, periodically process the two-dimensional images (original two-dimensional images) transmitted by different high-speed cameras at the same moment and perform target recognition, and group these images in pairs to obtain m groups of two-dimensional image information, and use parallax to calculate the three-dimensional spatial information of the image targets, and obtain the position of the targets in each group of images and the distance information from the train.
[0138] Exemplarily, as Figure 7 shown, the train position calculation module is set in the on-vehicle safety computer, and is used to receive the target position and the distance information from the train transmitted by the image processing module, and calculate accurate and reliable train position information by using a fusion algorithm in combination with the line electronic map parameters (line electronic map information) provided by the on-vehicle ATP / ATO equipment.
[0139] Exemplarily, as Figure 7 shown, the on-vehicle ATP / ATO equipment stores a line electronic map and has functions of train speed protection and train running speed control. The line electronic map stores the parameters of the line and the image target parameters with uniqueness.
[0140] It should be noted that in the existing on-vehicle line electronic map model (line electronic map), the image target parameter information along the line needs to be supplemented for train position calculation. These image target parameter information along the line at least include the ID of the image target, the three-dimensional coordinate information in the line, whether it has uniqueness, and the type. The image target ID is represented by id, which is the sequential number of the image targets along the running direction of the line, and the maximum value of the number is determined by the total number n of the image targets ob ; the three-dimensional coordinate is the position point information p = {(x, y, z)|x ∈ R, y ∈ R, z ∈ R}, and the values of x, y, and z are determined by the line coordinate system; whether it has uniqueness is a Boolean variable b; the type ty value is preset according to the types of image targets. For example: the signal light sign is 0, the turnout sign is 1, the mileage marker is 2, the civil air defense door is 3, the special identification plate A is 4, etc. This embodiment does not limit this.
[0141] Exemplarily, the image targets in the line electronic map are represented by a multi-dimensional array M obIt is indicated that at least 4 pieces of data {id, p, b, ty} should be included. Among them, id = (0, 1, 2..., n ob -1); p ∈ P, where P represents the set of three-dimensional coordinates of the image target in the line coordinate system; b = (0, 1), 1 represents unique, and 0 represents non-unique; ty = (0, 1, 2..., n ty -1), n ty represents the total number of preselected image target types.
[0142] Exemplarily, the image target data information (processed data) transmitted by the image processing module to the position calculation module is represented by a multi-dimensional array Ob, which should at least include 4 pieces of data {id, l, b, ty}. Among them, id is only assigned when an image target with uniqueness is recognized, and is empty at other times. id matches the information in the on-vehicle line electronic map; l represents the distance information from the train to the image target calculated based on binocular recognition, and is an array containing each element; b = (0, 1), 1 represents unique, and 0 represents non-unique; ty = (0, 1, 2..., n ty -1), n ty represents the total number of preselected image target types.
[0143] In this embodiment, the relative distance between the train and the image target can be obtained in real time through binocular recognition. Using the parameters of the image target with uniqueness recognized, the initial absolute mileage information of the train in the line can be calculated, and then the train position information can be calculated through the absolute position and the relative position; the distance information obtained through multiple groups of binocular vision is weighted and fused to ensure the accuracy of train position calculation.
[0144] This embodiment proposes a train positioning system based on binocular vision. This system does not need to rely on these trackside electronic devices. It obtains the image target images on the running line through on-vehicle cameras, and effectively ensures the correctness of target recognition by using the majority voting image target confirmation method; it calculates the distance through binocular recognition parallax, effectively avoiding the problems of missing data information, poor accuracy in monocular recognition, and poor real-time performance in multiocular recognition data processing, and further fuses the weighted algorithm to improve the accuracy of train positioning calculation. Using the system described in this embodiment can reduce the installation, construction and maintenance costs of trackside equipment while ensuring the accuracy of train positioning.
[0145] It should be noted that for the technical details not described in detail in this embodiment of the train positioning system based on binocular vision, reference can be made to the application of the train positioning method based on binocular vision as described above provided in any embodiment of the present invention, which will not be elaborated here.
[0146] It should be understood that the above is only for illustration and does not constitute any limitation to the technical solution of the present invention. In specific applications, those skilled in the art can set according to needs, and the present invention does not make any restrictions in this regard.
[0147] It should be noted that the above-described workflow is only illustrative and does not limit the protection scope of the present invention. In actual applications, those skilled in the art can select some or all of them according to actual needs to achieve the purpose of the solution of this embodiment, and no restrictions are made here.
[0148] In addition, it should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without more limitations, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or system including that element.
[0149] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0150] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as a read-only memory (ROM) / RAM, magnetic disk, optical disk), and includes several instructions to enable a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0151] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. A train positioning method based on binocular vision, characterized in that: include: Based on the image acquisition device, the original two-dimensional image of the same image target along the track is simultaneously obtained; Performing image processing and recognition on the original two-dimensional image to obtain processed data; Perform majority voting based on the processed data to obtain a two-dimensional image with correct image target determination; Determine the correct two-dimensional image based on the image target and perform binocular recognition parallax measurement to obtain image target parameter information; The electronic map information of the line is obtained, and the train position is obtained based on the image target parameter information and the electronic map information of the line.
2. The method according to claim 1, characterized in that The performing image processing and recognition on the original two-dimensional image to obtain processed data includes: Trackside equipment and signboards are taken as image target objects, and the image target objects are classified and marked to obtain image target samples along the track; Training a target recognition model based on the image target samples to obtain a trained target recognition model; The original two-dimensional image is recognized and processed according to the trained target recognition model to obtain processed data; wherein the processed data includes the two-dimensional image and the corresponding multivariate array.
3. The method according to claim 1, characterized in that The method of performing majority voting according to the processed data to obtain a two-dimensional image with correct image target determination includes: Set the preset train positioning accuracy; Get the accuracy of the trained target recognition model; Obtaining constraint conditions based on the preset train positioning accuracy and the accuracy of the trained target recognition model; The processed data are judged by majority voting according to the constraint conditions to obtain a two-dimensional image with correct image target judgment.
4. The method according to claim 1, characterized in that The method of performing binocular recognition parallax measurement on the correct two-dimensional image according to the image target to obtain image target parameter information includes: Combining two by two the two-dimensional images with correct image target determination to obtain multiple groups of two-dimensional image information; wherein the two-dimensional image information includes two-dimensional images and corresponding multi-element arrays; The distance between the image target in each set of two-dimensional image information is calculated according to the binocular recognition algorithm to obtain the distance information between the train and the image target; Assigning the distance information from the train to the image target to the distance information of the multi-element array; The image target data information is obtained according to the coordinates of the image target and the distance information from the train to the image target.
5. The method according to claim 4, characterized in that The step of calculating the distance between the image target in each set of two-dimensional image information according to the binocular recognition algorithm to obtain the distance information between the train and the image target includes: Determine three-dimensional coordinate information of an image target according to the two-dimensional image in each set of two-dimensional image information; According to the installation positions of the cameras, a transformation matrix and a translation vector between the camera coordinate system of the left camera and the camera coordinate system of the right camera are obtained; Obtaining a transformation relationship between two coordinate systems according to the transformation matrix and the translation vector, and determining a corresponding relationship between projection points on the phase plane of two cameras based on the transformation relationship; Calculating the coordinates of the image target according to the correspondence between the three-dimensional coordinate information of the image target and the projection point; wherein the coordinates of the image target include the coordinates in the camera coordinate system of the left camera and the coordinates in the camera coordinate system of the right camera; Based on the coordinates of the image target and the relative position relationship between the camera and the train, the distance information from the train to the image target is calculated according to the binocular recognition algorithm.
6. The method according to any one of claims 1 to 5, characterized in that The acquiring of line electronic map information, and obtaining the train position based on the image target parameter information and the line electronic map information, includes: Based on the Grubbs criterion, abnormal data is eliminated according to the support of the image target parameter information to obtain processed image target parameter information; Calculating the distance measurement value between the train and the image target according to the processed image target parameter information by using an average weighted method; Get route electronic map information; The train position is obtained based on the distance measurement value between the train and the image target and the line electronic map information.
7. The method according to claim 6, characterized in that The obtaining of the train position based on the distance measurement value between the train and the image target and the line electronic map information includes: Searching for a Boolean variable in the processed image target parameter information to determine whether the image target is unique; When the image target is unique, searching in the route electronic map information according to the identity in the processed image target parameter information to determine the electronic map data corresponding to the image target; Determine the absolute mileage position of the image target on the route according to the electronic map data; The train position is calculated based on the distance measurement value between the train and the image target and the absolute mileage position.
8. A train positioning system based on binocular vision, characterized in that: include: An image acquisition module, used for simultaneously acquiring original two-dimensional images of the same image target along the track based on an image acquisition device; An image processing module, used for performing image processing and recognition on the original two-dimensional image to obtain processed data; The image processing module is also used to perform majority voting based on the processed data to obtain a two-dimensional image with correct image target determination; The image processing module is also used to determine the correct two-dimensional image according to the image target, perform binocular recognition parallax measurement, and obtain image target parameter information; The train position calculation module is used to obtain line electronic map information and obtain the train position based on the image target parameter information and the line electronic map information.
9. The system according to claim 8, characterized in that The image targets include equipment and signs along the track and signs providing train operation information: The image acquisition devices are arranged at different positions at the end of the train, and the number of the image acquisition devices is 2n+1; wherein n is a positive integer.
10. An electronic device, characterized in that: The electronic device includes: a memory, a processor, and a binocular vision-based train positioning program stored in the memory and executable on the processor, wherein the binocular vision-based train positioning program is configured to implement the binocular vision-based train positioning method as described in any one of claims 1 to 7.