Railway foreign body intrusion detection method and system based on motion process perception

By employing a motion-process-aware approach, utilizing Gaussian filtering, image differencing, and morphological operations, combined with the Hungarian algorithm for foreground region selection and target localization, this method solves the problems of full-category detection and noise interference in existing railway foreign object intrusion detection technologies, achieving efficient and reliable railway foreign object intrusion detection.

CN119107615BActive Publication Date: 2026-07-14BEIJING JIAOTONG UNIV +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING JIAOTONG UNIV
Filing Date
2024-09-04
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing deep learning-based methods for detecting foreign object intrusion in railways are difficult to achieve full-category detection in complex railway scenarios, and are prone to generating noisy detection results, increasing the workload of manual review and making it difficult to achieve automated detection.

Method used

A motion-process-aware approach is adopted. By acquiring sequential images of railway monitoring video from previous and subsequent moments, Gaussian filtering, image differencing, and morphological operations are used to segment the foreground, construct a historical foreground map, filter foreground regions, and locate targets by the difference between the center point coordinates and the image width coordinates of the bounding box in the direction of motion. The Hungarian algorithm is combined to realize the correlation of data between previous and subsequent frames and to filter out reliable foreground targets.

Benefits of technology

It enables the detection of all types of foreign objects in complex railway scenarios, reduces noise interference, improves the reliability and automation of detection, and reduces the workload of manual verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107615B_ABST
    Figure CN119107615B_ABST
Patent Text Reader

Abstract

The application provides a railway foreign matter intrusion detection method and system based on motion process perception, belongs to the technical field of railway operation safety detection based on computer vision, acquires two railway monitoring video sequence images at front and back moments; based on Gaussian filtering, binarization, image difference and morphological operation, acquires foreground segmentation results of the images; based on the foreground segmentation results, constructs a history foreground image, and filters the foreground area; according to the center point coordinates, the current frame single frame difference foreground result is distributed to all history foreground areas determined as moving along a specific direction after filtering. The application proposes a new detection mode based on image foreground extraction, realizes comprehensive utilization of foreground results of each frame image in a motion process detection mode on the basis of foreground extraction, realizes analysis and filtering of the rationality of foreground target motion, realizes sensitive detection of all categories of foreign matters, avoids false positives caused by noise foreground, and has strong result reliability and practicality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of railway operation safety detection technology based on computer vision, specifically to a railway foreign object intrusion detection method and system based on motion process perception. Background Technology

[0002] Safe operation is the primary goal of rail transit. Foreign object intrusion into railway clearance is a major factor contributing to the frequent occurrence of railway safety accidents, posing a significant threat to operational safety and causing enormous losses to the national economy and people's property.

[0003] Traditional foreign object detection is done manually, which is time-consuming, labor-intensive, and inefficient. To improve detection efficiency and reduce manual labor, various automated foreign object detection technologies have been applied in the railway industry. Based on the different working principles of the detection systems, current railway foreign object intrusion detection technologies can be divided into contact and non-contact types. Contact methods mainly include electrical grid detection and vibration fiber optic detection, which require the foreign object to contact the detection system to trigger an intrusion alarm. Non-contact methods include infrared detection, lidar detection, millimeter-wave radar detection, and video intelligent detection, which do not require contact with the foreign object. Non-contact railway foreign object detection methods have the advantages of simple deployment and a large detection range. Compared to other methods, video intelligent detection methods have the advantages of low cost, intuitive results, and good hardware support, and have become the main technical means for railway foreign object intrusion detection.

[0004] With the development of technology, deep learning-based image detection methods have demonstrated advantages such as high accuracy and fast detection speed after sufficient training, and have become the mainstream method for railway foreign object intrusion detection. However, in practical applications, deep learning-based methods also face challenges. As an open world, the types of foreign objects that may exist in a railway scene are theoretically infinite. When constructing a deep learning-based detection algorithm, the training samples can only cover as many features of railway foreign objects as possible, making it difficult to reliably detect all possible intrusion targets in a railway scene.

