A method and device for trackside train ranging
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-22
- Publication Date
- 2026-08-14
AI Technical Summary
[0003](1)部署较为复杂,价格较高;
[0035]轨旁列车测距方法、系统、电子设备以及计算机可读存储介质,取得了如下有益效果:
Smart Images

Figure CN115761641B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of rail transit and ranging technology, and in particular to a method and system for ranging trains based on a monocular trackside monitoring camera. Background Technology
[0002] Existing trackside train ranging devices typically use binocular cameras or lidar, which present the following technical problems:
[0003] (1) Deployment is relatively complex and the price is relatively high;
[0004] (2) The maximum measurement distance is limited, restricting the application scenarios;
[0005] (3) When using direct measurement, the error of binocular camera or lidar will be transmitted to the measurement section and amplified. Summary of the Invention
[0006] This disclosure addresses the above problems by providing a trackside train ranging method and system based on a monocular trackside monitoring camera. The method uses a monocular trackside monitoring camera, trains a train front-end recognition network with prior train appearance information, and combines prior train size information and imaging geometry methods to achieve ranging of trains with known appearances passing on the track.
[0007] According to a first aspect of this disclosure, a trackside train ranging method is provided, comprising:
[0008] S1, Construct a train front-end recognition dataset, including: collecting image data of the front-end appearance of various known train models and labeling them to obtain a labeled train front-end recognition dataset;
[0009] S2, Construct a deep neural network for train front-end recognition, including: obtaining a deep neural network for train front-end recognition based on the labeled train front-end recognition dataset and the neural network training;
[0010] S3, extract key points at the front end of the train under test, including: obtaining an image of the train on track within the field of view of a monocular monitoring camera, and inputting the image into the deep neural network for train front end recognition to extract key points at the front end of the train under test.
[0011] S4, obtaining the distance between the train under test and the monocular monitoring camera, including: calculating the position of the front key point of the train based on the extracted front key point of the train under test, and obtaining the distance between the train under test and the monocular monitoring camera based on the position of the front key point of the train.
[0012] As described above and in any possible implementation, a further implementation is provided, wherein S1 includes:
[0013] S11. Images of the front end of the train under test are collected under different weather and lighting conditions. The number of images collected is determined according to the detection accuracy requirements.
[0014] S12, Based on the front-end image of the train under test, label the key points of the front-end of the train in the image and attach them to the front-end image of the train under test to form a labeled train front-end recognition dataset.
[0015] In addition to the aspects and any possible implementations described above, a further implementation is provided, wherein S2 constructs a deep neural network for train front-end recognition, comprising: obtaining a deep neural network for train front-end recognition based on the labeled train front-end recognition dataset and the neural network training, including:
[0016] S21. Based on the target recognition accuracy requirements and computational complexity requirements, the original deep neural network model for train front-end recognition is selected.
[0017] S22, the original deep neural network model for train front-end recognition is injected into the labeled train front-end recognition dataset, and hyperparameters are selected for training to obtain a deep neural network for train front-end recognition.
[0018] In addition to the aspects and any possible implementations described above, an implementation is further provided in which S3 includes:
[0019] S31, monitor whether the train on track enters the field of view of the monocular monitoring camera; and trigger the monocular monitoring camera to obtain an image of the train on track within the field of view of the camera based on whether the train has entered the field of view of the monocular monitoring camera.
[0020] S32, input the image into the deep neural network for train front-end recognition to extract key points of the front end of the tested train.
[0021] In addition to the aspects and any possible implementations described above, a further implementation is provided in which S4 acquiring the distance between the train under test and the monocular monitoring camera includes:
[0022] S41, Based on the deep neural network for train front-end recognition, obtain geometric information of the front-end contour of the train under test, including: obtaining the position coordinates of several points on the front-end surface of the train under test in the coordinate system of a monocular monitoring camera; obtaining the position coordinates of the projection of several points on the front-end surface of the train under test in the pixel coordinate system; and expanding the position coordinates of the projection in the pixel coordinate system to homogeneous coordinates based on the depth scale factor of the image.
[0023] S42, obtaining prior train front-end width and height dimensions as geometric constraint information for key points of the train front end, including: for the train front-end pixel area obtained by neural network detection, selecting the outermost pixel of the train front end; based on the inherent characteristics of the outermost pixel, obtaining the geometric constraint relationship of the outermost pixel in the camera coordinate system to construct a system of equations for solving the scale factor; the geometric constraint relationship includes train width constraint, train height constraint, and four-point coplanar constraint;
[0024] S43, based on the geometric information of the front contour of the train under test, the geometric constraint information, and the camera imaging geometry principle, calculate the depth scale factor of the image, and then solve the position coordinates of the key points of the front of the train under test in the camera reference frame to obtain the distance between the train under test and the monocular monitoring camera; wherein, the camera projection principle includes: associating the homogeneous coordinates with the position coordinates in the pixel coordinate system through the camera intrinsic parameter matrix; the elements of the camera intrinsic parameter matrix include normalized focal length, tangential distortion, and principal point coordinates, which are obtained through prior camera intrinsic parameter calibration.
[0025] According to a second aspect of this disclosure, a trackside train ranging system is provided, comprising:
[0026] The dataset construction module is used to build a train front-end recognition dataset, including: collecting image data of the front-end appearance of various known train models and labeling them to obtain a labeled train front-end recognition dataset;
[0027] The identification network construction unit is used to construct a deep neural network for train front-end identification, including: obtaining a deep neural network for train front-end identification based on the labeled train front-end identification dataset and neural network training;
[0028] The key point extraction unit is used to extract key points of the front end of the train under test, including: obtaining an image of the on-track train within the field of view of a monocular monitoring camera, and inputting the image into the deep neural network for train front end recognition to extract key points of the front end of the train under test.
[0029] The ranging unit is used to obtain the distance between the train under test and the monocular monitoring camera, including: calculating the position of the front key point of the train based on the extracted front key point of the train under test, and obtaining the distance between the train under test and the monocular monitoring camera based on the position of the front key point of the train.
[0030] In addition to the aspects described above and any possible implementations, a further implementation is provided in which the monocular surveillance camera is a monocular surveillance camera with infrared night vision capability.
[0031] According to a third aspect of this disclosure, a train is provided, including the trackside train ranging system described in the second aspect.
[0032] According to a fourth aspect of this disclosure, an electronic device is provided, including a processor and a memory, the memory storing a plurality of instructions, the processor being configured to read the instructions and execute the method as described in the first aspect.
[0033] According to a fifth aspect of this disclosure, a computer-readable storage medium is provided that stores a plurality of instructions which can be read by a processor and executed as described in the first aspect.
[0034] The beneficial effects of this invention are:
[0035] The trackside train ranging method, system, electronic equipment, and computer-readable storage medium have achieved the following beneficial effects:
[0036] (1) By using prior information about the train's exterior to train the recognition network of key points at the front of the train, the technical effect of accurate distance measurement was achieved, and the level of intelligence in distance measurement was improved.
[0037] (2) Geometric constraint information of key points at the front end of the train is provided by using prior information on train dimensions, thereby improving the efficiency of distance measurement;
[0038] (3) Only a monocular camera is used to measure the distance of the train on this track, without the need for other sensors such as lidar and millimeter-wave radar, which reduces the cost and installation difficulty of ranging and effectively reduces the limitation of the ranging range.
[0039] (4) To meet the needs of low visibility scenarios such as nighttime, the device described in this invention can be implemented using a camera with infrared night vision function, thus expanding the scope of application of the solution.
[0040] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0041] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of this disclosure. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:
[0042] Figure 1 A flowchart of a trackside train ranging method according to an embodiment of the present disclosure is shown;
[0043] Figure 2 A schematic diagram of dataset annotation for a trackside train ranging method according to an embodiment of the present disclosure is shown;
[0044] Figure 3 A schematic diagram illustrating the imaging principle of a trackside monitoring camera in a trackside train ranging method according to an embodiment of the present disclosure is shown.
[0045] Figure 4 A schematic diagram of an electronic device structure according to an embodiment of the present disclosure is shown. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0047] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0048] Example 1
[0049] See Figure 1 A trackside train ranging method, comprising:
[0050] S1, Construct a train front-end recognition dataset, including: collecting image data of the front-end appearance of various known train models and labeling them to obtain a labeled train front-end recognition dataset;
[0051] S2, Construct a deep neural network for train front-end recognition, including: obtaining a deep neural network for train front-end recognition based on the labeled train front-end recognition dataset and the neural network training;
[0052] S3, extract key points at the front end of the train under test, including: obtaining an image of the train on track within the field of view of a monocular monitoring camera, and inputting the image into the deep neural network for train front end recognition to extract key points at the front end of the train under test.
[0053] S4, obtaining the distance between the train under test and the monocular monitoring camera, including: calculating the position of the front key point of the train based on the extracted front key point of the train under test, and obtaining the distance between the train under test and the monocular monitoring camera based on the position of the front key point of the train.
[0054] As described above and in any possible implementation, a further implementation is provided, wherein S1 includes:
[0055] S11. Images of the front end of the train under test are collected under different weather and lighting conditions. The number of images collected is determined according to the detection accuracy requirements.
[0056] S12, Based on the front-end image of the train under test, key points of the train's front end in the image are labeled to form tags that are attached to the front-end image of the train under test, thus forming a labeled train front-end recognition dataset; see [link to documentation]. Figure 2 (a) and (b) are, respectively, an unlabeled image of the north-facing train front end and a portion of a labeled train front end recognition dataset formed after the annotation points A, B, C, and D at the upper left, upper right, lower left, and lower right corners of the train front end.
[0057] In addition to the aspects and any possible implementations described above, a further implementation is provided, wherein S2 constructs a deep neural network for train front-end recognition, comprising: obtaining a deep neural network for train front-end recognition based on the labeled train front-end recognition dataset and the neural network training, including:
[0058] S21. Based on the target recognition accuracy requirements and computational complexity requirements, select deep neural network models such as convolutional neural networks (CNN) or combine them with other common neural network models as the original deep neural network model for train front-end recognition.
[0059] S22, the original deep neural network model for train front-end recognition is injected into the labeled train front-end recognition dataset, and appropriate hyperparameters are selected for training to obtain a deep neural network for train front-end recognition.
[0060] As described above and in any possible implementation, a further implementation is provided, wherein S3, extracting key points at the front end of the train under test, includes: obtaining an image of the on-track train within the field of view of a monocular monitoring camera, and inputting the image into the train front end recognition deep neural network to extract key points at the front end of the train under test, including:
[0061] S31, monitor whether the train on track enters the field of view of the monocular monitoring camera; and trigger the monocular monitoring camera to obtain an image of the train on track within the field of view of the camera based on whether the train has entered the field of view of the monocular monitoring camera.
[0062] S32, input the image into the deep neural network for train front-end recognition to extract key points of the front end of the tested train.
[0063] In addition to the aspects and any possible implementations described above, a further implementation is provided in which S4 acquiring the distance between the train under test and the monocular monitoring camera includes:
[0064] S41, Based on the deep neural network for train front-end recognition, obtain geometric information of the front-end contour of the train under test, including: obtaining the position coordinates of several points on the front-end surface of the train under test in the coordinate system of a monocular monitoring camera; obtaining the position coordinates of the projection of several points on the front-end surface of the train under test in the pixel coordinate system; and expanding the position coordinates of the projection in the pixel coordinate system to homogeneous coordinates based on the depth scale factor of the image.
[0065] S42, obtaining prior train front-end width and height dimensions as geometric constraint information for key points of the train front end, including: for the train front-end pixel area obtained by neural network detection, selecting the outermost pixel of the train front end; based on the inherent characteristics of the outermost pixel, obtaining the geometric constraint relationship of the outermost pixel in the camera coordinate system to construct a system of equations for solving the scale factor; the geometric constraint relationship includes train width constraint, train height constraint, and four-point coplanar constraint;
[0066] S43, based on the geometric information of the front contour of the train under test, the geometric constraint information, and the camera imaging geometry principle, calculate the depth scale factor of the image, and then solve the position coordinates of the key points of the front of the train under test in the camera reference frame to obtain the distance between the train under test and the monocular monitoring camera; wherein, the camera projection principle includes: associating the homogeneous coordinates with the position coordinates in the pixel coordinate system through the camera intrinsic parameter matrix; the elements of the camera intrinsic parameter matrix include normalized focal length, tangential distortion, and principal point coordinates, which are obtained through prior camera intrinsic parameter calibration.
[0067] See Figure 3 The imaging principle of the trackside monitoring camera is shown.
[0068] like Figure 3 As shown, there is a camera reference frame at the optical center of the lens of the trackside monitoring camera, with its origin at point O. Its x, y, and z axes point to the sky, to the right along the horizontal line perpendicular to the track, and forward along the track, respectively. There is also a pixel reference frame on the plane where the camera sensor is located, with its origin at point Q. Its u and v axes are along the upper and left edges of the sensor (viewed from the lens direction), respectively.
[0069] For points A, B, C, and D on the front surface of the train, let their position coordinates in the camera coordinate system be S... i =(x i ,y i ,z i ) T Let i ∈ {A, B, C, D}. Let their projections in the pixel coordinate system be points A', B', C', and D', respectively, and their position coordinates in the pixel coordinate system be s. i =(u i ,v i ) TTo facilitate subsequent depth calculations, we assume that the image has a depth scale factor. and s i =(u i ,v i ) T Extended to homogeneous position coordinates
[0070] Make
[0071] According to the principle of camera projection, the coordinates of a point in the camera reference frame and the coordinates in the pixel reference frame have the following relationship:
[0072]
[0073] Where K is the camera intrinsic parameter matrix.
[0074]
[0075] Where f x f y Let be the normalized focal length, s be the tangential distortion, and (u0, v0) be the focal length. T The coordinates of the main point can be obtained through prior camera intrinsic parameter calibration.
[0076] For the train front pixel region obtained by neural network detection, the outermost pixel is selected, and its geometric constraints in the camera coordinate system are obtained based on its inherent characteristics to construct a solution for the scale factor. The system of equations. Geometric constraints that provide information include train width constraints, train height constraints, and four-point coplanar constraints.
[0077] For points A, B, C, and D on the front surface of the train, the following relationship can be constructed as constraint conditions based on the known train width W and height H.
[0078]
[0079] By solving equations (1), (2), and (3) simultaneously, the depth scale factor can be obtained. Then, the position coordinates S of the key points at the front of the train in the camera reference frame are solved. i =(x i ,y i ,z i ) T This gives us the distance between the train and the camera.
[0080] Example 2
[0081] A trackside train ranging system, comprising:
[0082] The dataset construction module is used to build a train front-end recognition dataset, including: collecting image data of the front-end appearance of various known train models and labeling them to obtain a labeled train front-end recognition dataset;
[0083] The identification network construction unit is used to construct a deep neural network for train front-end identification, including: obtaining a deep neural network for train front-end identification based on the labeled train front-end identification dataset and neural network training;
[0084] The key point extraction unit is used to extract key points of the front end of the train under test, including: obtaining an image of the on-track train within the field of view of a monocular monitoring camera, and inputting the image into the deep neural network for train front end recognition to extract key points of the front end of the train under test.
[0085] The ranging unit is used to obtain the distance between the train under test and the monocular monitoring camera, including: calculating the position of the front key point of the train based on the extracted front key point of the train under test, and obtaining the distance between the train under test and the monocular monitoring camera based on the position of the front key point of the train.
[0086] To meet the needs of low visibility scenarios such as nighttime, a monocular surveillance camera with infrared night vision function can be used to implement the above system.
[0087] Figure 4 As shown, the present invention also provides an electronic device, including a processor 301 and a memory 302 connected to the processor 301. The memory 302 stores a plurality of instructions, which can be loaded and executed by the processor to enable the processor to perform the method described in Embodiment 2.
[0088] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0089] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0090] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0091] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide 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 sound input, voice input, or tactile input).
[0092] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0093] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0094] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0095] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. 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 principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A trackside train distance measurement method, characterized in that, include: S1, Construction The train front-end recognition dataset includes: collecting image data of the front-end appearance of various known train models and labeling them to obtain a labeled train front-end recognition dataset; wherein, S1 includes: S11. Images of the front end of the train under test are collected under different weather and lighting conditions. The number of images collected is determined according to the detection accuracy requirements. S12, Based on the front-end image of the train under test, label the key points of the front-end of the train in the image and attach them to the front-end image of the train under test to form a labeled train front-end recognition dataset. S2, constructing a deep neural network for train front-end recognition, including: training the deep neural network for train front-end recognition based on the labeled train front-end recognition dataset and the neural network; S2 includes: S21. Based on the target recognition accuracy requirements and computational complexity requirements, the original deep neural network model for train front-end recognition is selected. S22, the original deep neural network model for train front-end recognition is injected into the labeled train front-end recognition dataset, and hyperparameters are selected for training to obtain a deep neural network for train front-end recognition. S3, extracting key points at the front end of the train under test, includes: obtaining an image of the on-track train within the field of view of a monocular monitoring camera, and inputting the image into the deep neural network for train front-end recognition to extract key points at the front end of the train under test; S3 includes: S31, monitor whether the train on track enters the field of view of the monocular monitoring camera; and trigger the monocular monitoring camera to obtain an image of the train on track within the field of view of the camera based on whether the train has entered the field of view of the monocular monitoring camera. S32, Input the image into the train front end recognition deep neural network to extract key points of the front end of the tested train; S4, obtaining the distance between the tested train and the monocular monitoring camera, includes: calculating the position of the front key points of the train based on the extracted front key points of the tested train, and obtaining the distance between the tested train and the monocular monitoring camera based on the position of the front key points of the train; wherein, obtaining the distance between the tested train and the monocular monitoring camera in S4 includes: S41, Based on the deep neural network for train front-end recognition, obtain geometric information of the front-end contour of the train under test, including: obtaining the position coordinates of several points on the front-end surface of the train under test in the coordinate system of a monocular monitoring camera; obtaining the position coordinates of the projection of several points on the front-end surface of the train under test in the pixel coordinate system; and expanding the position coordinates of the projection in the pixel coordinate system to homogeneous coordinates based on the depth scale factor of the image. S42, obtaining prior train front-end width and height dimensions as geometric constraint information for key points of the train front end, including: for the train front-end pixel area obtained by neural network detection, selecting the outermost pixel of the train front end; based on the inherent characteristics of the outermost pixel, obtaining the geometric constraint relationship of the outermost pixel in the camera coordinate system to construct a system of equations for solving the scale factor; the geometric constraint relationship includes train width constraint, train height constraint, and four-point coplanar constraint; S43, based on the geometric information of the front contour of the train under test, the geometric constraint information, and the camera imaging geometry principle, calculate the depth scale factor of the image, and then solve the position coordinates of the key points of the front of the train under test in the camera reference frame to obtain the distance between the train under test and the monocular monitoring camera; wherein, the camera projection principle includes: associating the homogeneous coordinates with the position coordinates in the pixel coordinate system through the camera intrinsic parameter matrix; the elements of the camera intrinsic parameter matrix include normalized focal length, tangential distortion, and principal point coordinates, which are obtained through prior camera intrinsic parameter calibration.
2. A trackside train ranging system, implementing the trackside train ranging method as described in claim 1, characterized in that, include: A dataset construction module is used to construct a train front-end recognition dataset, including: collecting image data of the front-end appearance of various known train models and labeling them to obtain a labeled train front-end recognition dataset; wherein, S1 includes: S11. Images of the front end of the train under test are collected under different weather and lighting conditions. The number of images collected is determined according to the detection accuracy requirements. S12, Based on the front-end image of the train under test, label the key points of the front-end of the train in the image and attach them to the front-end image of the train under test to form a labeled train front-end recognition dataset. A network construction unit for recognizing train front-end recognition, used to construct a deep neural network for train front-end recognition, includes: obtaining a deep neural network for train front-end recognition based on the labeled train front-end recognition dataset and the neural network training; step S2 includes: S21. Based on the target recognition accuracy requirements and computational complexity requirements, the original deep neural network model for train front-end recognition is selected. S22, the original deep neural network model for train front-end recognition is injected into the labeled train front-end recognition dataset, and hyperparameters are selected for training to obtain a deep neural network for train front-end recognition. The key point extraction unit is used to extract key points of the front end of the train under test, including: obtaining an image of the on-track train within the field of view of a monocular monitoring camera, and inputting the image into the deep neural network for train front end recognition to extract key points of the front end of the train under test; S3 includes: S31, monitor whether the train on track enters the field of view of the monocular monitoring camera; and trigger the monocular monitoring camera to obtain an image of the train on track within the field of view of the camera based on whether the train has entered the field of view of the monocular monitoring camera. S32, Input the image into the train front end recognition deep neural network to extract key points of the front end of the tested train; The ranging unit is used to obtain the distance between the tested train and the monocular monitoring camera, including: calculating the position of the front key points of the train based on the extracted front key points of the tested train, and obtaining the distance between the tested train and the monocular monitoring camera based on the position of the front key points of the train; wherein, the step S4 of obtaining the distance between the tested train and the monocular monitoring camera includes: S41, Based on the deep neural network for train front-end recognition, obtain geometric information of the front-end contour of the train under test, including: obtaining the position coordinates of several points on the front-end surface of the train under test in the coordinate system of a monocular monitoring camera; obtaining the position coordinates of the projection of several points on the front-end surface of the train under test in the pixel coordinate system; and expanding the position coordinates of the projection in the pixel coordinate system to homogeneous coordinates based on the depth scale factor of the image. S42, obtaining prior train front-end width and height dimensions as geometric constraint information for key points of the train front end, including: for the train front-end pixel area obtained by neural network detection, selecting the outermost pixel of the train front end; based on the inherent characteristics of the outermost pixel, obtaining the geometric constraint relationship of the outermost pixel in the camera coordinate system to construct a system of equations for solving the scale factor; the geometric constraint relationship includes train width constraint, train height constraint, and four-point coplanar constraint; S43, based on the geometric information of the front contour of the train under test, the geometric constraint information, and the camera imaging geometry principle, calculate the depth scale factor of the image, and then solve the position coordinates of the key points of the front of the train under test in the camera reference frame to obtain the distance between the train under test and the monocular monitoring camera; wherein, the camera projection principle includes: associating the homogeneous coordinates with the position coordinates in the pixel coordinate system through the camera intrinsic parameter matrix; the elements of the camera intrinsic parameter matrix include normalized focal length, tangential distortion, and principal point coordinates, which are obtained through prior camera intrinsic parameter calibration.
3. The trackside train ranging system according to claim 2, characterized in that, The monocular monitoring camera is a monocular monitoring camera with infrared night vision function.
4. A train comprising the trackside train ranging system as described in any one of claims 2-3.
5. An electronic device, characterized in that, It includes a processor and a memory, the memory storing multiple instructions, and the processor for reading the instructions and executing the method as described in claim 1.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions, which can be read by a processor and executed as described in claim 1.
Citation Information
Patent Citations
Monocular vision distance measurement method and device based on computer vision, and electronic equipment
CN110297232A