A method for detecting the occupancy status of track sections in rail transit stations
By using camera footage and video image analysis, the problem of rapid and safe detection of track occupancy status in rail transit stations has been solved, achieving contactless real-time detection and accurate judgment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2026-03-10
AI Technical Summary
In existing technologies, the detection of track occupancy status in rail transit stations requires the addition of communication interfaces, which makes system safety assessment complex and time-consuming, and makes it impossible to quickly and safely obtain track occupancy status.
The system captures station footage from the display screen in the rail transit dispatch hall using cameras, analyzes the video images to obtain track section occupancy information, extracts regions of interest, preprocesses images, corrects brightness and color, and uses inter-frame difference to detect track section occupancy status.
It enables contactless, rapid, and safe detection of track occupancy status in rail transit stations, reducing engineering workload and improving detection speed and accuracy.
Smart Images

Figure CN116985873B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of rail transit, in particular to a rail transit station yard track section occupation state detection method. BACKGROUND
[0002] In the rail transit train operation control system, the detection of the track section occupation state is the basic data of train operation protection, which is directly related to the train safety. The computer interlocking system realizes the interlocking control between the turnouts, signal lights and track circuits in the station under the operation of the signal operator or the ATS system, and is an indispensable guarantee equipment for safe and efficient train operation of rail transit. The station computer interlocking system belongs to a functional safety system, and the connection with other systems has strict restrictions, and usually no external communication interface is provided. With the development of intelligent operation and maintenance of rail transit, relevant professionals such as train maintenance depot, track maintenance depot and vehicle depot need to obtain the station computer interlocking information to quickly understand the occupation state of each track section in the station, which is beneficial to the development of relevant work. In the existing scheme, the station computer interlocking system is often required to add a separate communication interface, and the station yard information containing the track section occupation state is sent through a safe communication protocol, which involves re-evaluation of system safety and coordination of multiple professionals, which is time-consuming and laborious. SUMMARY
[0003] The purpose of the present application is to overcome the above problems, and to provide a rail transit station yard track section occupation state detection method, which realizes rapid and safe detection of the track section occupation state.
[0004] The present application can be realized by the following detection method: a rail transit station yard track section occupation state detection method, characterized in that a camera is used to shoot the station yard picture of the rail transit dispatching hall display screen, and the shot video image is analyzed to obtain the track section occupation information, so as to obtain the occupation state of each track section in the station yard under the condition of no electrical connection.
[0005] A rail transit station yard track section occupation state detection method, comprising the following steps:
[0006] S1, collecting the station yard picture video of the rail transit dispatching hall display screen, the specific steps comprising fixing the relative position and angle of the camera and the rail transit dispatching hall display screen, collecting the station yard picture video of the rail transit dispatching hall display screen shot by the camera, and transmitting the station yard picture video to the host computer through the network;
[0007] S2, reading the station yard picture video stream, performing region of interest extraction and image preprocessing, specifically comprising the following steps:
[0008] Step S21, extracting the region of interest from the original station yard picture to obtain the region of interest image The region of interest is the area encompassing the entire station line that requires image processing, and the calculation formula is as follows:
[0009] One transformation is:
[0010]
[0011] The second transformation is:
[0012]
[0013] in, It is a new three-dimensional spatial coordinate system. These are matrix parameters. These are the two-dimensional plane coordinates of the original image. These are the two-dimensional planar coordinates of the region of interest;
[0014] Step S22: Image of the region of interest The brightness of each pixel is adjusted using the following method:
[0015] Step S221: First, convert the region of interest image into the HSV color gamut. The calculation formula is as follows:
[0016]
[0017] Step S222: Adjust the Gamma parameter according to the distribution characteristics of the luminance component V of the pixels in the region of interest image to obtain the adaptively corrected region of interest image. The calculation formula is as follows:
[0018]
[0019] in, It is the first The luminance component obtained by multi-scale convolution of the luminance component V of each pixel. For the Gamma parameter, The first two times before and after brightness adjustment The value of each pixel;
[0020] Step S23: Apply the adaptively corrected region of interest image The pixels are color-corrected, specifically by selecting a region in the adaptively corrected region of interest image whose color remains unchanged as a color reference, and calculating its average color component value and position coordinates, denoted as: Based on a pre-set specific threshold The adaptively corrected region of interest image Color matching and correction were performed to obtain the preprocessed station view image. , the modified formula is as follows:
[0021]
[0022] wherein, H is the color component H of the pixel point of the image before and after correction, H is the average value of the color component H of the image before correction, The color component is processed in the same way.
[0023] S3, manually calibrate the number and position of all track sections in the station picture image;
[0024] S4, based on the standard HSV color space displayed by various occupancy states of the track section and the pre-set specific threshold (20, 20, 10), the color standard of various occupancy states of the track section is formulated, denoted as: , various occupancy states and corresponding standard HSV color space include: track section idle— , track section locking (train front route)— , track section locking (train rear route)— , track section occupied— ;
[0025] S5, according to the number and position of all track sections obtained in step S3 and the color standard of various occupancy states of the track section obtained in step S4, determine the initial occupancy state of all track sections;
[0026] S6, using inter-frame difference method to difference the gray value of the two images obtained in step S2 to determine the track section whose occupancy state changes;
[0027] S7, according to the track section whose occupancy state changes obtained in step S6 and the color standard obtained in step S4, determine the new occupancy state of the track section whose occupancy state changes.
[0028] Further, the step S3 of manually calibrating the number and position of all track sections in the pre-processed station picture image only needs to manually calibrate the information once, and the first frame of station picture image is taken as a sample image for processing, which specifically includes:
[0029] In the coordinate system of the station picture image S'', the signal position and the turnout insulating joint position are taken as the demarcation points, and the manually calibrated track sections are recorded in the order from left to right and from top to bottom, and according to the number of straight line segments contained in the track section, the starting point coordinates and the end point coordinates of all straight line segments of the track section are recorded in the order, denoted as:
[0030] ,
[0031] in, These are the starting and ending coordinates of the k-th straight line segment of the j-th track section, respectively. If k=1, it indicates that the track section is a track section without a turnout; if k=2, it indicates that the track section contains one turnout; if k=3, it indicates that the track section contains two turnouts.
[0032] Furthermore, step S5, which determines the initial occupancy status information of all track segments, specifically includes the following steps:
[0033] Step S51: Calculate the straight segment of the track section obtained in step S3. The average HSV value is calculated using the following formula:
[0034]
[0035] in, It refers to the straight sections of the track section. Color components, yes Number of pixels included It is the first The color components of each pixel;
[0036] Step S52: Calculate each straight segment of the track section. Average HSV value and color standard for various occupancy states Distance value The calculation formula is as follows:
[0037]
[0038] in, It refers to the straight sections of the track section. Color components and color standards The distance value of the color component;
[0039] Step S53: Determine the track section The average HSV value is closest to the color standard In order to obtain the track section Occupancy status The calculation formula is as follows:
[0040]
[0041] If each straight segment of the track section If the values are inconsistent, the occupancy status of the track segment is determined according to the priority rule of "track segment occupied → track segment locked → track segment idle". .
[0042] Furthermore, determining the track segment whose occupancy status has changed in step S6 specifically includes the following steps:
[0043] Step S61: Convert the HSV images of adjacent frames obtained in step S2 into grayscale images, and perform difference calculation on the grayscale values corresponding to the images to obtain the nth frame and the... The differential image of the station field scene image described in the frame The calculation formula is as follows:
[0044]
[0045] in, They are the nth frame and the nth frame respectively. The first frame of the station field image The grayscale value of each pixel;
[0046] Step S62: Preset threshold The difference image Convert to binary image The calculation formula is as follows:
[0047]
[0048] Step S63: The binarized image... The erosion image is obtained through erosion operations. Continue the dilation operation to obtain the image. The solution is as follows:
[0049]
[0050] in, Indicates corrosion and expansion. It is the size of The convolution kernel;
[0051] Step S64: Process the image Perform line segment detection, draw the smallest bounding rectangle, and calculate the coordinates of the top-left and bottom-right corners of the rectangle, denoted as: ;
[0052] Step S65: Based on all track segments obtained in step S3 The number and position are used to determine the track segments whose occupancy status changes in the nth frame of the image. The solution is as follows:
[0053]
[0054] in, It is the overlapping area of the straight segment of the track section and the rectangular frame. It is the straight section of the track segment. area, It is the threshold for determining whether the rectangle is valid.
[0055] Further, determining the new occupancy status of the changed track segment in step S7 includes: determining the new occupancy status of the changed track segment in step S5 based on the changed track segment among all track segments obtained in step S6 and the color standard obtained in step S4.
[0056] Compared with the prior art, the present invention has the following advantages:
[0057] I. This invention utilizes a camera to acquire station images displayed on the screen of the rail transit dispatch hall, processes and judges the real-time acquired station images, and realizes real-time detection of the track occupancy status of rail transit station sections in a non-intrusive manner without contact, effectively reducing the amount of detection work, improving the detection speed, and ensuring the safety of detection.
[0058] Second, this invention can accurately and quickly locate the track segment from the acquired image by using pre-calibrated initialization information. It describes the display color of each pixel on the track segment with a set of HSV values and determines the initial occupancy status of the track segment based on the pre-obtained standard HSV color space threshold, thus ensuring the accuracy of the detection results.
[0059] Third, this invention utilizes the inter-frame difference method to locate track segments in the video stream whose occupancy status changes, thereby reducing the amount of engineering calculations and improving detection efficiency. Attached Figure Description
[0060] Figure 1 This is a schematic diagram of the method flow of the present invention;
[0061] Figure 2a and Figure 2b This is the station view image after preprocessing the original image in the embodiment;
[0062] Figure 3 This is an example diagram of track segment calibration in the embodiment;
[0063] Figure 4a and Figure 4b These are partial images of the station site from two consecutive frames in the embodiment;
[0064] Figure 5a and Figure 5b This is the binarized image of the difference image in the embodiment after binarization and closing operation;
[0065] Figure 6a and Figure 6b This is a partial image of the station area where the track section whose occupancy status has changed is located using the minimum bounding rectangle in the embodiment. Detailed Implementation
[0066] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. Example
[0067] This embodiment provides a method for detecting the occupancy status of track sections in rail transit stations. Figure 1 This is a flowchart of a method for detecting the occupancy status of track sections in a rail transit station according to an embodiment of the present invention, as follows: Figure 1 As shown, the flowchart includes the following steps:
[0068] S1. Acquire station scene video from the display screen of the rail transit dispatch hall. The specific steps include fixing the relative position and angle of the camera and the display screen of the rail transit dispatch hall, acquiring the station scene video captured by the camera from the display screen of the rail transit dispatch hall, and transmitting the station scene video to the host via the network.
[0069] S2. Read the video stream of the station and perform region of interest extraction and image preprocessing;
[0070] S3. Manually label the number and location of all track sections in the station image;
[0071] S4, Standard HSV color space based on display of various occupancy statuses of track segments. And based on pre-set specific thresholds (20, 20, 10), color standards are established for various occupancy states of track sections, denoted as: Various occupancy statuses and their corresponding standard HSV color spaces include: track segment idle— Track section locking (train's forward route) — Track section locking (train rear route) — Track section occupancy— ;
[0072] S5. Based on the numbers and positions of all track segments obtained in step S3 and the color standards of various occupancy states of track segments obtained in step S4, determine the initial occupancy state of all track segments.
[0073] S6. Use the inter-frame difference method to perform difference operations on the gray values of the two consecutive frames of images obtained in step S2 to determine the track segments whose occupancy status has changed.
[0074] S7. Based on the track segments whose occupancy status has changed as obtained in step S6 and the color standard obtained in step S4, determine the new occupancy status of the track segments whose occupancy status has changed.
[0075] This embodiment applies the above technical solution, and its specific process includes:
[0076] B100: Acquire station scene video from the display screen of the rail transit dispatch hall. The specific steps include fixing the relative position and angle of the camera and the display screen of the rail transit dispatch hall, acquiring the station scene video captured by the camera from the display screen of the rail transit dispatch hall, and transmitting the station scene video to the host via the network.
[0077] B200: Read the station's video stream, perform region of interest extraction and image preprocessing, and the original and preprocessed station images are shown below. Figure 2a , Figure 2b As shown. The specific steps are as follows:
[0078] B2001: Extract the region of interest (ROI) from the original station view to obtain the ROI image S. The ROI is the area containing the entire station line that needs image processing. The calculation formula is as follows:
[0079] One transformation is:
[0080]
[0081] The second transformation is:
[0082]
[0083] in, It is a new three-dimensional spatial coordinate system. These are matrix parameters. These are the two-dimensional plane coordinates of the original image. These are the two-dimensional planar coordinates of the region of interest;
[0084] B2002: Adjust the brightness of the pixels in the region of interest image S, specifically by:
[0085] B20021: First, convert the region of interest image to the HSV color gamut. The calculation formula is as follows:
[0086]
[0087]
[0088] B20022: Adjust the Gamma parameter according to the distribution characteristics of the luminance component V of the pixels in the region of interest image to obtain the adaptively corrected region of interest image. The calculation formula is as follows:
[0089]
[0090] in, It is the first The luminance component obtained by multi-scale convolution of the luminance component V of each pixel. For the Gamma parameter, The first two times before and after brightness adjustment The value of each pixel;
[0091] B2003: The adaptively corrected region of interest image The pixels are color-corrected, specifically by selecting a region in the adaptively corrected region of interest image whose color remains unchanged as a color reference, and calculating its average color component value and position coordinates, denoted as: Based on a pre-set specific threshold The adaptively corrected region of interest image Color matching and correction were performed to obtain the preprocessed station view image. The corrected formula is as follows:
[0092]
[0093] in, To correct the color component H of the pixels in the images before and after, To correct the mean of the color component H in the original image, Color components are processed in the same way.
[0094] B300: Manually label the number and location of all track sections in the station view image. This only requires manual labeling once. The first frame of the station view image is used as a sample image for processing. Figure 3 This is an example diagram of track section calibration. A section of track is selected for calibration: Specifically, it includes:
[0095] The station screen image In a coordinate system, the manually calibrated track sections are recorded in order from left to right and from top to bottom, using the signal position and the switch insulation joint position as the dividing points. And based on the number of straight segments contained in the track segment, record the start coordinates and end coordinates of all straight segments in the track segment in the order described above, denoted as:
[0096]
[0097] in, They are the first The starting and ending coordinates of the kth straight line segment of a track section are given. If k=1, the track section is a track section without a turnout; if k=2, the track section contains one turnout; if k=3, the track section contains two turnouts.
[0098] B400: Standard HSV color space for displaying various occupancy statuses of track sections. And based on pre-set specific thresholds (20, 20, 10), color standards are established for various occupancy states of track sections, denoted as: Various occupancy statuses and their corresponding standard HSV color spaces include: Track section idle — Track section locked (train forward route) — Track section locked (train rear route) — Track section occupancy—M413025525580170200
[0099] B500: Based on the track segment numbers and locations obtained from B300 and the color standards for various track segment occupancy statuses obtained from B400, determine the initial occupancy status of all track segments. The specific steps are as follows:
[0100] B5001: Straight section of track segment obtained from B300 The average HSV value is calculated using the following formula:
[0101]
[0102] in, It refers to the straight sections of the track section. Color components, yes Number of pixels included It is the first The color components of each pixel;
[0103] B5002: Calculate each straight segment of the track section. Average HSV value and color standard for various occupancy states Distance value The calculation formula is as follows:
[0104]
[0105] in, It refers to the straight sections of the track section. Color components and color standards The distance value of the color component;
[0106] B5003: Determining the track section The average HSV value is closest to the color standard In order to obtain the track section Occupancy status The calculation formula is as follows:
[0107]
[0108] If each straight segment of the track section If the values are inconsistent, the occupancy status of the track segment is determined according to the priority rule of "track segment occupied → track segment locked → track segment idle". .
[0109] B600: The inter-frame difference method is used to perform difference operations on the grayscale values of the two consecutive frames obtained in step S2 to determine the track segments whose occupancy status has changed, including the following steps:
[0110] B6001: Convert the HSV images of adjacent frames obtained in step S2 into grayscale images, and perform differential calculation on the grayscale values corresponding to the images to obtain the difference image between the nth frame and the (n-1)th frame of the station field image. ,like Figure 5a As shown, the calculation formula is as follows:
[0111]
[0112] in, They are the nth frame and the nth frame respectively. The first frame of the station field image HSV values of each pixel;
[0113] B6002: Preset threshold The difference image Convert to binary image The calculation formula is as follows:
[0114]
[0115] B6003: For the binarized image The erosion image is obtained through erosion operations. Continue the dilation operation to obtain the image. ,like Figure 5b As shown, the processing method is as follows:
[0116]
[0117] in, Indicates corrosion and expansion. It is the size of The convolution kernel;
[0118] B6004: Regarding the image Perform line segment detection and draw the minimum bounding rectangle, such as Figure 6a , Figure 6b As shown, calculate the coordinates of the top left and bottom right corners of the rectangle, denoted as:
[0119] B6005: All track sections obtained from B300 The number and position are used to determine the track segments whose occupancy status changes in the nth frame of the image. The solution is as follows:
[0120]
[0121] in, It is the overlapping area of the straight segment of the track section and the rectangular frame. It is the straight section of the track segment. area, It is the threshold for determining whether the rectangle is valid.
[0122] B700: Based on the track segments whose occupancy status has changed obtained from B600 and the color standard obtained from B400, determine the new occupancy status of the track segments whose occupancy status has changed.
[0123] B800: Update the occupancy status information of the track section.
[0124] In summary, this technical solution does not rely on electrical connections with the station's computer interlocking system, and can detect the real-time track occupancy status of rail transit stations in a contactless manner without direct electrical connection.
[0125] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. This invention can be implemented in other specific forms without departing from its spirit and scope (e.g., when the detection object is a station display screen image from other train operation control systems such as ATS or CTC). Furthermore, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope, and these modifications and variations should also be considered within the scope of protection of this invention. Therefore, the appended claims are intended to include the preferred embodiments as well as all changes and modifications falling within the scope of this invention.
Claims
1. A rail transit station yard track section occupancy state detection method, characterized in that, The method comprises the following steps: (1) collecting a station yard picture video of a rail transit dispatching hall display screen, the specific steps comprising the relative position and angle of a fixed camera and the rail transit dispatching hall display screen, collecting a station yard picture video of the rail transit dispatching hall display screen shot by the camera, and transmitting the station yard picture video to a host computer through a network; (2) reading the station yard picture video stream, performing region of interest extraction and image preprocessing, which comprises the following steps: Step (2a): performing region of interest extraction on the original station yard picture to obtain a region of interest image S, the region of interest being a region containing all lines of the station yard required for image processing, and the calculation formula being as follows: Once transformation is: The second transformation is: wherein, is a new three-dimensional space coordinate, is a matrix parameter, is a two-dimensional plane coordinate of the original image, is a two-dimensional plane coordinate of the region of interest; Step (2b): Image of the region of interest The brightness of the pixels is adjusted as follows: First, the region of interest image is converted to the HSV color gamut; then, the Gamma parameter is adjusted according to the distribution characteristics of the brightness component V of the pixels in the region of interest image to obtain the adaptively corrected region of interest image. The calculation formula is as follows: in, It is the first The luminance component obtained by multi-scale convolution of the luminance component V of each pixel. For the Gamma parameter, The first two times before and after brightness adjustment The value of each pixel; Step (2c): The adaptively corrected region of interest image The pixels are color-corrected, specifically by selecting a region in the adaptively corrected region of interest image whose color remains unchanged as a color reference, and calculating its average color component value and position coordinates, denoted as: Based on a pre-set specific threshold The adaptively corrected region of interest image Color matching and correction were performed to obtain the preprocessed station view image. The corrected formula is as follows: wherein, is the color component H of the pixel point of the image before correction, is the mean value of the color component H of the image before correction, The color components are processed in the same way. (3) manually calibrating the numbers and positions of all track sections in the image obtained in step (2); (4) Standard HSV color space based on various occupancy states of track sections and pre-set specific threshold values , make color standards of various occupancy states of track sections, denoted as: ; (5) determining the initial occupancy state of all track sections according to the numbers and positions of all track sections obtained in step (3) and the color standard of various occupancy states of track sections obtained in step (4); (6) performing difference operation on the gray scale values of two images obtained in step (2) in sequence by using an inter-frame difference method to determine the track sections whose occupancy states have changed; (7) determining the new occupancy state of the track sections whose occupancy states have changed according to the track sections whose occupancy states have changed obtained in step (6) and the color standard obtained in step (4).
2. The method according to claim 1, wherein, In step (3), manual calibration of the numbers and positions of all track sections in the preprocessed station yard picture image is only required to calibrate information once, and the first frame of station yard picture image is processed as a sample image, which specifically comprises: In the coordinate system of the station field picture image The artificial calibration track section is recorded in the order from left to right and from top to bottom with the signal position and the turnout insulated joint position as the demarcation points According to the number of straight line segments contained in the track section, the starting point coordinates and the end point coordinates of all straight line segments of the track section are recorded in the order, which is recorded as: , wherein, respectively are the start point coordinate and the end point coordinate of the kth straight line segment of the jth track section, if k = 1, it means that the track section is a straight track section; if k = 2, it means that the track section contains one turnout; if k = 3, it means that the track section contains two turnouts.
3. The method according to claim 1, characterized in that, determining an initial occupancy state of all track sections in the step (5) comprising the following steps: Step (5a): Calculate the average HSV value of the straight line segments of the track section obtained in step (3) according to the following formula: Step (5a): Calculate the average HSV value of the straight line segments of the track section obtained in step (3) according to the following formula: in, It refers to the straight sections of the track section. Color components, yes Number of pixels included It is the first The color components of each pixel; Step (5b): calculating the average HSV value of each straight line segment of the track section and the color standard of each occupancy state wherein, is the distance value of the color component on each straight line segment of the track section and the color component of the color standard . Step (5c): determining the color standard with the smallest distance to the average HSV value of the track section to obtain the occupancy state of the track section The formula is as follows: If the track section is each straight line segment If the values are inconsistent, the occupation state of the track section is determined according to the occupation state priority rule of "track section occupation→track section locking→track section idle" .
4. The method according to claim 1, characterized in that, In step (6), the track sections whose occupancy states have changed are determined, which specifically comprises the following steps: Step (6a): converting the HSV image of the adjacent frames obtained in step (2) into a gray scale image, and differentiating the corresponding gray scale value of the image to obtain a differential image , and presetting a threshold value , and converting the differential image into a binary image , and the calculation formula is as follows: Step (6b): performing an operation on the binary image to obtain an eroded image by an erosion operation , and continuing the dilation operation to obtain an image The processing method is as follows: wherein, respectively represent corrosion and swelling, is a convolution kernel of size . Step (6c): performing line segment detection on the image , drawing a minimum bounding rectangle and calculating the coordinate values of the upper left corner and the lower right corner of the rectangle, denoted as: ; Step (6d): All track segments whose number and position are obtained according to step (3) are determined by using the rectangular frame frame whose image occupancy state changes , the processing method is as follows: wherein, is an area of overlap of the track segment straight line segment and the rectangular frame, is an area of the track segment straight line segment , is a threshold value for determining whether the rectangular frame is valid.
5. The method according to claim 1, wherein, In step (7), the new occupancy state of the track sections whose occupancy states have changed is determined, which comprises: determining the new occupancy state of the track sections whose occupancy states have changed in step (6) and the color standard obtained in step (4) through step (5).
Citation Information
Patent Citations
Station yard representation information identification method based on a video image
CN112172877A
Station computer interlocking turnout state information detection system and method thereof
CN114120201A