[0005] Foreground extraction algorithms can detect all types of foreign objects without training. Common methods include optical flow and differential methods.

[0006] Zhang Lihua et al. addressed the problems of ghosting, susceptibility to dynamic background interference, and incomplete target detection results in the ViBe algorithm for moving target detection, and proposed an improved ViBe algorithm. First, during the initialization of the background model using the mean method, pixel values ​​with large fluctuations are removed to obtain a background image closer to the real scene, effectively suppressing ghosting. Then, an adaptive threshold radius is used instead of a fixed threshold radius, improving the algorithm's adaptability to dynamic backgrounds. Finally, median filtering and region filling are used to filter out small noise points and fill in empty areas in the detection results, respectively. A moving target tracking algorithm integrating ViBe and CamShift is then employed to track moving targets in railway monitoring video images.

[0007] Guo Baoqing et al. proposed a fast image stabilization method combining one-dimensional grayscale projection and Gaussian filtering, which addresses the characteristic that image jitter in railway scenes occurs in the vertical direction. This method significantly improves processing speed while achieving good stabilization results. For complex and variable backgrounds, they proposed a background update algorithm based on the statistical distribution of foreground targets. A target dispersion index was defined to determine the row and column projection order, and background updates were achieved through the statistical distribution of foreground targets. This improved speed while solving the ghosting problem that traditional background update algorithms struggle with. Finally, they used background differencing to obtain foreground targets for foreign object intrusion detection.

[0008] Existing methods for detecting foreign object intrusion in railways based on foreground extraction have improved detection accuracy, but they are still prone to generating a large number of noisy detection results in complex railway scenarios, increasing the workload of manual review and making it difficult to achieve the goal of automated detection. Summary of the Invention

[0009] The purpose of this invention is to provide a method and system for detecting foreign object intrusion in railways based on motion process perception, which overcomes sample limitations and enables reliable detection of all types of foreign object intrusion in railways, thereby solving at least one of the technical problems existing in the background art.

[0010] To achieve the above objectives, the present invention adopts the following technical solution:

[0011] In a first aspect, the present invention provides a method for detecting foreign object intrusion into railways based on motion process sensing, comprising:

[0012] Acquire two frames of railway surveillance video sequence images at consecutive times;

[0013] Based on Gaussian filtering and binarization, image differencing, and morphological operations, the foreground segmentation results of the image are obtained;

[0014] Based on the foreground segmentation results, a historical foreground map is constructed, and foreground regions are selected.

[0015] For a certain foreground region, based on the center point coordinates, the foreground result with the smallest difference between the image width coordinates of the center point and the boundary of the foreground region's bounding box in the direction of movement, and which is less than the pixel threshold, is taken as the target localization result of the foreground region in the current frame.

[0016] Optionally, when the image size is smaller than a preset threshold size, the input image is synchronously enlarged to the threshold size. After Gaussian filtering, binarization, and image differencing are completed, a preliminary foreground segmentation result is obtained. Morphological processing, which involves first image erosion and then image dilation, is used to eliminate small noise foregrounds while reducing possible holes in the foreground, resulting in a higher quality foreground segmentation result.

[0017] Optionally, the construction of the historical foreground map includes: adding the current frame difference result with the past frame difference result, and the foreground region in the historical foreground map corresponding to the moving target continuously extends as the foreground results accumulate, and the development direction of the foreground region represents the position and direction of the moving target.

[0018] Optionally, the foreground region filtering includes: data association and motion feature judgment based on the bounding boxes of the foreground regions in the historical background images of the previous and next frames. The data association refers to using IOU to represent the positional differences of each foreground region, and using the Hungarian algorithm to achieve data association between the previous and next frames, thereby establishing or updating the historical foreground region spatial information trajectory of the target at each moment.

