Train zero-speed detection method and system based on line-scan digital camera
Through the linear array camera and FPGA image processing unit combined with the encoder, the CNN and RANSAC algorithms are used to solve the environmental interference and insufficient accuracy of existing train zero-speed detection, and high-precision and low-cost train zero-speed detection are achieved.
Patent Information
- Application Number
- CN202510750226.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-08-19
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing zero-speed detection technology of trains is prone to environmental interference, high installation and maintenance costs, insufficient accuracy, especially in complex lighting and weather conditions.
A linear array camera is used to combine an encoder and an FPGA image processing unit to acquire the track image below the train through high row frequency, and a feature point is extracted and displacement is calculated using CNN and RANSAC algorithms, and a zero-speed state is determined by combining an adaptive threshold algorithm.
It realizes high-precision, low-cost, and anti-interference zero-speed detection of trains, which can accurately judge the zero-speed status of trains in complex environments, and improves the reliability and accuracy of detection.
Smart Images

Figure CN120503850A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of rail transit detection technology, and in particular to a train zero-speed detection method and system based on a linear array camera. Background Art
[0002] Train zero-speed detection is a critical component of railway transportation safety assurance. Accurately determining whether a train is at zero speed is crucial in various scenarios, including when a train is parked at a station, starting to depart from a station, shunting within a depot, and performing emergency braking. For example, doors can only be opened safely after confirming the train is at zero speed, preventing accidents such as passengers falling due to the train not coming to a complete stop. In the Automatic Train Operation (ATO) system, zero-speed detection results serve as a crucial basis for initiating acceleration or braking, directly impacting the accuracy and efficiency of train operations.
[0003] Traditional train zero-speed detection relies on speed sensors, GPS, or wheel encoders. These sensors suffer from the following drawbacks: they are susceptible to environmental interference (such as electromagnetic interference and mechanical wear); they are expensive to install and maintain; and they lack accuracy at low speeds or with small displacements. In underground tunnels, where GPS signals are unavailable, visual inspection methods based on area array cameras struggle to capture high-speed motion details due to frame rate limitations and require a high data processing workload.
[0004] The existing technology lacks a non-contact, low-cost, high-precision train zero-speed detection solution, especially its robustness under complex lighting and weather conditions. Summary of the Invention
[0005] The object of the present invention is to provide a train zero-speed detection method and system based on a linear array camera to solve the problems raised in the above background technology.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a train zero-speed detection system based on a linear array camera, comprising:
[0007] Trigger module, line array camera module, image processing unit and control module;
[0008] The signal output end of the trigger module is connected to the linear array camera module, the signal output end of the linear array camera module is connected to the image processing unit, and the signal output end of the image processing unit is connected to the control module;
[0009] The linear array camera module is installed under the train, the line frequency of the linear array camera module is ≥10kHz, and the track image is captured in the vertical track direction;
[0010] The trigger module triggers the linear array camera module to collect images through the encoder to ensure that the image is synchronized with the train position;
[0011] The image processing unit uses FPGA to process images in real time and extract feature displacements;
[0012] The control module outputs a zero-speed signal to the train control system or monitoring platform.
[0013] Preferably, the linear array camera module is installed at the side of the wheels at the bottom of the train, perpendicular to the track direction, to ensure that the texture image of the track surface below the train can be clearly captured when the train is running.
[0014] Preferably, the encoder is installed on the wheel axle of the train. As the wheel rotates, the encoder generates a series of pulse signals related to the wheel rotation angle and speed. When the encoder detects that the wheel rotates a set angle or distance, it outputs a trigger pulse signal to the linear array camera module.
[0015] Preferably, the distance d traveled by the train can be calculated by the formula d = n / M × C;
[0016] Here, assuming that the encoder has a resolution of M pulses per revolution, the circumference of the train wheel is C meters, and the encoder outputs n pulses, the distance d traveled by the train is calculated based on the above formula.
[0017] Preferably, the image processing unit includes grayscale processing, denoising processing, and enhancement processing.
[0018] Preferably, the feature displacement extraction operation is as follows:
[0019] Feature point extraction: CNN algorithm is used to extract feature points in the image;
[0020] Displacement calculation: The RANSAC algorithm is used to calculate the displacement of feature points in adjacent frame images.
[0021] A train zero-speed detection method based on a linear array camera is provided. The method is based on a train zero-speed detection system based on a linear array camera. The specific steps of the method are as follows:
[0022] Image acquisition: The linear array camera continuously captures the texture images of the track surface under the train;
[0023] Image preprocessing: grayscale, denoise, and enhance the image to improve feature contrast;
[0024] Feature matching:
[0025] Extract CNN / SIFT feature points in adjacent frame images;
[0026] Calculate the displacement of feature points using the RANSAC algorithm;
[0027] Displacement judgment: If the average displacement of N consecutive frames is less than the threshold, it is judged to be in zero speed state;
[0028] Output signal: Trigger zero speed signal and upload it to the control system.
[0029] Compared with the prior art, the present invention has the following beneficial effects:
[0030] Advantages of line scan cameras: Utilizes high line rate characteristics to capture minute displacements and avoid motion blur;
[0031] Multi-area joint detection: Multiple detection windows are set in different areas of the vehicle body (such as the front, middle, and rear) to avoid local feature failure;
[0032] Adaptive threshold algorithm: Dynamically adjust the grayscale threshold and displacement judgment threshold according to the ambient light. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a system logic block diagram of the present invention;
[0034] Figure 2 Flow chart of the method of the present invention. DETAILED DESCRIPTION
[0035] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only 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 making creative efforts are within the scope of protection of the present invention.
[0036] In the description of the present invention, it should be understood that the terms "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inside", "outside", etc., indicating directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.
[0037] Example:
[0038] See also Figure 1-2 , the present invention provides a technical solution: a train zero-speed detection system based on a linear array camera, comprising: a trigger module, a linear array camera module, an image processing unit and a control module;
[0039] The signal output end of the trigger module is connected to the linear array camera module, the signal output end of the linear array camera module is connected to the image processing unit, and the signal output end of the image processing unit is connected to the control module. The linear array camera module is installed under the train, the line frequency of the linear array camera module is ≥10kHz, and the track image is captured in the direction perpendicular to the track. The trigger module triggers the linear array camera module to collect data through an encoder to ensure that the image is synchronized with the train position. The image processing unit uses FPGA to process the image in real time and extract feature displacement. The control module outputs a zero-speed signal to the train control system or monitoring platform.
[0040] Hardware Configuration
[0041] Linear scan camera module: Model X-Scan 8K, line frequency 20kHz, resolution 1024 pixels (
[0042] or 512 pixels);
[0043] Installation position: 0.3 meters vertically from the track, with the field of view covering the height of the vehicle body;
[0044] Trigger signal: The train encoder detects the wheel position and triggers the camera to collect data.
[0045] (1) Linear array camera module
[0046] The linear array camera module is installed at the side of the train's wheels, perpendicular to the track, to ensure clear capture of the track surface texture as the train moves. The linear array camera boasts high-speed acquisition capabilities, with a line frequency of ≥10kHz. This high line frequency allows for rapid capture of track surface image information during high-speed train operation, preventing image loss or blurring caused by excessive train speed. Hardware selection typically uses industrial-grade linear array cameras with high resolution and low noise. For example, certain linear array CCD cameras offer resolutions of up to several thousand pixels, enabling clear visualization of subtle track surface texture features and providing a rich image data foundation for subsequent zero-speed inspections.
[0047] (2) Trigger module
[0048] The trigger module is key to achieving precise synchronization between image acquisition and train position. Its core operating principle is to trigger the line scan camera to capture images based on pulse signals from an encoder. Specifically, the encoder is mounted on the train's wheel axle. As the wheel rotates, it generates a series of pulse signals related to the wheel's rotation angle and speed. When the encoder detects that the wheel has rotated a certain angle or distance, it outputs a trigger pulse signal to the line scan camera module.
[0049] Assume the encoder has a resolution of output per revolution
[0050] Given a train with M pulses and a wheel circumference of C meters, when the encoder outputs n pulses, the distance traveled by the train, d, can be calculated using the formula d = n / M × C. The trigger module triggers capture based on a pre-set distance interval (for example, triggering capture every s meters). When the calculated distance d reaches this interval, it immediately sends a trigger signal to the line scan camera. This ensures that each captured image frame corresponds to a specific train position, achieving precise synchronization between the image and the train's position.
[0051] (3) Image processing unit
[0052] The image processing unit uses an FPGA (field programmable gate array) as its core processing chip. FPGAs have strong parallel processing capabilities and high real-time performance, meeting the real-time processing requirements of high-speed image acquisition by line scan cameras. The image processing process mainly includes the following key steps and corresponding technical implementations:
[0053] Image preprocessing
[0054] Grayscale: Convert the collected color image into a grayscale image. The commonly used grayscale method is the weighted average method, and its calculation formula is
[0055] Gray=0.299×R+0.587×G+0.114×B
[0056] Among them, R, G, and B represent the pixel values of the red, green, and blue channels of the color image respectively. The grayscale value of each pixel is calculated by this formula to form a grayscale image.
[0057] Denoising: Use the median filter algorithm to remove noise from the image. The principle of median filtering is to replace the grayscale value of each pixel in the image with the median of the grayscale values of the pixels in its neighborhood. Assume that the grayscale values of the pixels in the 3×3 neighborhood centered on the pixel (i, j) are a1, a2, ..., a9, and after sorting these values, take the median value as the new grayscale value of the pixel (i, j), that is, Gray new (i, j) = median(a1, a2, …, a9). This method can effectively suppress impulse noise such as salt and pepper noise.
[0058] Enhancement: Use histogram equalization to enhance image contrast. Histogram equalization redistributes the grayscale values of pixels in an image, making the image's grayscale histogram as evenly distributed as possible, thereby improving the visibility of features in the image. The implementation process first counts the number of pixels at each grayscale level in the image, then calculates the cumulative distribution function of the grayscale levels. Finally, the grayscale value of each pixel is transformed according to the cumulative distribution function to produce the enhanced image.
[0059] Feature Matching
[0060] Feature point extraction: directly use the feature map output by CNN to locate key points
[0061] Here are the steps:
[0062] Input image preprocessing: scale the image to a fixed size (e.g., 224×224) and normalize the pixel values (e.g., subtract the mean and divide by the standard deviation).
[0063] Forward propagation through the CNN network: Use a pre-trained CNN model (such as VGG, ResNet, MobileNet) or a custom network to obtain the feature map (FeatureMap) of the intermediate layer.
[0064] Shallow feature maps have high resolution and are suitable for locating precise spatial positions; deep feature maps have strong semantics and are suitable for identifying object categories.
[0065] Feature map analysis and key point detection:
[0066] Slide the window on the feature map and calculate the response value (such as gradient amplitude, activation intensity) of each position. Positions with high response values are regarded as potential feature points.
[0067] For example, if you are interested in edge features, you can select channels in the convolutional layer that have a strong edge response (such as certain filters in the first convolutional layer) and extract the peak response points as feature points.
[0068] Displacement calculation: Use the RANSAC (Random Sample Consensus) algorithm to calculate the displacement of feature points in adjacent frame images. The basic idea of the RANSAC algorithm is to select a subset from all feature point pairs by random sampling, assuming that the feature point pairs in the subset are inliers (that is, point pairs that meet the correct matching relationship), and calculate a transformation model based on these inliers (such as the translation transformation model in a two-dimensional plane). Then use the model to verify all feature point pairs, and count the number of feature point pairs that meet the model (that is, the number of inliers). Repeat the above random sampling and verification process multiple times, select the transformation model with the largest number of inliers as the final matching model, and calculate the displacement of feature points in adjacent frame images based on the model. Assume that the translation transformation model obtained by the RANSAC algorithm is (Δx, Δy)
[0069] , then the displacement of the feature points in adjacent frame images is
[0070] (4) Control module
[0071] The control module is mainly responsible for receiving the train zero-speed determination result output by the image processing unit and accurately outputting the zero-speed signal to the train control system or monitoring platform. In terms of hardware implementation, the control module usually adopts a high-performance microcontroller (such as ARM series chips) and exchanges data with the train control system or monitoring platform through a serial communication interface (such as RS-485, CAN bus, etc.). After receiving the zero-speed signal determined by the image processing unit, the control module will encode and encapsulate the signal according to the pre-set communication protocol, and then send the encapsulated zero-speed signal. At the same time, the control module also has fault diagnosis and status feedback functions, which can monitor the working status of each module of the system in real time. When an abnormal situation is detected, it will promptly send fault alarm information to the train control system or monitoring platform so that the staff can deal with it in time.
[0072] A train zero-speed detection method based on a linear array camera is provided. The method is based on a train zero-speed detection system based on a linear array camera. The specific steps of the method are as follows:
[0073] Image acquisition: The linear array camera continuously captures the texture images of the track surface under the train;
[0074] Image preprocessing: grayscale, denoise, and enhance the image to improve feature contrast;
[0075] Feature matching:
[0076] Extract CNN / SIFT feature points in adjacent frame images;
[0077] Calculate the displacement of feature points using the RANSAC algorithm;
[0078] Displacement judgment: If the average displacement of N consecutive frames is less than the threshold, it is judged to be in zero speed state;
[0079] Output signal: Trigger zero speed signal and upload it to the control system.
[0080] Specifically:
[0081] (1) Image acquisition
[0082] Controlled by a trigger module, the line scan camera continuously captures texture images of the track surface beneath the train at a line frequency ≥10kHz. During the acquisition process, the line scan camera scans the track surface line by line, converting the optical information from the track surface into electrical signals, which are then converted to digital image data through analog-to-digital conversion. To ensure the integrity and accuracy of the image data, the line scan camera is equipped with a high-precision clock circuit and a data buffer unit. The clock circuit provides a precise time reference for image acquisition, while the data buffer unit temporarily stores the captured image data for subsequent transmission to the image processing unit for processing.
[0083] (2) Image preprocessing
[0084] After image acquisition is complete, the captured images are transferred to the image processing unit for preprocessing. As previously mentioned, preprocessing includes three steps: grayscale conversion, denoising, and enhancement. These steps effectively improve image quality and enhance the contrast of track surface texture features in the image, providing higher-quality image data for subsequent feature matching and displacement determination.
[0085] (3) Feature matching
[0086] In adjacent frames, the CNN algorithm is used to extract feature points. For each frame, the CNN algorithm's FAST corner detection algorithm (CNN-FAST (CNN-based Feature-point Accurate and Stable) is a corner detection algorithm based on a convolutional neural network (CNN) that aims to improve the performance and efficiency of traditional corner detection algorithms (such as Harris corner detection and FAST corner detection). This method identifies corners by learning local patterns around feature points, thereby improving the accuracy and stability of corner detection while maintaining the speed of traditional methods.) quickly screens potential corners. The BRIEF algorithm is then used to generate binary descriptors for each corner point. These descriptors can accurately describe the local image features around the corner point, providing a basis for subsequent feature matching.
[0087] Based on the extracted feature points and their descriptors, the RANSAC algorithm is used to calculate the displacement of the feature points. After multiple rounds of random sampling and verification, the transformation model with the largest number of inliers is selected as the final matching model. Based on this model, the displacement of the feature points in adjacent frames is calculated, thereby obtaining the displacement information of the train within the time interval between adjacent frames.
[0088] (IV) Displacement determination
[0089] After calculating the displacement of the feature points in adjacent frames, perform statistical analysis on the displacement of N consecutive frames (e.g., N=10 frames). Calculate the average displacement of the feature points in these N frames. The calculation formula is
[0090]
[0091] Among them, d i Indicates the displacement of the feature point in the i-th frame image. If the average displacement is calculated If the displacement is less than a pre-set threshold (e.g., 0.1 pixels), the train is determined to be at zero speed. This is because when the train is at zero speed, there is no significant displacement change on the track surface relative to the linear array camera, which is reflected in the image as a very small displacement of feature points in adjacent frames.
[0092] (5) Output signal
[0093] When the train is determined to be in a zero-speed state, the image processing unit transmits the zero-speed determination result to the control module. Upon receiving the zero-speed signal, the control module encodes and encapsulates the signal according to a pre-set communication protocol and then uploads the zero-speed signal to the train control system or monitoring platform via a serial communication interface. Upon receiving the zero-speed signal, the train control system can perform appropriate operations based on actual needs, such as controlling the train's braking system to maintain braking or triggering safety interlocks. Upon receiving the zero-speed signal, the monitoring platform can display the train's zero-speed status information in real time, providing personnel with accurate train operation status monitoring data.
[0094] Based on the above scheme, the following design can also be made:
[0095] Anti-interference design: Median filtering is used to eliminate interference from rain and snow, and inter-frame difference method is used to eliminate the impact of sudden changes in illumination.
[0096] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and the present invention can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention; therefore, no matter from which point of view, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is limited by the appended claims rather than the above description. Therefore, it is intended that all changes that fall within the meaning and scope of the equivalent elements of the claims are included in the present invention, and any figure signs in the claims should not be regarded as limiting the claims involved.
[0097] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. A train zero speed detection system based on a linear array camera, characterized by ,include: Trigger module, line array camera module, image processing unit and control module; The signal output end of the trigger module is connected to the linear array camera module, the signal output end of the linear array camera module is connected to the image processing unit, and the signal output end of the image processing unit is connected to the control module; The linear array camera module is installed under the train, has a line frequency of ≥10kHz, and captures track images in a direction perpendicular to the track; The trigger module triggers the linear array camera module to collect images through the encoder to ensure that the image is synchronized with the train position; The image processing unit uses FPGA to process images in real time and extract feature displacements; The control module outputs a zero-speed signal to the train control system or monitoring platform.
2. The train zero-speed detection system based on a linear array camera according to claim 1, characterized in that: The linear array camera module is installed at the side of the wheels at the bottom of the train, perpendicular to the track direction, to ensure that the texture image of the track surface below the train can be clearly captured when the train is running.
3. The train zero-speed detection system based on a linear array camera according to claim 1, characterized in that: The encoder is installed on the wheel axle of the train. As the wheel rotates, the encoder generates a series of pulse signals related to the wheel rotation angle and speed. When the encoder detects that the wheel rotates a set angle or distance, it outputs a trigger pulse signal to the linear array camera module.
4. The train zero-speed detection system based on a linear array camera according to claim 3, characterized in that: The distance d traveled by the train can be calculated using the formula d = n / M × C; Here, assuming that the encoder has a resolution of M pulses per revolution, the circumference of the train wheel is C meters, and the encoder outputs n pulses, the distance d traveled by the train is calculated based on the above formula.
5. The train zero-speed detection system based on a linear array camera according to claim 1, characterized in that: The image processing unit includes grayscale processing, denoising processing, and enhancement processing.
6. The train zero-speed detection system based on a linear array camera according to claim 1, characterized in that: The feature displacement extraction operation is as follows: Feature point extraction: CNN algorithm is used to extract feature points in the image; Displacement calculation: The RANSAC algorithm is used to calculate the displacement of feature points in adjacent frame images.
7. A method for detecting zero speed of a train based on a linear array camera, characterized by: The train zero-speed detection method based on a linear array camera is based on the train zero-speed detection system based on a linear array camera according to any one of claims 1 to 6. The specific steps of the train zero-speed detection method based on a linear array camera are as follows: Image acquisition: The linear array camera continuously captures texture images of the track surface under the train; Image preprocessing: grayscale, denoise, and enhance the image to improve feature contrast; Feature matching: Extract CNN / SIFT feature points in adjacent frame images; Calculate the displacement of feature points using the RANSAC algorithm; Displacement judgment: If the average displacement of N consecutive frames is less than the threshold, it is judged to be in zero speed state; Output signal: Trigger zero speed signal and upload it to the control system.
Citation Information
Patent Citations
Image acquisition device for track detection system
CN114670899A
Device and method for detecting train head
CN117657258A
Accurate camera triggering method based on vehicle speed prediction and image acquisition system
CN120050509A
In-track train entry detection system and detection method using camera module and radar sensor module
KR102596183B1