Dynamic locking column edge positioning method and system for visual ranging of switch machine
Through the visual ranging system of the switch machine, the edge of the locked column is positioned in a dark light environment using cameras and image processing technology, which solves the problem of difficult observation of the edge of the locked column, and achieves high-precision switch conversion and improves the safety of the railway system.
Patent Information
- Application Number
- CN202411651239.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-02-28
AI Technical Summary
In dark or dark environments, the vertical drop of the locking column is difficult to observe, making it difficult to find the edge position of the locking column parallel to the representation rod, and it becomes difficult to calculate the gap length.
A dynamic locking column edge positioning system using a switch machine visual distance measurement is used to collect videos representing the movement of the rod and locking column through the camera, image preprocessing and edge detection are performed, pixel positions at the edge of the locking column are traversed, and the true value of the gap distance is calculated based on the proportional coefficient.
Adaptive dynamic locking column edge positioning under dark light or dark conditions is achieved, reducing the measurement error of switch notch displacement, improving the accuracy of switch conversion, and enhancing the safety and reliability of railway systems.
Smart Images

Figure CN119540356A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of turnout distance measurement, and in particular relates to a method and system for positioning the edge of a dynamic locking column of a switch machine using visual distance measurement. Background Art
[0002] The accuracy of the turnout switching equipment directly affects the safety and efficiency of train operation. The key to determining whether the turnout switching is in place is to accurately measure the gap distance between the movement of the indicating rod and the vertical parallel position of the locking column. This process is crucial to the operation of the railway system, especially in environments such as dim light and oil pollution interference.
[0003] In the railway field, turnout switching equipment is a key link in the driving process. Accurately measuring the gap requires obtaining the edge position of the indicating rod and the edge position of the locking column at the same level. The indicating rod moves horizontally, and the edge position is clearly visible. However, after the displacement is completed, due to insufficient light, oil interference or the presence of dark areas, the vertical fall of the locking column becomes difficult to observe, making it difficult to find the edge position of the locking column parallel to the indicating rod, and it becomes difficult to calculate the length of the gap. For this reason, the present invention proposes a dynamic locking column edge positioning method and system for visual ranging of a switch machine. Summary of the invention
[0004] The object of the present invention is to provide a method and system for dynamic locking column edge positioning of a switch machine by visual ranging, so as to solve the problems raised in the above-mentioned background technology.
[0005] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: a dynamic locking column edge positioning system for visual ranging of a switch machine, comprising an indicating rod and a locking column, the indicating rod being provided with an opening, one end of the locking column vertically extending into the opening, the indicating rod being movable in a horizontal direction, the locking column being movable in a vertical direction, a camera being arranged at the rear of the opening, a host computer being arranged above the locking column, and the host computer being connected to the camera via a connecting line.
[0006] A fill light is arranged above the host computer.
[0007] A method for positioning the edge of a dynamic locking column by visual ranging of a switch machine, using the system, specifically comprising the following steps: S101: collecting a video showing the movement of the rod and the locking column by a camera;
[0008] S102: Preprocess each frame of the video to obtain the outline of the rod and the locking column;
[0009] S103: traversing the pixel points within the range of motion of the rod in each frame of the image to obtain pixel positions representing the edge of the rod and the edge of the locking column;
[0010] S104: The ratio of the difference between the maximum and minimum pixel positions of the edge of the locking column to the actual moving distance of the edge of the locking column is the proportional coefficient, and the true distance value of the gap is the difference between the pixel positions of the edge of the rod and the edge of the locking column multiplied by the proportional coefficient.
[0011] Preferably, in step S101, the video captured by the camera includes the moment when the rod and the locking column are in contact with each other, and the moment when the rod and the locking column are farthest apart.
[0012] Preferably, in step S102, each frame of the video is preprocessed, including video image format conversion, image grayscale processing, Gaussian blur smoothing processing and edge detection.
[0013] Preferably, the edge detection is performed by extracting discontinuities of pixel grayscale and texture distribution in each frame of the image.
[0014] Preferably, step S103 comprises: traversing the vertical axis direction and the horizontal axis direction within the motion range of the indicating rod on each frame image, and the area with the most pixels in the horizontal axis direction is the edge position of the indicating rod;
[0015] Preferably, the longitudinal coordinate with the most pixels is found in each frame image to form a smooth distance trajectory curve representing the rod edge, and the minimum value of the smooth distance trajectory curve representing the rod edge is the pixel position of the edge of the locking column.
[0016] Preferably, a moving average or median filter is used to smooth the trajectory curve representing the smooth distance of the rod edge.
[0017] Compared with the prior art, the present invention has the following beneficial effects: the present invention realizes adaptive dynamic locking column edge positioning by moving the indicating rod to fit with the locking column and cooperating with computer vision technology; computer vision can help overcome visual obstacles in dim light or dark conditions; a camera or other visual sensor is used to capture the image of the locking column, and the edge position of the locking column is detected by image processing and analysis technology; the adaptive dynamic locking column edge positioning method can reduce the measurement error of the turnout notch displacement caused by dim light environment or dark area, improve the accuracy of turnout conversion, and thus enhance the safety and reliability of the railway system;
[0018] It can accurately measure the distance between the indicating rod and the locking column in the turnout conversion under various environmental conditions, thereby ensuring the stable operation of the railway system; it can significantly improve the safety and efficiency of the railway system under low-light conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart of the method of the present invention.
[0020] Figure 2It is a schematic diagram of the structure of the system of the present invention.
[0021] In the figure: 1. indicating rod; 2. opening; 3. locking column; 4. upper computer; 5. fill light. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] See also Figure 1 to Figure 2 , which is the first embodiment of the present invention, and this embodiment provides a technical solution: a dynamic locking column edge positioning system for visual ranging of a switch machine, comprising: an indicating rod 1, an opening 2 is arranged on the indicating rod 1, one end of a locking column 3 is located in the opening 2, the indicating rod 1 moves along the horizontal direction, the locking column 3 moves along the vertical direction, and the camera is located behind the opening 2; a host computer 4 is arranged above the locking column 3, the host computer 4 is connected to the camera through a connecting line, the host computer 4 is used to receive the video shot by the camera, and perform data processing and calculation; a fill light 5 is arranged above the host computer 4 to enhance the lighting conditions.
[0024] A method for positioning the edge of a dynamic locking column of a switch machine by visual ranging adopts the above system, and the specific steps include: S101: collecting a video representing the movement of the rod 1 and the locking column 3 through a camera;
[0025] Build a visual measurement platform for the switch system switching environment, including a camera, a fill light 5, a display rod 1, a locking column 3, a connecting line and a host computer 4, such as Figure 2 As shown; define the camera angle of view, coordinate origin, and coordinate axis direction; the camera irradiation direction is the positive direction of the X axis, the horizontal direction is the Y axis direction, and the vertical direction is the Z axis direction; the camera and fill light are fixed; the locking column 3 is fixed in the XY axis position and moves in the Z axis direction. It means that the rod 1 moves along the Y axis direction.
[0026] In step S101 of this embodiment, the video captured by the camera includes the moment when the rod 1 and the locking column 3 are in contact with each other, and the moment when the rod 1 and the locking column 3 are farthest away from each other.
[0027] In the above technical solution, for the subsequent edge positioning and calibration of the locking column 3 and calculation of the real-time turnout gap size, the camera transmits the collected video to the host computer 4 through the serial port;
[0028] S102: Preprocess each frame of the video to obtain the outline of the rod 1 and the locking column 3;
[0029] In step S102 of this embodiment, each frame of the video is preprocessed, including video image format conversion, image grayscale processing, Gaussian blur smoothing processing and edge detection;
[0030] By using cv2.cvtColor(image,cv2.COLOR_BGR2GRAY), the color image is converted into a grayscale image to reduce the complexity of the image and extract the brightness information in the image. By using gray=cv2.GaussianBlur(gray,(5,5),0.8), the sub-grayscale image is smoothed by Gaussian blur to reduce the noise and details in the image representing the motion of the rod 1 and make the image smoother. By using edged=cv2.Canny(gray,220,300), the smoothed image is edge detected to obtain the outlines of the rod 1, the locking column 3 and other parts.
[0031] In the above technical solution, the collected video is preprocessed. First, each frame of the acquired video is extracted by video image format conversion, and the processing of the video is converted into the processing of the picture. For the grayscale processing of the picture, each frame of the color image representing the movement of the rod 1 is converted into a single-channel grayscale image, the complexity of the image is reduced and the brightness information in the turnout conversion image is extracted. The mean filtering, Gaussian filtering, median filtering, wavelet transform, and bilateral filtering image smoothing of the turnout are performed to reduce the noise in the image representing the movement of the rod 1, reduce the details, and make the turnout conversion image smoother.
[0032] Edge detection is performed by extracting discontinuities in pixel grayscale and texture distribution in each frame of the image.
[0033] In the above technical solution, the edges of each frame of the smoothed image are extracted, and the characteristics in the image, such as the discontinuity of the distribution of pixel grayscale, texture, etc., and those pixels with step changes or ridge-like changes in the surrounding characteristics of the image are extracted to more accurately represent the contours of the rod 1, the locking column 3 and each part;
[0034] S103: traversing the pixel points within the motion range of the rod 1 on each frame of the image to obtain the pixel positions representing the edge of the rod 1 and the edge of the locking column 3;
[0035] In each frame of the image, the vertical axis and the horizontal axis are traversed within the range of motion of the rod 1. The area with the most pixels in the horizontal axis is the edge position of the rod 1. The area representing the range of motion of the rod 1 is extracted into a square area A with a width of W and a height of H. In A, the Y axis is traversed along the Z axis. The area with the most pixels in the Y axis is the edge position of the rod 1.
[0036] Find the longitudinal coordinate with the most pixels in each frame image to form a smooth distance trajectory curve representing the edge of rod 1, which includes the point representing the moment when rod 1 fits with locking column 3 (the lowest point d_low on the Z axis) and the point representing that rod 1 moves to the farthest distance from locking column 2 (the highest point d_high on the Z axis), and the point representing the moment when rod 1 fits with locking column 3 (the lowest point d_low on the Z axis), that is, the minimum value of the smooth distance trajectory curve representing the edge of rod 1 is the pixel position of the edge of locking column 3.
[0037] In this embodiment, moving average or median filtering is used to smooth the trajectory curve representing the smooth distance of the edge of the rod 1.
[0038] S104: The ratio of the difference between the maximum and minimum pixel positions of the edge of the locking column 3 to the actual moving distance of the edge of the locking column 3 is the proportional coefficient, and the true value of the gap distance is the difference between the pixel positions of the edge of the rod 1 and the edge of the locking column 3 multiplied by the proportional coefficient.
[0039] Although embodiments of the present invention have been shown and described (see the above detailed description for details), it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A dynamic locking column edge positioning system for visual ranging of a switch machine, comprising a display rod (1) and a locking column (3), characterized in that: The indicating rod (1) is provided with an opening (2), one end of the locking column (3) vertically extends into the opening (2), the indicating rod (1) can move in the horizontal direction, the locking column (3) can move in the vertical direction, a camera is provided behind the opening (2), a host computer (4) is provided above the locking column (3), and the host computer (4) is connected to the camera via a connecting line.
2. The dynamic locking column edge positioning system of a switch machine with visual ranging according to claim 1 is characterized by: A fill light (5) is arranged above the host computer (4).
3. A method for locating the edge of a dynamic locking column of a switch machine by visual ranging, characterized in that: Using the system described in any one of claims 1 to 2, the specific steps include: S101: collecting a video showing the movement of the rod (1) and the locking column (3) through a camera; S102: Preprocessing each frame of the video to obtain the outline of the rod (1) and the locking column (3); S103: traversing the pixel points within the range of motion of the rod in each frame of the image to obtain the pixel positions representing the edge of the rod (1) and the edge of the locking column (3); S104: The ratio of the difference between the maximum and minimum values of the pixel position of the edge of the locking column (3) to the actual moving distance value of the edge of the locking column (3) is the proportional coefficient, and the true value of the distance of the gap is the difference between the pixel positions of the edge of the rod (1) and the edge of the locking column (3) multiplied by the proportional coefficient.
4. The method for dynamic locking column edge positioning of a switch machine by visual ranging according to claim 3 is characterized in that: In step S101, the video captured by the camera includes the moment when the rod (1) and the locking column (3) are in contact with each other, and the moment when the rod (1) and the locking column (3) are farthest away from each other.
5. The method for dynamic locking column edge positioning of a switch machine by visual ranging according to claim 3 is characterized in that: In step S102, each frame of the video is preprocessed, including video image format conversion, image grayscale processing, Gaussian blur smoothing processing and edge detection.
6. The method for dynamic locking column edge positioning of a switch machine by visual ranging according to claim 5, characterized in that: The edge detection is performed by extracting discontinuities of pixel grayscale and texture distribution in each frame of image.
7. The method for dynamic locking column edge positioning of a switch machine by visual ranging according to claim 1, characterized in that: Step S103 comprises: traversing the vertical axis direction and the horizontal axis direction within the motion range of the indicating rod (1) on each frame image, and the area with the most pixel points in the horizontal axis direction is the edge position of the indicating rod (1); The longitudinal coordinate with the most pixels is found on each frame image to form a smooth distance trajectory curve representing the edge of the rod (1), and the minimum value of the smooth distance trajectory curve representing the edge of the rod (1) is the pixel position of the edge of the locking column (3).
8. The method for dynamic locking column edge positioning of a switch machine by visual ranging according to claim 7, characterized in that: The moving average or median filter is used to smooth the trajectory curve representing the smooth distance of the rod edge.
Citation Information
Cited By
Interface point switch state monitoring system and method based on image recognition
CN120411883A