[0019] Optionally, let the bounding box result D of the foreground region in the current frame be... h The tracking result f of the trajectory corresponding to the foreground region in the previous frame. t Each contains U1 foreground region bounding box information and V1 trajectory bounding box information. To achieve the association and matching of the two, the bounding box result D is first calculated pairwise for each bounding box. h (i)(i∈[1,U1]) and each trajectory result f t The IOU value of the target box corresponding to (j)(j∈[1,V1]) is used as a similarity measure, and then the matching of the detection result of the current frame and the trajectory result is completed based on the Hungarian algorithm.

[0020] Optionally, feature analysis can be performed on the four corner points of the tracking result of the previous frame using the bounding box of the successfully matched foreground region and the spatial information trajectory of the foreground region that it matches, to determine the target motion mode and the corresponding motion situation.

[0021] Secondly, the present invention provides a railway foreign object intrusion detection system based on motion process sensing, comprising:

[0022] The acquisition module is used to acquire two frames of railway monitoring video sequence images at consecutive times;

[0023] The segmentation module is used to obtain the foreground segmentation results of the image based on Gaussian filtering and binarization, image differencing, and morphological operations.

[0024] The filtering module is used to construct a historical foreground map based on the foreground segmentation results and to filter foreground regions.

[0025] The matching module is used to locate the target of a foreground region in the current frame based on the center point coordinates and the foreground result whose difference between the center point and the image width coordinates of the boundary of the foreground region's bounding box in the direction of movement is the smallest and less than a pixel threshold.

[0026] Thirdly, the present invention provides a non-transitory computer-readable storage medium for storing computer instructions, which, when executed by a processor, implement the railway foreign object intrusion detection method based on motion process perception as described in the first aspect.

[0027] Fourthly, the present invention provides a computer device including a memory and a processor, wherein the processor and the memory communicate with each other, the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the railway foreign object intrusion detection method based on motion process perception as described in the first aspect.

[0028] Fifthly, the present invention provides an electronic device, comprising: a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to cause the electronic device to execute instructions for implementing the railway foreign object intrusion detection method based on motion process sensing as described in the first aspect.

[0029] The beneficial effects of this invention are as follows: It proposes a novel detection mode based on image foreground extraction. Based on foreground extraction, it achieves comprehensive utilization of the foreground results of each frame of the image by detecting motion process. It can realize the analysis and screening of the rationality of the motion of the foreground target without model training. While achieving sensitive detection of all types of foreign objects, it avoids false alarms caused by noisy foregrounds. The results are highly reliable and practical.

[0030] The advantages of additional aspects of the invention will be set forth more clearly in the following description or will be learned by practice of the invention. Attached Figure Description

[0031] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a flowchart illustrating the overall principle of the railway foreign object intrusion detection method based on motion process perception as described in an embodiment of the present invention.

[0033] Figure 2 This is a functional structure diagram of the foreground extraction module according to an embodiment of the present invention.

[0034] Figure 3 This is a functional structure diagram of the motion sensing module described in an embodiment of the present invention.

[0035] Figure 4 This is a schematic diagram of the foreground region motion relationship screening method according to an embodiment of the present invention.

[0036] Figure 5 This is a schematic diagram of the target localization method corresponding to the foreground region as described in an embodiment of the present invention. Detailed Implementation

[0037] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0038] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0039] It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless defined as here.

[0040] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, and / or groups thereof.

[0041] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.

[0042] To facilitate understanding of the present invention, the present invention will be further explained and described below with reference to the accompanying drawings and specific embodiments. However, the specific embodiments do not constitute a limitation on the embodiments of the present invention.

[0043] Those skilled in the art should understand that the accompanying drawings are merely schematic diagrams of embodiments, and the components in the drawings are not necessarily essential for implementing the present invention.

[0044] Example 1

[0045] In this embodiment 1, a railway foreign object intrusion detection system based on motion process perception is first provided, including: an acquisition module for acquiring two frames of railway monitoring video sequence images at consecutive times; a segmentation module for acquiring foreground segmentation results of the images based on Gaussian filtering and binarization, image differencing, and morphological operations; a filtering module for constructing a historical foreground map based on the foreground segmentation results and filtering foreground regions; and a matching module for, for a certain foreground region, based on the center point coordinates, using the foreground result whose difference between the center point and the image width coordinates of the boundary of the foreground region's bounding box in the direction of motion is the smallest and less than a pixel threshold as the target localization result of the foreground region in the current frame.

