Method and system for detecting tiny foreign objects on railway track surface based on machine vision
Through machine vision technology, image processing and detection algorithms are used to solve the problem of distinguishing the detection of tiny foreign objects on the railway track surface and between double rails, achieving accurate detection of tiny foreign objects on the railway track surface and between double rails, and improving the reliability and safety of detection. sex.
Patent Information
- Application Number
- CN202011355732.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-27
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-11-27
AI Technical Summary
Existing railway track machine vision inspection technology cannot effectively distinguish and detect tiny foreign objects on the railway track surface and between the double rails, affecting the accuracy and reliability of the inspection results.
A method for detecting tiny foreign objects on the railway track surface based on machine vision is adopted. Images are collected through detection optical equipment, image filtering is used to denoise and extract features. Laplace transform and Hough transform are used to obtain gradient maps, and single frame and sequence image detection algorithms are combined. , determine the track surface and the area between the double rails, detect significant gradient transformations, and identify tiny foreign objects.
It achieves accurate detection of tiny foreign objects on the railway track surface, improves the reliability and safety of detection, and ensures the safety of train operation.
Smart Images

Figure CN112508892B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of machine vision, and in particular relates to a method and system for detecting tiny foreign bodies on a railway track surface based on machine vision. Background Art
[0002] The presence of foreign objects on railway tracks poses a serious threat to the safety of high-speed trains. Previous manual inspections cannot guarantee the instantaneous discovery of foreign objects. Due to the high speed of trains and long braking distances, it is difficult to avoid accidents by relying on the driver's emergency response after seeing foreign objects. Therefore, a railway foreign object detection system is needed to detect foreign objects on railways, especially tiny foreign objects, in real time.
[0003] At present, the comprehensive monitoring system for foreign bodies in railways mainly includes two technologies: contact and non-contact. The contact technology is to arrange distributed sensors such as power grids, cables, and optical cables on the railway. It has the advantages of mature technology and little environmental impact, but its disadvantages are also obvious, namely high cost, difficult construction, and high maintenance cost. Non-contact technology mainly includes laser radar detection technology and machine vision detection technology. Among them, laser radar has significant advantages in monitoring large-volume foreign bodies within a short distance of less than 200 meters. It can provide distance and location information of foreign bodies and obtain three-dimensional information of objects at the same time. However, there is still room for development in monitoring technology for long-distance and small targets. The existing machine vision detection technology applied to railway tracks is not perfect. Railway foreign bodies are divided into foreign bodies on the railway track surface and foreign bodies between the two tracks of the railway. When detecting foreign bodies on the railway track, different detection methods need to be used for these two to accurately and efficiently identify foreign bodies, but the existing machine vision detection technology does not distinguish between them, which affects the detection results. Summary of the invention
[0004] The present invention provides a method and system for detecting tiny foreign objects on a railway track surface based on machine vision, which can accurately detect tiny foreign objects on the railway track surface.
[0005] To achieve the above object, the technical solution of the present invention is achieved as follows:
[0006] The method for detecting tiny foreign objects on railway track surface based on machine vision includes:
[0007] S1, collecting continuous frame rail images through detection optical equipment and performing image filtering to remove noise;
[0008] S2, extracting image features to determine the foreign object detection area as the track surface area and the area between the two tracks;
[0009] S3, using Laplace transform filtering to obtain a gradient map for the image in the track surface area;
[0010] S4. Traverse the gradient map to detect whether there is a small area with a significant gradient change. If there is a closed small area with a significant gradient change, it can be determined that there is a foreign object on the track surface.
[0011] Furthermore, the specific method of step S2 includes: using Hough transform to extract straight line features in the image, and fitting the straight line features based on iterative block template matching method to obtain the track surface areas of the rails on both sides of the straight and curved tracks, and determining the foreign object detection area as the track surface area and the area between the two tracks according to the track surface.
[0012] Furthermore, the detection of the small area in step S4 adopts a small target detection method of a single frame image, including:
[0013] S401, obtaining a binary image of the target by a background filtering algorithm;
[0014] S402, using a target segmentation algorithm based on region growing to scan each pixel in the image one by one, and using white points, i.e., target points, as seeds;
[0015] S403, according to the growth judgment criterion, the pixels in the neighborhood around the seed pixel that have the same or similar properties as the seed pixel are merged into the region where the seed pixel is located, and regional growth is performed until there are no more pixels that meet the conditions.
[0016] Furthermore, the detection of the small area in step S4 adopts a small target detection method of a sequence image, including:
[0017] S411, establishing a relational expression between the gradient change of the image grayscale of any point (x, y) on the first frame image plane and the instantaneous velocity (u, v) of the point as its motion constraint condition;
[0018] S412, if the N motion trajectories of the corresponding points under the motion constraint condition in the continuous N frames of images form a velocity aggregation point on the velocity plane, then the point is the target point; if it cannot form a continuous motion trajectory in the continuous images, or cannot form a velocity aggregation point on the velocity plane, then it is a noise point;
[0019] S413: Remove noise interference points and detect the real moving target.
[0020] Furthermore, the method for determining whether the motion trajectory forms a velocity convergence point on the velocity plane in step S412 includes:
[0021] S4121, judging whether the speed of the corresponding point is within a specified value range according to the obtained data, and if so, generating a temporary trajectory;
[0022] S4122, predicting the position of the corresponding point in the subsequent frame, and determining an associated area with the predicted position as the center, any point trace falling in the associated area will generate a new trajectory, continue to estimate the velocity value and acceleration value, and predict the target position in the next frame and generate an associated area based on this;
[0023] S4123, fitting all generated trajectories with straight lines or quadratic curves, and when the error between the points on the trajectory and the fitting curve is within a certain range, confirming that the trajectory is the target trajectory, otherwise, deleting the trajectory.
[0024] The present invention also provides a railway track surface micro foreign body detection system based on machine vision, comprising:
[0025] An acquisition and denoising module is used to acquire continuous frame rail images through a detection optical device and perform image filtering to remove noise;
[0026] A region division module is used to extract image features to determine the foreign object detection area as the track surface area and the area between the two tracks;
[0027] A gradient module, used to obtain a gradient map by applying Laplace transform filtering to the image in the track surface area;
[0028] The foreign body judgment module is used to traverse the gradient map to detect whether there are small areas with significant gradient changes. If there is a closed small area with obvious gradient changes, it can be judged that there are foreign bodies on the track surface.
[0029] Furthermore, the region division module includes:
[0030] The straight line feature extraction unit uses Hough transform to extract straight line features in the image;
[0031] The fitting unit uses an iterative block template matching method to fit the straight line features to obtain the rail surface areas on both sides of the straight and curved tracks;
[0032] The area unit determines the foreign object detection area into the track surface area and the area between the two tracks according to the track surface.
[0033] Furthermore, a single-frame detection submodule is provided in the foreign body judgment module, and the single-frame detection submodule includes:
[0034] A binarization unit, used to obtain a binary image of the target by a background filtering algorithm;
[0035] A seed unit is used to scan each pixel in the image one by one using a target segmentation algorithm based on region growing, and use white points, i.e., target points, as seeds;
[0036] The region growing unit is used to merge pixels with the same or similar properties as the seed pixel in the neighborhood around the seed pixel into the region where the seed pixel is located according to the growth judgment criterion, and perform region growing until there are no more pixels that meet the conditions.
[0037] Furthermore, a sequence detection submodule is provided in the foreign body judgment module, and the sequence detection submodule includes:
[0038] The first frame processing unit establishes a relational expression between the gradient change of the image grayscale of any point (x, y) on the first frame image plane and the instantaneous velocity (u, v) of the point as its motion constraint condition;
[0039] In the multi-frame processing unit, if the N motion trajectories of the corresponding points under the motion constraint conditions form a velocity aggregation point on the velocity plane in the continuous N frame images, then the point is the target point; if it cannot form a continuous motion trajectory in the continuous images, or cannot form a velocity aggregation point on the velocity plane, then it is a noise point;
[0040] The target unit is used to remove noise interference points and detect the real moving target.
[0041] Furthermore, the multi-frame processing unit is provided with an algorithm subunit, which determines whether the speed of the corresponding point is within a specified range of values based on the obtained data, and generates a temporary trajectory if so; predicts the position of the corresponding point in the subsequent frames, and determines an associated area with the predicted position as the center. Any point trace falling within the associated area will generate a new trajectory, continue to predict the speed value and the acceleration value, and predict the target position in the next frame based on this and generate an associated area; fits all generated trajectories with a straight line or a quadratic curve, and when the error between the point on the trajectory and the fitting curve is within a certain range, the trajectory is confirmed to be the target trajectory, otherwise, the trajectory is deleted.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] Based on the characteristics of foreign objects on the railway track surface in video images, the present invention detects small areas with significant gradient changes through gradient maps, thereby accurately detecting tiny foreign objects on the railway track surface, ensuring the reliability of foreign object detection on the railway track surface and improving the safety of train operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a structural block diagram of an embodiment of the present invention;
[0045] Figure 2 is a schematic structural diagram of an embodiment of the present invention;
[0046] Figure 3 is a detection flow chart of an embodiment of the present invention;
[0047] Figure 4 is a flow chart of target detection based on sequence images according to an embodiment of the present invention;
[0048] Figure 5 This is a dual-track target recognition detection diagram according to an embodiment of the present invention.
[0049] in:
[0050] 1. Detection optical unit and lighting unit; 1-1. Near-field detector; 1-2. Far-field detector;
[0051] 1-3, laser lighting source; 1-4, near-field detector video cable; 1-5, far-field detector video cable;
[0052] 1-6, power cord; 2, display screen; 2-1, HDMI high-definition video cable; 2-2, display screen power cable;
[0053] 3. Main control unit; 3-1. Focus button for long-range detector; 3-2. Focus button for short-range detector;
[0054] 3-3, laser lighting source focus button; 3-4, laser lighting switch; 3-5, battery power switch;
[0055] 3-6, power switch; 3-7, 220V power cord; 4, sound and light alarm equipment; 4-1, 12V power cord;
[0056] 4-2. Alarm indicator light; 4-3. Alarm buzzer; 4-4. Alarm release button. DETAILED DESCRIPTION
[0057] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0058] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood by specific circumstances.
[0059] The following is a complete railway track foreign body detection solution (including track surface detection and double-track detection) as a specific embodiment of the present invention (track surface detection).
[0060] In the embodiment of the present invention, a day and night detection device for tiny foreign objects smaller than 15 mm on railways based on machine vision is first proposed. The device mainly comprises a detection optical part and a lighting part 1, a display screen 2, a main control part 3, and an audible and visual alarm device 4. The functional block diagram of the device is as follows: Figure 1 As shown, the structural diagram of the specific object is as follows Figure 2 shown.
[0061] The detection optical part and the lighting part 1 include a near-view detector 1-1, a far-view detector 1-2, and lighting equipment. The near-view detector 1-1 can be a near-view camera, the far-view detector 1-2 can be a far-view camera, and the lighting equipment uses a laser lighting light source 1-3.
[0062] The specific object of the main control unit 3 is a main control box, which includes a dual-channel video capture card, a video processing unit TX2, and a power supply. An SD memory card is installed on the video processing unit TX2 to store images in real time. The near-view detector 1-1 (near-view camera) and the far-view detector 1-2 (far-view camera) are respectively connected to the dual-channel video capture card through an SDI interface, and the dual-channel video capture card is connected to the video processing unit TX2 through a PCIE interface. The video processing unit TX2 is connected to the display screen 2 through an HDMI high-definition video cable 2-1 and a display screen power supply cable 2-2, and is also connected to the alarm control board inside the sound and light alarm device 4 through Ethernet. The alarm control board is respectively connected to the alarm indicator light 4-2, the alarm buzzer 4-3, and the alarm release button 4-4 that control the sound and light alarm device 4.
[0063] The power supply of the main control unit 3 not only supplies power to the video processing unit TX2, but also supplies power to the scene detector 1-1 (near-view camera) and the distant view detector 1-2 (distant view camera) of the detection optical unit and the lighting unit 1, the laser lighting source 1-3, and also supplies power to the display screen 2 and the sound and light alarm device 4; the power supply adopts dual power supply, the main power supply adopts AC220 power supply, and the auxiliary power supply adopts lithium battery power supply. The dual power supply is provided with an automatic switching module. When the main power supply is cut off, it automatically switches to the auxiliary power supply, and when the main power supply is restored, it automatically switches back to the main power supply. In addition, the lithium battery is connected to the charger, and the charger is connected to the main power supply. When the main power supply is powered, the lithium battery is charged at the same time, which solves the problem of intermittent power failure of phase separation when the railway AC220 is powered.
[0064] The main control box is also provided with a number of buttons, including a distant detector focusing button 3-1 connected to a distant camera focusing, a near detector focusing button 3-2 connected to a near camera focusing, and a laser illumination light source focusing button 3-3 connected to a laser illumination light source 1-3.
[0065] Based on the above specific structure, in the embodiment of the present invention, the detection optical part in the detection optical part and the lighting part 1 realizes image acquisition; the lighting part is used for lighting under low illumination conditions, and assists the detection optical part in acquiring images; the main control part 3 realizes power control, loading image recognition algorithm and image output; the display screen 2 displays the image video acquired by the detection optical part and transmitted after being processed by the video processing unit TX2; the sound and light alarm device 4 receives the information of the main control part 3 and alarms in real time, and the alarm is automatically released when the foreign matter is eliminated. The alarm can also be manually released by pressing the alarm release button 4-4. The functions of each part are independent, and the cables are connected, so distributed installation can be carried out.
[0066] The detection optical unit collects images in a combination of "long-range + short-range". The long-range detector 1-2 uses a 410mm zoom lens with an effective pixel of 1920x1080, which is responsible for collecting images 200 to 500m in front of the locomotive, and can detect tiny foreign objects of 1.5cm at 500m. The short-range detector 1-1 uses a 130mm zoom lens with an effective pixel of 1920x1080, which is responsible for collecting images within 200m in front of the locomotive. The two optical systems complement each other to achieve high-definition video collection within 500m in front of the locomotive.
[0067] In night mode, eye-safe laser lighting sources 1-3 are used to provide fill light within the detection field of view. At the same time, the detection system automatically switches to night black and white mode, allowing the equipment to operate all day.
[0068] In the embodiment of the present invention, the video processing unit TX2 adopts the Jetson AGX Xavier platform, has a deep learning accelerator DLA and a visual accelerator VA, performs foreign body recognition algorithm processing on the dual-channel videos of the dual-channel video capture card respectively, and then superimposes the recognition results on the original video, and finally merges the two-channel videos into one picture for output display; the video processing unit TX2 adopts wireless transmission, specifically adopts Ethernet to 4G mode, which can realize real-time long-distance wireless transmission of video.
[0069] In an embodiment of the present invention, a foreign object detection algorithm for a railroad track first performs image filtering on continuous frame railroad images taken by a detection optical system to remove noise, then uses Hough transform to extract straight line features in the image, and uses an iterative block template matching method to fit the straight line features to obtain the rail surface areas on both sides of the straight track and the curve. The foreign object detection area is determined as the rail surface area and the area between the two tracks according to the rail surface, and different foreign object detection algorithms are used for the two areas.
[0070] The complete inspection process for the track surface area and the area between the two tracks is as follows: Figure 3As shown, the track surface area uses Laplace transform to obtain gradient features, and the gradient features are clustered and fitted to determine whether there are foreign objects on the track surface; the area between the two tracks is first trained through a convolutional neural network to obtain a target model of a two-track image without foreign objects, and then deduced and identified based on the target model and the collected graphics to determine whether there are foreign objects between the two tracks.
[0071] The specific instructions are given below.
[0072] 1. Detection of tiny foreign matter on track surface
[0073] Track surface imaging features are flatness, smoothness, and uniform color. When there is a foreign object, it will show a color difference from the normal track surface. Therefore, the method of calculating the contrast gradient difference in the area is adopted. The image in the area is filtered by Laplace transform to obtain the gradient map. The gradient map is traversed to detect whether there are small areas with significant gradient changes. If there is a closed small area with obvious gradient changes, it can be judged that there is a foreign object on the track surface. It includes small target detection technology of single frame image and small target detection technology of sequence image.
[0074] The small target detection technology of a single-frame image is that the binary image of the target can be obtained by the background filtering algorithm. The target can be segmented by the target segmentation algorithm based on region growing, and the target position, gate size, center of mass and other information can be calculated. The basic idea of target segmentation based on region growing is to group pixels with similar properties to form a region. Specifically, a seed pixel is found as the starting point of growth for each segmented region. Specifically, the white point (target point) can be used as a seed, and then the pixels with the same or similar properties as the seed pixel in the neighborhood around the seed pixel (determined according to the growth or similarity criteria determined in advance) are merged into the region where the seed pixel is located to perform region growth. These new pixels are treated as new seed pixels and the above process is continued until no more pixels that meet the conditions can be included, and then a region is grown.
[0075] The growth judgment condition described in the above process is based on the grayscale similarity. Assume that the grayscale mean of the segmented region R is The grayscale of the pixel to be tested is y, and the similarity s between the pixel to be tested and the segmented area is expressed as:
[0076]
[0077] Where w is a non-negative weight. For a sufficiently small s, the pixel to be tested can be considered similar to the segmented region and merged into the segmented target. Otherwise, no merging is performed. At the same time, y is used to update the mean, and N is the number of pixels in the grown region.
[0078]
[0079] The small target detection technology of sequence images is based on target detection of sequence images. It can overcome the noise and false target interference problems in single-frame image detection. Its basic principle is to detect targets based on the continuity of target motion and the consistency of trajectory. First, it is necessary to establish the relationship expression between the gradient change of image grayscale at any point (x, y) on the image plane and the instantaneous velocity (u, v) of the point as its motion constraint condition. If we consider the continuous N frames of images in the image sequence and assume that the target's motion speed remains approximately unchanged in these N frames, then for the real moving target point, its N motion constraint lines in the continuous N frames must intersect at approximately one point on the velocity plane. For the noise point, due to its random appearance, it is impossible to form a continuous motion trajectory in the continuous image, nor is it possible to form a velocity aggregation point on the velocity plane. In this way, the noise interference points can be effectively removed from the candidate target point set and the real moving target can be detected.
[0080] The algorithm estimates the speed of the target in the first frame based on the acquired data. If the estimated speed is within the specified range, a temporary trajectory is generated, and then the position of the target in the subsequent frames is predicted, and an associated area is determined with the predicted position as the center. Any point trace falling in the associated area will generate a new trajectory, continue to estimate the speed and acceleration values, and predict the target position in the next frame and generate an associated area based on this. Finally, all generated trajectories are fitted with a straight line or quadratic curve. When the error between the point on the trajectory and the fitting curve is within a certain range, the target trajectory is confirmed, otherwise, the trajectory is deleted.
[0081] Specifically, the execution process in this embodiment is as follows: Figure 4 As shown, a target template is established for all candidate targets in the first frame; the correlation coefficient is calculated for the corresponding candidate targets in the subsequent frame images and the target template of the previous frame; until the correlation coefficient is greater than the threshold, the target count is increased by 1 and the target template is updated. When all frames are calculated, for each candidate target, if the target count is greater than the threshold, the target is confirmed and a trajectory is established for the confirmed target.
[0082] 2. Foreign matter detection between double tracks
[0083] Since there are many different types of objects such as sleepers and stones between the two tracks, foreign objects can be detected through the target detection algorithm based on deep learning. A large number of pre-collected double-track images without foreign objects are trained with a convolutional neural network to obtain a target model. Each frame of the target image to be detected is deduced and identified through the target model. If there is an abnormality that does not match the target model, it is considered that there is a foreign object between the two tracks.
[0084] The embodiment of the present invention adopts a hierarchical target recognition scheme, the flow chart is as follows Figure 5 shown.
[0085] (1) Coarse-level target recognition
[0086] When the target is far away from the imaging sensor, the target imaging area is small, the outline is not clear, and the available image feature information is very limited. The target area, moving speed and other features are extracted from the limited feature information. The empirical classifier is used to preset prior knowledge, and the target category is roughly identified by combining the prior knowledge, the extracted target features and the previously obtained rail position. The approximate category of the target can be determined based on the position of the target relative to the rail. If the target is large, it may be a pedestrian or livestock; if the target is small, it may be a tiny foreign object.
[0087] (2) Fine-level target recognition
[0088] When the target is closer to the imaging sensor, the target imaging area becomes larger, and the outline and texture are clearer, more feature information on the target can be extracted, and the target type can be identified using the nearest neighbor classifier.
[0089] Commonly used target features include shape features and invariant moment features. Shape features can reflect the geometric features of the target. For example, the aspect ratio feature is the ratio of the length to the width of the minimum circumscribed rectangle of the target area. Another common shape feature is the circularity feature that defines the ratio of the perimeter to the area of the target. When calculating, the target is first segmented, and then the chain code table of the target is calculated using the contour. The perimeter is obtained using the chain code table, and then the chain code table is converted into a line segment table to calculate the area of the target. Shape features are easy to extract and can be used as a basis for determining the target category in some cases (such as obtaining a side view of the target). However, due to changes in viewpoints, the shape of the projection of the same target on the plane may not be the same. This requires extracting features that are invariant to the target, that is, such features have strong invariance to scene changes and viewpoint changes. A more representative feature is the Hu moment feature, which has translation invariance, scale invariance, and rotation invariance, and has low computational complexity. It is widely used in the field of image processing and recognition.
[0090] According to the definition of Hu moment, 7 invariant moments can be derived from the second-order and third-order moments. These seven invariant moments have the property of remaining unchanged under translation, rotation, and scaling under continuous image conditions.
[0091] After selecting the image features of the target, the nearest neighbor classification method is used to achieve target classification and recognition. Assume that the target categories are N and the number of training samples in each category is M i , the k-th dimension feature of the j-th training sample of the i-th target is expressed as First, the mean and standard deviation of the feature vectors of each type of training samples are calculated.
[0092]
[0093]
[0094] Then each type of target can be represented by its sample average feature vector To represent, where i = 1, 2, ... N c .
[0095] When a eigenvector is X=[x1,x2,…,x D ], the problem is transformed into finding the nearest neighbor of X in the sample average feature vectors of N known types of targets. The target X is identified as the type to which the sample average feature vector of X is closest.
[0096] Distance function d(X,A (i) ) is defined as in Eq.
[0097]
[0098] When X satisfies , the target X belongs to the I category.
[0099] After the nearest neighbor classification calculation as described above, the target category of the foreign object can be accurately identified.
[0100] The scheme described in the embodiment of the present invention is based on the characteristics of foreign objects on the railway track surface in the video image. The small area where the gradient changes significantly is detected by the gradient map, so that tiny foreign objects on the railway track surface can be accurately detected. At the same time, based on the characteristics of foreign objects between the double tracks of the railway in the video image, the present invention establishes a track model without foreign objects and performs deductive identification to ensure the reliability of foreign object detection between the double tracks of the railway. The combination of the two can realize accurate foreign object detection of long-distance and tiny targets on the railway track.
[0101] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for detecting tiny foreign objects on railway track surface based on machine vision. It is characterized in that include: S1, collecting continuous frame rail images through detection optical equipment and performing image filtering to remove noise; S2, extracting image features to determine the foreign object detection area as the track surface area and the area between the two tracks; S3, using Laplace transform filtering to obtain a gradient map for the image in the track surface area; S4, traverse the gradient map to detect whether there is a small area with significant gradient change. If there is a closed small area with gradient If there is a significant change, it can be determined that there is a foreign object on the track surface; The specific method of step S2 includes: using Hough transform to extract straight line features in the image, and using iterative analysis based on The block template matching method is used to fit the straight line features to obtain the track surface areas on both sides of the straight track and the curved track, and the foreign object detection area is determined as the track surface area and the area between the two tracks according to the track surface; The detection of the small area in step S4 adopts a small target detection method of a sequence image, including: S411, establishing a relational expression between the gradient change of the image grayscale of any point (x, y) on the first frame image plane and the instantaneous velocity (u, v) of the point as its motion constraint condition; S412, if the N motion trajectories of the corresponding points under the motion constraint condition in the continuous N frames of images form a velocity aggregation point on the velocity plane, then the point is the target point; if it cannot form a continuous motion trajectory in the continuous images, or cannot form a velocity aggregation point on the velocity plane, then it is a noise point; S413, removing noise interference points and detecting the real moving target; The method for determining whether the motion trajectory forms a velocity convergence point on the velocity plane in step S412 includes: S4121, judging whether the speed of the corresponding point is within a specified value range according to the obtained data, and if so, generating a temporary trajectory; S4122, predicting the position of the corresponding point in the subsequent frame, and determining an associated area with the predicted position as the center, any point trace falling in the associated area will generate a new trajectory, continue to estimate the velocity value and acceleration value, and predict the target position in the next frame and generate an associated area based on this; S4123, fitting all generated trajectories with straight lines or quadratic curves, and when the error between the points on the trajectory and the fitting curve is within a certain range, confirming that the trajectory is the target trajectory, otherwise, deleting the trajectory.
2. Railway track surface micro foreign body detection system based on machine vision, It is characterized in that include: An acquisition and denoising module is used to acquire continuous frame rail images through a detection optical device and perform image filtering to remove noise; A region division module is used to extract image features to determine the foreign object detection area as the track surface area and the area between the two tracks; A gradient module, used to obtain a gradient map by applying Laplace transform filtering to the image in the track surface area; The foreign body judgment module is used to traverse the gradient map to detect whether there are small areas with significant gradient changes. If there is a closed small area with obvious gradient changes, it can be judged that there are foreign bodies on the track surface; The regional division module includes: Line feature extraction unit, using Hough transform to extract line features in the image; The fitting unit uses an iterative block template matching method to fit the straight line features to obtain the rail surface areas on both sides of the straight and curved tracks; The area unit determines the foreign body detection area into the track surface area and the area between the two tracks according to the track surface; The foreign body judgment module is provided with a sequence detection submodule, and the sequence detection submodule includes: The first frame processing unit establishes a relational expression between the gradient change of the image grayscale of any point (x, y) on the first frame image plane and the instantaneous velocity (u, v) of the point as its motion constraint condition; In the multi-frame processing unit, if the corresponding points in the continuous N frame images form a velocity aggregation point on the velocity plane under the motion constraint condition, then the point is the target point; if it cannot form a continuous motion trajectory in the continuous image, or cannot form a velocity aggregation point on the velocity plane, then it is a noise point; The target unit is used to remove noise interference points and detect the real moving target; The multi-frame processing unit is provided with an algorithm subunit, which determines whether the speed of the corresponding point is within the specified value range based on the obtained data, and generates a temporary trajectory if so; predicts the position of the corresponding point in the subsequent frame, and determines an associated area with the predicted position as the center. Any point trace falling in the associated area will generate a new trajectory, continue to predict the speed value and acceleration value, and predict the target position in the next frame based on this and generate an associated area; fit all generated trajectories with a straight line or a quadratic curve, and when the error between the point on the trajectory and the fitting curve is within a certain range, the trajectory is confirmed to be the target trajectory, otherwise, the trajectory is deleted.
Citation Information
Patent Citations
Image-based railway dangerous rockfall size judgment method
CN111626169A
Cited By
Rail detecting device and rail detection method
US12417612B2
Method and system for detecting railway foreign object intrusion, device and medium
US12725404B2
Rail detecting device and rail detection method
US20230260246A1
Method and system for detecting railway foreign object intrusion, device and medium
US20250218159A1
