Image-based train speed and distance measurement method and device
By using infrared band lasers on the train to collect laser interference speckle patterns and perform image processing, the problem of low speed measurement and distance measurement effect in the prior art is solved, and higher speed measurement and distance measurement accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202411634193.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-03-28
AI Technical Summary
In the prior art, data is collected for train speed measurement and distance measurement by combining axle-based speed sensors with radar sensors or accelerometers, but the effect of speed measurement and distance measurement is low.
Using an image-based train speed and distance measurement method, by carrying infrared band lasers on the train to emit irradiation light sources on the section wheels and rails, laser interference speckle patterns are collected, and image processing is performed through image sensors, and the average bit depth difference value is calculated to determine the moving distance and movement speed of the train.
This method does not need to have an adhesion relationship with the wheel and rails, and is not affected by rainwater, water surface or slope. It has a wide adaptability range and high reliability, which effectively improves the accuracy and measurement effect of train speed measurement and distance measurement.
Smart Images

Figure CN119716873A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of rail transit technology, and in particular to an image-based train speed and distance measurement method and device. Background Art
[0002] In the train control system, it is very important to obtain the speed and distance of the train in real time. In the prior art, axle-based speed sensors are often used, and then radar sensors or accelerometers are used to collect information on the speed and distance of the train.
[0003] The use of this matching scheme is mainly to utilize the advantages of each sensor and make up for each other's shortcomings. The speed sensor based on the wheel axle collects accurately, but it depends on the adhesion relationship between the wheel and the rail. That is to say, if the wheel is idling or slipping, the speed sensor will not be able to accurately collect the running information of the train. The radar sensor or accelerometer is a non-contact sensor, which is not affected by the adhesion relationship between the wheel and the rail, but its speed measurement accuracy is poor under low train speed conditions, and the accelerometer also has a drift problem and is easily affected by the slope. Combining multiple sensors together can overcome their own defects to achieve speed and distance measurement functions. However, the wheel axle speed sensor is easily affected by the wheel-rail adhesion relationship, which may cause measurement errors. The wheel axle speed sensor is affected by mechanical vibration, which may cause loose connection and introduce measurement errors. It needs to occupy the axle end of the wheel axle, and it is best to be a non-powered axle, but the actual train may not meet this requirement. The radar sensor may also output the measurement result incorrectly when encountering rain or water. In addition, multi-sensor fusion has high requirements for data processing algorithms, and it is necessary to reasonably match and fuse multiple data to achieve better results. All of the above illustrate that the speed and distance measurement effects of the existing technology matching solutions are low. Summary of the invention
[0004] The present invention provides an image-based train speed and distance measurement method and device, which are used to solve the problem that in the prior art, a speed sensor based on an axle is used in combination with a radar sensor or an accelerometer to collect data for train speed and distance measurement, but the speed and distance measurement effect is low.
[0005] The present invention provides a method for measuring train speed and distance based on an image, the method comprising the following steps: During the running of the train, the infrared laser carried by the train emits an irradiation light source to the wheels and rails of the section, and collects the laser interference speckle formed after the irradiation light source is scattered on the wheels and rails of the section; Using a bandpass filter to filter out stray light based on a preset wavelength band for each frame of the laser interference speckle, to obtain a laser interference speckle pattern; Projecting the laser interference speckle pattern into an image sensor through a lens, and performing image processing on the collected laser interference speckle pattern through the image sensor to obtain a monochromatic image; An average bit depth difference is calculated for two frames of monochrome images at any time interval, and a moving distance and a moving speed of the train are determined based on the average bit depth difference.
[0006] In some embodiments, filtering out stray light based on a preset wavelength band for each frame of the laser interference speckle through a bandpass filter to obtain a laser interference speckle pattern includes: Preset target laser band; For each frame of the laser interference speckle, the remaining laser band components in the laser interference speckle except the target laser band are filtered out by a bandpass filter to obtain a laser interference speckle pattern.
[0007] In some embodiments, the step of performing image processing on the collected laser interference speckle pattern by the image sensor to obtain a monochrome image includes: Preset target color for monochrome images; For the collected laser interference speckle pattern, other color components except the target color are filtered by the image sensor to obtain a corresponding monochrome image.
[0008] In some embodiments, the two frames of monochrome images at any time interval include a first monochrome image and a second monochrome image, and calculating the average bit depth difference value of the two frames of monochrome images at any time interval includes: Using any one of the two monochrome images as a first monochrome image, and using the other monochrome image as a second monochrome image; Fixing the first monochrome image at the origin of the coordinate system, placing the second monochrome image on the fixed first monochrome image, and moving the second monochrome image along the X-axis and the Y-axis of the coordinate system; In each movement process, for an overlapping image block of the first monochrome image and the second monochrome image, calculating an average pixel bit depth difference value in the overlapping image block; The minimum average pixel bit depth difference value during the movement process is used as the average bit depth difference value between the first monochrome image and the second monochrome image.
[0009] In some embodiments, calculating the average pixel bit depth difference in the overlapping image blocks includes: For each target pixel in the overlapping image block, determining a first pixel bit depth of the first monochrome image at the target pixel and a second pixel bit depth of the second monochrome image at the target pixel; Determine a difference between the first pixel bit depth and the second pixel bit depth as a bit depth difference of the target pixel; An average value of the bit depth difference of each target pixel is determined as an average pixel bit depth difference in the overlapping image block.
[0010] In some embodiments, determining the moving distance and moving speed of the train based on the average bit depth difference includes: Determining the position coordinates of the two frames of monochrome images when the average bit depth difference is obtained; The displacement difference of the position coordinates is used as the moving distance of the train; A target time interval between the two frames of monochrome images is obtained, and a ratio of the moving distance to the target time interval is used as the moving speed of the train.
[0011] The present invention also provides an image-based train speed and distance measuring device, which includes the following modules: The acquisition module is used to emit an irradiation light source to the wheel and rail of the section through the infrared band laser carried by the train during the running of the train, and to collect the laser interference speckle formed after the irradiation light source is scattered on the wheel and rail of the section; A filtering module, used for filtering stray light based on a preset wavelength band for each frame of the laser interference speckle through a bandpass filter to obtain a laser interference speckle pattern; A processing module, used to project the laser interference speckle pattern into an image sensor through a lens, and perform image processing on the collected laser interference speckle pattern through the image sensor to obtain a monochrome image; The measuring module is used to calculate an average bit depth difference between two frames of monochrome images at any time interval, and determine the moving distance and moving speed of the train based on the average bit depth difference.
[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the image-based train speed and distance measurement method described above is implemented.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the image-based train speed and distance measurement method as described in any one of the above is implemented.
[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the image-based train speed and distance measurement method as described above is implemented.
[0015] The present invention provides an image-based train speed and distance measurement method and device. During the running of the train, an infrared light source is emitted to the wheels and rails of the road section through infrared band laser emission to collect laser interference speckle patterns, and then the image is processed by an image sensor to finally determine the moving distance and moving speed of the train. The image data is obtained by infrared band laser, and there is no need to have an adhesion relationship with the wheels and rails. Therefore, it is not affected by the environment of rain, water surface or slope, and there will be no drift problem. It has a wide range of adaptability and high reliability. Compared with the matching solutions in the prior art, it can effectively improve the accuracy and measurement effect of train speed and distance measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 It is a flow chart of the image-based train speed and distance measurement method provided by the present invention.
[0018] Figure 2 It is a schematic diagram of collecting laser interference speckle patterns using infrared band laser provided by the present invention.
[0019] Figure 3 It is a schematic diagram of multiple frames of monochrome images provided by the present invention.
[0020] Figure 4 It is a coordinate schematic diagram for calculating the moving distance and moving speed provided by the present invention.
[0021] Figure 5 It is a structural schematic diagram of the image-based train speed and distance measuring device provided by the present invention.
[0022] Figure 6 It is a schematic diagram of the physical structure of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] Combine the following Figure 1-Figure 5The present invention describes an image-based train speed and distance measurement method and device. Figure 1 FIG. 1 is a flow chart of the train speed and distance measurement method based on images provided by the present invention, such as Figure 1 As shown, the method includes the following steps 101 to 104.
[0025] Step 101: When the train is running, an infrared laser carried by the train is used to emit an irradiation light source to the wheels and rails of the road section, and laser interference speckles formed after the irradiation light source is scattered on the wheels and rails of the road section are collected.
[0026] See here Figure 2 , Figure 2 It is a schematic diagram of the infrared band laser collecting laser interference speckle pattern provided by the present invention. During the running of the train, the infrared band laser carried by the train emits an irradiation light source to the section wheel rail, and collects the laser interference speckle formed after the irradiation light source is scattered on the section wheel rail. In the embodiment of the present invention, a laser emission source is first installed on the train body, for example, it can be a laser radar, an infrared light emitter, etc., and can be specifically installed at the bottom of the train body. The laser emission source can provide an infrared band laser to emit an irradiation light source to the section wheel rail on the ground, and the section wheel rail is generally covered with rough objects such as spikes and sleepers. The irradiation light source can form laser interference speckle after being scattered by the surface of the section wheel rail. At this time, the laser interference speckle formed after the irradiation light source is scattered on the section wheel rail can be collected at a certain time interval. The time interval can be set according to the actual situation. For example, if it is 2 seconds, the laser interference speckle is collected every 2 seconds.
[0027] In the embodiment of the present invention, infrared lasers invisible to human eyes are used to collect data in real time, which can take advantage of the advantages of high laser intensity, good coherence, and good directionality, while reducing the impact on the surrounding environment, improving detection accuracy, and enhancing anti-interference. In addition, because a non-contact method is used to collect data, the equipment has a long service life and low maintenance costs.
[0028] Step 102: Using a bandpass filter, stray light based on a preset wavelength band is filtered out for each frame of laser interference speckle to obtain a laser interference speckle pattern.
[0029] Through step 101, the laser interference speckle pattern is collected once at each time interval as a frame of laser interference speckle pattern. For example, if the pattern is collected once every 2 seconds, a frame of laser interference speckle pattern is obtained every 2 seconds.
[0030] Considering that the laser wavelength is a constant value and the light intensity is relatively strong, the embodiment of the present invention uses a bandpass filter to filter out stray light based on a preset wavelength band for each frame of laser interference speckle to obtain a laser interference speckle pattern. Figure 2As shown in the figure, after the laser interference speckle is collected, it will pass through a bandpass filter, where the target laser band is preset, and then for each frame of laser interference speckle, the remaining laser band components in the laser interference speckle except the target laser band are filtered out through the bandpass filter to obtain the laser interference speckle pattern. In this way, by setting the laser band operation, the stray light of the remaining bands outside the laser band can be filtered out as much as possible.
[0031] Step 103: project the laser interference speckle pattern onto an image sensor through a lens, and perform image processing on the collected laser interference speckle pattern through the image sensor to obtain a monochromatic image.
[0032] After the stray light is filtered out, the laser interference speckle pattern is projected into the image sensor through a lens, and the image sensor processes the collected laser interference speckle pattern to obtain a monochrome image. Figure 2 As shown, the image sensor here is a low-resolution high-speed image sensor, but when processing the image, it is necessary to filter the color components of the laser interference speckle pattern to retain only a single color, thereby obtaining a corresponding monochrome image. Therefore, in the embodiment of the present invention, the target color of the monochrome image is first preset, and then the image sensor is used to filter the other color components except the target color for the collected laser interference speckle pattern to obtain the corresponding monochrome image. The target color can be determined according to actual needs, such as red or purple, and is not limited here.
[0033] Therefore, the laser interference speckle pattern is collected at each time interval (for example, 2 seconds), and then image processing is performed on each laser interference speckle pattern after stray light is filtered out, so that a continuous multi-frame monochrome image can be obtained, for example Figure 3 As shown, Figure 3 The monochrome images corresponding to the first frame, the second frame and the third frame are exemplarily shown.
[0034] Step 104 : Calculate an average bit depth difference between two frames of monochrome images at any time interval, and determine the moving distance and moving speed of the train based on the average bit depth difference.
[0035] In some embodiments, after the image sensor acquires multiple frames of monochrome images, the multiple frames of monochrome images can be transmitted to a high-speed digital processing chip for specific image processing calculations to obtain the current moving speed and moving distance of the train. The image processing calculations are specifically image comparison and recognition for the multiple frames of monochrome images, and the pixel differences between the two monochrome images are determined by image comparison and recognition, thereby calculating the movement data of the train, which can improve the recognition accuracy and reliability.
[0036] Here, the average bit depth difference is calculated for two frames of monochrome images at any time interval. For example, when the time interval is 2 seconds, the average bit depth difference is calculated for two frames of monochrome images within any 2 seconds. The two frames of monochrome images at any time interval include a first monochrome image and a second monochrome image. Specifically, any one of the two frames of monochrome images is used as the first monochrome image, and the other frame of monochrome image is used as the second monochrome image.
[0037] Next, see Figure 4 , fix the first monochrome image at the origin of the coordinate system (i.e. Figure 4 The origin 0 shown in the figure is used as the origin. Here, the pixel point at the lower left corner of the first monochrome image is made to coincide with the origin. Then the second monochrome image is placed on the fixed first monochrome image, and the second monochrome image is moved along the X-axis and Y-axis of the coordinate system. In this way, during the movement, there will be overlapping image blocks between the first monochrome image and the second monochrome image. During each movement, the average pixel depth difference in the overlapping image blocks of the first monochrome image and the second monochrome image is calculated.
[0038] Specifically, for each target pixel in the overlapping image block, the first pixel bit depth of the first monochrome image at the target pixel and the second pixel bit depth of the second monochrome image at the target pixel are determined, and then the difference between the first pixel bit depth and the second pixel bit depth is determined as the bit depth difference of the target pixel. Finally, the average value of the bit depth difference of each target pixel is determined as the average pixel bit depth difference in the overlapping image block.
[0039] In this way, each time the second monochrome image moves, a corresponding average pixel depth difference is calculated. When the average pixel depth difference calculated during a certain movement is the smallest, it means that the optimal solution has been obtained for this movement. Therefore, in the embodiment of the present application, the smallest average pixel depth difference during the movement is used as the average depth difference between the first monochrome image and the second monochrome image.
[0040] After calculating the average bit depth difference between the first monochrome image and the second monochrome image, the moving distance and moving speed of the train are finally determined based on the average bit depth difference. Figure 4 As shown in the figure, when the optimal solution is obtained during the movement, that is, when the average bit depth difference is determined, the position coordinates of the two frames of monochrome images when the average bit depth difference is obtained can be determined on the coordinate system, and then the displacement difference of the position coordinates can be used as the movement distance of the train. Here, when the optimal solution is obtained during the movement, the first monochrome image is fixed, and the position of the lower left corner pixel coincides with the origin of the coordinate system. Then, the coordinates of the lower left corner pixel position of the second monochrome image can be directly determined at this time. Based on this coordinate, the distance to the origin of the coordinate system can be calculated, and this distance is the displacement difference of the position coordinates.
[0041] The moving direction of the train can also be predicted based on the position coordinates of the two frames of images, for example Figure 4 As shown, the displacement difference of the two position coordinates is calculated according to the moving direction, and this displacement difference is the moving distance of the train along the moving direction within the time interval. Next, the target time interval of the two frames of monochrome images is obtained, where the target time interval is the time interval between the two frames of images, for example, 2 seconds. Finally, the speed is calculated based on the displacement and time, and the ratio of the moving distance to the target time interval is used as the moving speed of the train.
[0042] In this way, the moving direction, moving distance and moving speed of the processed train are determined based on the two frames of monochrome images. Then the acceleration and other indicators of the train can be calculated. When the frequency (i.e. time interval) of the image sensor to collect monochrome images is shorter, the calculated moving speed, moving distance and other indicators will be more accurate, which can effectively improve the fault tolerance rate.
[0043] In the embodiment of the present invention, during the running of the train, an infrared light source is emitted to the wheel and rail of the road section through an infrared band laser to collect the laser interference speckle pattern, and then the image is processed through the image sensor to finally determine the moving distance and moving speed of the train. The image data is obtained by infrared band laser, and there is no need for the wheel and rail to have an adhesion relationship, and it is not affected by the environment of rain, water surface or slope, and there will be no drift problem. It has a wide range of adaptability and high reliability. Compared with the matching solutions in the prior art, it can effectively improve the accuracy and measurement effect of train speed and distance measurement.
[0044] The image-based train speed and distance measuring device provided by the present invention is described below. The image-based train speed and distance measuring device described below and the image-based train speed and distance measuring method described above can be referred to each other.
[0045] like Figure 5 As shown, the image-based train speed and distance measuring device provided by the present invention includes an acquisition module 501, a filtering module 502, a processing module 503, and a measuring module 504. The acquisition module 501 is used to emit an irradiation light source to the section wheel rail through an infrared band laser carried by the train during the running of the train, and collect the laser interference speckle formed after the irradiation light source is scattered on the section wheel rail; the filtering module 502 is used to filter out the stray light based on the preset band for each frame of the laser interference speckle through a bandpass filter to obtain a laser interference speckle pattern; the processing module 503 is used to project the laser interference speckle pattern into the image sensor through a lens, and perform image processing on the collected laser interference speckle pattern through the image sensor to obtain a monochrome image; the measuring module 504 is used to calculate the average bit depth difference for two frames of monochrome images at any time interval, and determine the moving distance and moving speed of the train based on the average bit depth difference.
[0046] It should be noted that the beneficial effects of the image-based train speed and distance measuring device here and the image-based train speed and distance measuring method mentioned above can correspond to each other, so the beneficial effects of the image-based train speed and distance measuring device will not be repeated here.
[0047] Figure 6 is a schematic diagram of the physical structure of an electronic device provided by the present invention, such as Figure 6 As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the image-based train speed and distance measurement method, which includes: during the running of the train, emitting an irradiation light source to the section wheel rail through an infrared band laser carried by the train, and collecting laser interference speckles formed after the irradiation light source is scattered on the section wheel rail; filtering the stray light based on a preset band for each frame of the laser interference speckle through a bandpass filter to obtain a laser interference speckle pattern; projecting the laser interference speckle pattern into an image sensor through a lens, and performing image processing on the collected laser interference speckle pattern through the image sensor to obtain a monochrome image; calculating the average bit depth difference for two frames of monochrome images at any time interval, and determining the moving distance and moving speed of the train based on the average bit depth difference. In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0048] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the image-based train speed and distance measurement methods provided by the above methods. The method includes: during the travel of the train, emitting an irradiation light source to the section wheels and rails through an infrared band laser carried by the train, and collecting laser interference speckles formed after the irradiation light source is scattered on the section wheels and rails; filtering out stray light based on a preset band for each frame of the laser interference speckle through a bandpass filter to obtain a laser interference speckle pattern; projecting the laser interference speckle pattern into an image sensor through a lens, and performing image processing on the collected laser interference speckle pattern through the image sensor to obtain a monochrome image; calculating an average bit depth difference for two frames of monochrome images at any time interval, and determining the moving distance and moving speed of the train based on the average bit depth difference.
[0049] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the processor executes the image-based train speed and distance measurement method provided by the above methods, the method comprising: during the running of the train, emitting an irradiation light source to the section wheels and rails by means of an infrared band laser carried by the train, and collecting laser interference speckles formed after the irradiation light source is scattered on the section wheels and rails; filtering out stray light based on a preset band for each frame of the laser interference speckle by means of a bandpass filter to obtain a laser interference speckle pattern; projecting the laser interference speckle pattern into an image sensor by means of a lens, performing image processing on the collected laser interference speckle pattern by means of the image sensor to obtain a monochrome image; calculating an average bit depth difference for two frames of monochrome images at any time interval, and determining the moving distance and moving speed of the train based on the average bit depth difference.
[0050] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0051] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0052] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A train speed and distance measurement method based on an image, characterized in that: The method comprises: During the running of the train, the infrared laser carried by the train emits an irradiation light source to the wheels and rails of the section, and collects the laser interference speckle formed by the scattering of the irradiation light source on the wheels and rails of the section; Using a bandpass filter to filter out stray light based on a preset wavelength band for each frame of the laser interference speckle, to obtain a laser interference speckle pattern; Projecting the laser interference speckle pattern into an image sensor through a lens, and performing image processing on the collected laser interference speckle pattern through the image sensor to obtain a monochromatic image; An average bit depth difference is calculated for two frames of monochrome images at any time interval, and a moving distance and a moving speed of the train are determined based on the average bit depth difference.
2. The image-based train speed and distance measurement method according to claim 1, characterized in that: The step of filtering out stray light based on a preset wavelength band from each frame of the laser interference speckle through a bandpass filter to obtain a laser interference speckle pattern comprises: Preset target laser band; For each frame of the laser interference speckle, the remaining laser band components in the laser interference speckle except the target laser band are filtered out by a bandpass filter to obtain a laser interference speckle pattern.
3. The image-based train speed and distance measurement method according to claim 1, characterized in that: The step of performing image processing on the collected laser interference speckle pattern by the image sensor to obtain a monochrome image comprises: Preset target color for monochrome images; For the collected laser interference speckle pattern, other color components except the target color are filtered by the image sensor to obtain a corresponding monochrome image.
4. The image-based train speed and distance measurement method according to claim 1, characterized in that: The two frames of monochrome images at any time interval include a first monochrome image and a second monochrome image, and the step of calculating the average bit depth difference between the two frames of monochrome images at any time interval includes: Using any one of the two monochrome images as a first monochrome image, and using the other monochrome image as a second monochrome image; Fixing the first monochrome image at the origin of the coordinate system, placing the second monochrome image on the fixed first monochrome image, and moving the second monochrome image along the X-axis and the Y-axis of the coordinate system; In each movement process, for an overlapping image block of the first monochrome image and the second monochrome image, calculating an average pixel bit depth difference value in the overlapping image block; The minimum average pixel bit depth difference value during the movement process is used as the average bit depth difference value between the first monochrome image and the second monochrome image.
5. The image-based train speed and distance measurement method according to claim 4, characterized in that: The calculating the average pixel bit depth difference in the overlapping image blocks comprises: For each target pixel in the overlapping image block, determining a first pixel bit depth of the first monochrome image at the target pixel and a second pixel bit depth of the second monochrome image at the target pixel; Determine a difference between the first pixel bit depth and the second pixel bit depth as a bit depth difference of the target pixel; An average value of the bit depth difference of each target pixel is determined as an average pixel bit depth difference in the overlapping image block.
6. The image-based train speed and distance measurement method according to claim 1, characterized in that: The determining the moving distance and moving speed of the train based on the average depth difference includes: Determining the position coordinates of the two frames of monochrome images when the average bit depth difference is obtained; The displacement difference of the position coordinates is used as the moving distance of the train; A target time interval between the two frames of monochrome images is obtained, and a ratio of the moving distance to the target time interval is used as the moving speed of the train.
7. An image-based train speed and distance measuring device, characterized in that: The device comprises: The acquisition module is used to emit an irradiation light source to the wheel and rail of the section through the infrared band laser carried by the train during the running of the train, and to collect the laser interference speckle formed after the irradiation light source is scattered on the wheel and rail of the section; A filtering module, used for filtering stray light based on a preset wavelength band for each frame of the laser interference speckle through a bandpass filter to obtain a laser interference speckle pattern; A processing module, used to project the laser interference speckle pattern into an image sensor through a lens, and perform image processing on the collected laser interference speckle pattern through the image sensor to obtain a monochrome image; The measuring module is used to calculate an average bit depth difference between two frames of monochrome images at any time interval, and determine the moving distance and moving speed of the train based on the average bit depth difference.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the image-based train speed and distance measurement method as described in any one of claims 1 to 6 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image-based train speed and distance measurement method as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the image-based train speed and distance measurement method as described in any one of claims 1 to 6 is implemented.