[0046] In this embodiment 1, the above-described system is used to implement a railway foreign object intrusion detection method based on motion process perception. The method includes: acquiring two frames of railway monitoring video sequence images at different times; obtaining the foreground segmentation result of the image based on Gaussian filtering and binarization, image differencing, and morphological operations; constructing a historical foreground map based on the foreground segmentation result and filtering the foreground region; assigning the single-frame difference foreground result of the current frame to all historical foreground regions that have been filtered and determined to move along a specific direction according to the center point coordinates; for a certain foreground region, the foreground result with the smallest difference between the image width coordinates of the center point and the boundary of the foreground region's bounding box at the direction of movement, which is less than a pixel threshold, is taken as the target localization result of the foreground region in the current frame.

[0047] When the image size is smaller than a preset threshold, the input image is synchronously enlarged to the threshold size. After Gaussian filtering, binarization, and image differencing are completed, a preliminary foreground segmentation result is obtained. Morphological processing, which involves first image erosion and then image dilation, is used to eliminate small noise foregrounds while reducing possible holes in the foreground, resulting in a higher quality foreground segmentation result.

[0048] The construction of the historical foreground map includes: adding the difference results of the current frame with the difference results of the previous frames. The foreground region in the historical foreground map corresponding to the moving target continues to extend as the foreground results accumulate. The development direction of the foreground region represents the position and direction of the moving target.

[0049] The process of constructing the historical perspective map is as follows:

[0050] R_his t =add(R_his t-1 ,R t )

[0051] Among them, R_his t 、R_his t-1 R is the historical foreground image at frames t and t-1. t This represents the single-frame difference result at time t, and the add operation is an addition operation on the foreground image.

[0052] Foreground region selection includes: data association and motion feature judgment based on the bounding boxes of foreground regions in the historical background images of previous and subsequent frames. Data association refers to using IOU to represent the positional differences of each foreground region, and using the Hungarian algorithm to achieve data association between previous and subsequent frames, thereby establishing or updating the historical spatial information trajectory of the target's foreground region at each moment. The formula is as follows:

[0053]

[0054] Let D be the bounding box result of the foreground region in the current frame. h The tracking result f of the trajectory corresponding to the foreground region in the previous frame. t Each contains U1 foreground region bounding box information and V1 trajectory bounding box information. To achieve the association and matching of the two, the bounding box result D is first calculated pairwise for each bounding box. h (i)(i∈[1,U1]) and each trajectory result f t The IOU value of the target box corresponding to (j)(j∈[1,V1]) is used as a similarity measure, and then the matching of the detection result of the current frame and the trajectory result is completed based on the Hungarian algorithm.

[0055] The bounding box of the successfully matched foreground region and its spatial trajectory are analyzed at the four corner points of the tracking result in the previous frame to determine the target's motion mode and corresponding motion status. For targets moving to the left, if the bounding box of its historical foreground image in the current frame and its corresponding trajectory in the previous frame satisfy the condition that at least one corner point on the right side coincides, and the coordinate difference of the left corner point in the corresponding image width direction is greater than a threshold, then the target's motion in the last two frames is considered to conform to the motion process, and the left-movement flag of the target's corresponding historical foreground region is incremented by one. If this flag exceeds 3, the foreground region is marked as having passed the screening and its corresponding moving target is a left-moving target. The screening method for the historical foreground region corresponding to right-moving targets is the same as the aforementioned left-movement discrimination method.

[0056] Example 2

[0057] like Figure 1 As shown in Embodiment 2, this system provides a railway foreign object intrusion detection system based on motion process perception, comprising three parts: a foreground extraction module 1, a motion process perception module 2, and a target localization module 3. It integrates target tracking and foreground extraction methods to construct a comprehensive foreign object intrusion detection algorithm applicable to railways, proposing a foreground extraction algorithm based on inter-frame difference. Based on the foreground segmentation results, it combines target tracking data association to achieve perception of the intruding target's motion process and further filtering of foreground information, thereby achieving detection of all types of railway intrusion targets while avoiding noise foreground interference. The railway foreign object intrusion detection system based on motion process perception proposed in Embodiment 2 can issue an early warning after detecting a railway intrusion target, prompting staff to promptly handle and repair it.

[0058] like Figure 2 As shown, the foreground extraction module includes four steps: image size judgment and small image magnification, Gaussian filtering and binarization, image differencing, and morphological operations. The input is a sequence of two consecutive frames of railway monitoring video images. Considering that the target size in the railway scene is small, performing differencing and post-processing may result in the loss of foreground. Therefore, when the image size is less than (1280, 720), the input image is synchronously magnified to this size. After completing Gaussian filtering, binarization, and image differencing, a preliminary foreground segmentation result can be obtained. However, the image may still contain some minor noise. In this embodiment, morphological processing of image erosion followed by image dilation is used to eliminate minor noise in the foreground while minimizing potential holes in the foreground, resulting in higher-quality foreground information. In particular, after the image is magnified, the size of the structuring element in the image erosion is synchronously changed from (5, 5) to (3, 3), while the size of the structuring element in the image dilation remains at (9, 9).

[0059] like Figure 3As shown, the input of the motion process perception module is the result of the foreground extraction module, which includes two steps: obtaining the historical foreground map and filtering the foreground region.

[0060] The motion perception process is based on the construction of a historical foreground map. That is, during the real-time processing of railway monitoring video, the difference result of the current frame is added to the difference result of the past frames. The foreground region in the historical foreground map corresponding to the moving target continues to expand as the foreground results accumulate. The development direction of the foreground region represents the position and direction of the moving target.

[0061] The process of constructing the historical perspective map is as follows:

[0062] R_his t =add(R_his t-1 ,R t )

[0063] Among them, R_his t 、R_his t-1 For the first t Historical foreground plot at frame t-1, R t This represents the single-frame difference result at time t, and the add operation is an addition operation on the foreground image.

[0064] Based on the historical foreground map, this embodiment proposes the concept of a historical foreground region, defined by each part of the foreground and its bounding box in the historical foreground map. The foreground region selection process is achieved based on data association and motion feature judgment of the bounding boxes of the foreground regions in the historical background maps of consecutive frames. Data association refers to using IOU to represent the positional differences of each foreground region, and using the Hungarian algorithm to achieve data association between consecutive frames, thereby establishing or updating the spatial information trajectory of the historical foreground region of the target at each moment. The formula is as follows:

[0065]

[0066] Let D be the bounding box result of the foreground region in the current frame. h The tracking result f of the trajectory corresponding to the foreground region in the previous frame. t Each contains U1 foreground region bounding box information and V1 trajectory bounding box information. To achieve the association and matching of the two, the bounding box result D is first calculated pairwise for each bounding box. h (i)(i∈[1,U1]) and each trajectory result f t The IOU value of the target bounding box (j) (j∈[1,V1]) is used as the similarity measure. Then, the matching of the detection result and the trajectory result of the current frame is completed based on the Hungarian algorithm.

[0067] The bounding boxes of the foreground regions in consecutive frames that satisfy the spatial matching relationship are considered to belong to the same moving target. During real-time image sequence processing, feature analysis is performed on the four corner points of the tracking result in the previous frame for the successfully matched foreground region bounding boxes and their spatial trajectories. Figure 4 The diagram illustrates two motion modes and four motion scenarios, both left-hand and right-hand, constructed based on the image width direction. For a target moving left-hand, if its historical foreground image's bounding box in the current frame and its corresponding trajectory in the previous frame satisfy the condition that at least one corner point on the right side coincides, and the coordinate difference of the left corner point in the corresponding image width direction is greater than a threshold, then the target's motion in the last two frames is considered to conform to the motion process. This increments the left-hand motion flag of the target's corresponding historical foreground region by one. If this flag exceeds 3, the foreground region is marked as having passed the screening, and its corresponding moving target is identified as a left-hand moving target. The screening method for the historical foreground region corresponding to a right-hand moving target is consistent with the aforementioned left-hand motion discrimination method.

[0068] like Figure 5 As shown, after completing motion detection and foreground region filtering, the target localization module assigns the current frame's single-frame differential foreground result to all historical foreground regions that have passed the filtering and been determined to move along a specific direction, based on the center point coordinates. For example... Figure 5 As shown, for a given foreground region, the foreground result whose difference between the center point and the image width coordinates of the boundary of the foreground region's bounding box in the direction of movement is the smallest and less than a pixel threshold is taken as the target localization result of that foreground region in the current frame. In this embodiment, the pixel threshold is a value of 20 pixels.

[0069] Example 3

[0070] This embodiment 3 provides a non-transitory computer-readable storage medium for storing computer instructions. When executed by a processor, the computer instructions implement the railway foreign object intrusion detection method based on motion process perception as described above. The method includes:

[0071] Acquire two frames of railway surveillance video sequence images at consecutive times;

[0072] Based on Gaussian filtering and binarization, image differencing, and morphological operations, the foreground segmentation results of the image are obtained;

[0073] Based on the foreground segmentation results, a historical foreground map is constructed, and foreground regions are selected.

[0074] For a certain foreground region, based on the center point coordinates, the foreground result with the smallest difference between the image width coordinates of the center point and the boundary of the foreground region's bounding box in the direction of movement, and which is less than the pixel threshold, is taken as the target localization result of the foreground region in the current frame.

[0075] Example 4

[0076] This embodiment 4 provides a computer device, including a memory and a processor, wherein the processor and the memory communicate with each other, and the memory stores program instructions that can be executed by the processor. The processor calls the program instructions to execute the railway foreign object intrusion detection method based on motion process perception as described above, the method including:

[0077] Acquire two frames of railway surveillance video sequence images at consecutive times;

[0078] Based on Gaussian filtering and binarization, image differencing, and morphological operations, the foreground segmentation results of the image are obtained;

[0079] Based on the foreground segmentation results, a historical foreground map is constructed, and foreground regions are selected.

[0080] For a certain foreground region, based on the center point coordinates, the foreground result with the smallest difference between the image width coordinates of the center point and the boundary of the foreground region's bounding box in the direction of movement, and which is less than the pixel threshold, is taken as the target localization result of the foreground region in the current frame.

[0081] Example 5

[0082] This embodiment 5 provides an electronic device, including: a processor, a memory, and a computer program; wherein, the processor is connected to the memory, and the computer program is stored in the memory. When the electronic device is running, the processor executes the computer program stored in the memory to cause the electronic device to execute instructions for implementing the railway foreign object intrusion detection method based on motion process perception as described above. The method includes:

[0083] Acquire two frames of railway surveillance video sequence images at consecutive times;

[0084] Based on Gaussian filtering and binarization, image differencing, and morphological operations, the foreground segmentation results of the image are obtained;

[0085] Based on the foreground segmentation results, a historical foreground map is constructed, and foreground regions are selected.

[0086] For a certain foreground region, based on the center point coordinates, the foreground result with the smallest difference between the image width coordinates of the center point and the boundary of the foreground region's bounding box in the direction of movement, and which is less than the pixel threshold, is taken as the target localization result of the foreground region in the current frame.

[0087] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0088] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0089] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0090] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment, whereby a series of operational steps are performed to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0091] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that, based on the technical solutions disclosed in the present invention, various modifications or variations that can be made by those skilled in the art without creative effort should be included within the scope of protection of the present invention.

Claims

1. A method for detecting foreign object intrusion in railways based on motion process sensing, characterized in that, include: Acquire two frames of railway surveillance video sequence images at consecutive times; Based on Gaussian filtering and binarization, image differencing, and morphological operations, the foreground segmentation results of the image are obtained; Based on the foreground segmentation results of each frame, a historical foreground map is constructed, and foreground regions are filtered. For a certain foreground region, based on the coordinates of the center point of the foreground result in the current frame, the foreground result with the smallest difference between the center point and the image width coordinates of the boundary of the foreground region's bounding box in the direction of movement, which is less than a set pixel threshold, is taken as the target localization result of the foreground region in the current frame.

2. The railway foreign object intrusion detection method based on motion process perception according to claim 1, characterized in that, When the image size is smaller than the preset threshold size, the input image is synchronously enlarged to the threshold size. After Gaussian filtering, binarization and image differencing are completed, a preliminary foreground segmentation result is obtained. Morphological processing of image erosion and then image dilation is used to eliminate small noise foreground while reducing holes in the foreground, thus obtaining the foreground segmentation result.

3. The railway foreign object intrusion detection method based on motion process perception according to claim 1, characterized in that, The construction of the historical foreground map includes: adding the difference results of the current frame with the difference results of the previous frames. The foreground region in the historical foreground map corresponding to the moving target continues to extend as the foreground results accumulate. The development direction of the foreground region represents the position and direction of the moving target.

4. The railway foreign object intrusion detection method based on motion process perception according to claim 1, characterized in that, The foreground region selection includes: data association and motion feature judgment based on the bounding boxes of the foreground region in the historical background images of the previous and next frames. The data association refers to using IOU to represent the positional differences of each foreground region, and using the Hungarian algorithm to achieve data association between the previous and next frames, thereby establishing or updating the historical foreground region spatial information trajectory of the target at each moment.

5. The railway foreign object intrusion detection method based on motion process perception according to claim 4, characterized in that, Let D be the bounding box result of the foreground region in the current frame. h The tracking result f of the trajectory corresponding to the foreground region in the previous frame. t Each contains U1 foreground region bounding box information and V1 trajectory bounding box information. To achieve the association and matching of the two, the bounding box result D is first calculated pairwise for each bounding box. h (i)(i∈[1,U1]) and each trajectory result f t The IOU value of the target box corresponding to (j)(j∈[1,V1]) is used as a similarity measure, and then the matching of the detection result of the current frame and the trajectory result is completed based on the Hungarian algorithm.

6. The railway foreign object intrusion detection method based on motion process perception according to claim 5, characterized in that, The feature analysis of the four corner points of the tracking result of the previous frame is performed on the bounding box of the successfully matched foreground region and the spatial information trajectory of the foreground region matched with it to determine the target motion mode and the corresponding motion situation.

7. A railway foreign object intrusion detection system based on motion process sensing, characterized in that, include: The acquisition module is used to acquire two frames of railway monitoring video sequence images at consecutive times; The segmentation module is used to obtain the foreground segmentation results of the image based on Gaussian filtering and binarization, image differencing, and morphological operations. The filtering module is used to construct a historical foreground map based on the foreground segmentation results of each frame and to filter foreground regions. The matching module, for a certain foreground region, takes the foreground result with the smallest difference between the center point and the image width coordinate of the boundary of the foreground region's bounding box in the current frame, which is less than a set pixel threshold, as the target localization result of the foreground region in the current frame, based on the coordinates of the center point of the foreground result in the current frame.

8. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium is used to store computer instructions, which, when executed by a processor, implement the railway foreign object intrusion detection method based on motion process perception as described in any one of claims 1-6.

9. A computer device, characterized in that, The system includes a memory and a processor, which communicate with each other. The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the railway foreign object intrusion detection method based on motion process perception as described in any one of claims 1-6.

10. An electronic device, characterized in that, include: The device includes a processor, a memory, and a computer program; wherein the processor is connected to the memory, the computer program is stored in the memory, and when the electronic device is running, the processor executes the computer program stored in the memory to cause the electronic device to execute instructions to implement the railway foreign object intrusion detection method based on motion process sensing as described in any one of claims 1-6.