A method and system for measuring the side limit of railway contact network pillars
By using image processing technology and dynamic parameter adjustment, efficient and accurate measurement of the side clearance of railway catenary supports has been achieved, solving the problem of low detection efficiency in existing technologies and improving detection accuracy and speed.
Patent Information
- Application Number
- CN202411607172.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-11-12
AI Technical Summary
Existing technologies for measuring the clearance of railway catenary supports suffer from problems such as large personnel requirements, long inspection cycles, and low inspection efficiency, making it difficult to efficiently and accurately measure the lateral clearance of catenary supports.
By acquiring frame image sequences of the catenary support pillars through cameras, and utilizing image processing techniques such as edge detection, SURF algorithm, Hough transform, genetic algorithm and wavelet transform, combined with least squares fitting and hierarchical clustering, the shooting parameters are dynamically adjusted to achieve accurate measurement of the side clearance of the catenary support pillars.
While ensuring the accuracy of the processing results, the amount of data processing was reduced, the shooting parameters were dynamically adjusted to prevent inaccurate measurements, and the detection efficiency and accuracy were improved.
Smart Images

Figure CN119131032B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of railway clearance measurement, in particular to a method and system for measuring the side clearance of a railway contact network support. Background Art
[0002] The main power source for modern railway transportation is electricity, which is provided by the overhead contact system on one side of the track. In simple terms, the overhead contact system is a contact line suspended by continuous overhead contact pillars on the side of the track. In order to prevent the contact line from sagging due to gravity, there are load-bearing cables parallel to the contact line above the contact line. The load-bearing cables and the contact line are supported by hanging strings. The remaining components include counterweights for tightening the contact line and the load-bearing cables. Due to external forces or aging, the overhead contact pillars may intrude into the operating limits of rail vehicles, resulting in intrusion. An important parameter that we pay attention to is the side limit of the overhead contact pillar, which specifically refers to the distance from the side of the pillar to the center line of the line. Excessive intrusion of the side limit of the overhead contact pillar is a serious safety hazard in railway operation. Excessive intrusion may cause a collision with the train, and intrusion may cause damage to the structure of the overhead contact network. The pantograph of the rail vehicle and the contact line cannot maintain continuous and smooth contact, affecting the stability and reliability of power supply, and thus affecting the normal power supply and operation of the train. The side limit measurement of railway contact network pillars includes measurement by ruler, laser 3D point cloud data measurement and video image measurement through software, but the above measurement methods have the disadvantages of large number of personnel, long detection cycle and low detection efficiency. Summary of the invention
[0003] (1) Technical issues to be resolved
[0004] The purpose of the present invention is to provide a method and system for measuring the side clearance of a railway contact network pillar, so as to solve the problem of image selection in the process of measuring the clearance of a railway contact network pillar.
[0005] (2) Technical solution
[0006] To achieve the above object, on the one hand, the present invention provides a method for measuring the side clearance of a railway overhead wire support, the method comprising:
[0007] A frame image sequence of a contact network pillar is obtained, wherein the frame image sequence is obtained by continuous shooting at a fixed frame rate by a camera during the travel of a railway track vehicle, and the frame image also contains a timestamp and position information; the frame image sequence is grayed and the edge information of each frame image is obtained by an edge detection algorithm, the contact network pillar area is extracted by the edge information through a SURF algorithm, the straight lines in the contact network pillar area are detected by Hough transform, and the straight lines that meet a preset length threshold and are close to one side of the railway track are screened out as the side edges of the contact network pillars; the gradient amplitude standard deviation of the side edges of the contact network pillars is calculated by the grayscale gradient amplitude of the pixels corresponding to the side edges of the contact network pillars; the proportion of the contact network pillar area is obtained by the ratio of the number of pixels in the contact network pillar area to the total number of pixels in the frame image;
[0008] The target image frame is obtained by using a genetic algorithm to obtain the standard deviation of the gradient amplitude and the proportion of the contact network pillar area corresponding to each frame of the frame image sequence; the target image frame is segmented by an adaptive double threshold algorithm to obtain a multi-level grayscale image; the multi-level grayscale image is decomposed into multiple scales by wavelet transform and the target straight line segments are detected by Hough transform at different scales; the target straight line segments are grouped and merged by a hierarchical clustering algorithm to obtain the edge representation of the side of the contact network pillar;
[0009] Through the pre-calibrated image distortion model and the internal and external parameters of the camera, a mapping function from pixel coordinates to actual space coordinates is established; the edge representation of the side of the contact network pillar is converted into actual space coordinates, and the plane equation in the three-dimensional space is obtained by least squares fitting; the intersection of the plane and the preset track centerline plane is calculated to obtain the side contour line of the contact network pillar; the minimum distance between the contour line and the track centerline is calculated to obtain the side limit value of the contact network pillar, and the side limit value of the contact network pillar and the corresponding timestamp and position information are transmitted to the server.
[0010] Furthermore, the method of obtaining the target image frame by using a genetic algorithm based on the standard deviation of the gradient amplitude corresponding to each frame image in the frame image sequence and the proportion of the contact network pillar area includes: obtaining the number of images in the frame image sequence corresponding to a single contact network pillar , randomly generate a single frame image corresponding to the frame image sequence The observation states of each arrangement are used as processing schemes, each observation state includes processing state and measurement information entropy, where the processing state includes two states: 0 and 1. The processing state 0 represents that the single frame image is not selected as the target image frame, and the processing state 1 represents that the single frame image is selected as the target image frame; the initial population of the processing scheme is generated, and the initial population includes Individual , each individual represents a treatment plan, and each treatment plan has a randomly generated The initial population is iteratively evolved according to the observed state of each arrangement. The iterative evolution steps include: evaluating the individual The measured information entropy under the corresponding processing state is calculated, and all the measured information entropy of the single frame image with processing state 1 is calculated and recorded as the total measured entropy; the individuals with the largest number of processing states 1 are sorted according to the total measured entropy and eliminated. The winning individuals are selected through the roulette wheel selection method, and the winning individuals are crossovered and mutated to obtain the offspring individuals. ; Replace the initial population with offspring individuals , iterative evolution is performed again until the increase in the total entropy of the measurements of the offspring individuals and the parent individuals is lower than the set measurement information threshold; the single-frame image corresponding to the processing scheme of the final winning individual after the iterative evolution is completed is used as the target image frame.
[0011] Furthermore, the individuals in the initial population The method of obtaining the measured information entropy of the processing state corresponding to the measured information entropy of the single frame image with the processing state of 1 and recording it as the measured total entropy includes: obtaining the first Individual treatment plans ,in Representative Solutions No. The processing status of a single frame image, The value is 0 or 1; Representative Solutions No. The measured information entropy of a single frame image, A variable whose value is a positive integer. The value is 1 to the number of images in the frame image sequence integer variable; Solutions No. The measured information entropy of a single frame image for: ;in For the Solutions No. The standard deviation of the gradient amplitude of a single frame image, For the Solutions No. The proportion of the contact network support area in a single frame image, The value ranges from 1 to integer variable; Individual treatment plans The measured total entropy for: .
[0012] Further, the method comprises:
[0013] The shooting interval and shooting time of the single-frame image of the camera are adjusted, the interval threshold for adjusting the shooting interval is that the standard deviation of the gradient amplitude of the single-frame image does not exceed the set standard deviation threshold, and the moment threshold for adjusting the shooting time does not exceed the current corresponding shooting interval; the interval threshold is divided into several equal distances and set as the first offset step, and the first offset step is not less than the minimum shutter time of the camera itself; the moment threshold is divided into several equal distances and set as the second offset step; in the process of measuring the side limit of the railway contact network pillar, the shooting interval in the processing scheme is moved by a first offset step each time, and the shooting time is moved by a second offset step each time, and the corresponding measurement total entropy is calculated respectively. , and the corresponding first offset step size and second offset step size are used for camera parameter correction.
[0014] Furthermore, the shooting interval in the processing scheme is moved by a first offset step each time, and the shooting time is moved by a second offset step each time, and the corresponding total entropy of the measurement is calculated respectively. The method of using the corresponding first offset step and the second offset step for camera parameter correction includes: moving the shooting interval in the processing scheme by a first offset step, and obtaining the measured total entropy by the discrete sequence gradient descent method The extreme value and the corresponding cumulative first offset step length; the shooting time in the processing scheme is moved by a second offset step length, and the total entropy of the measurement is obtained by the gradient descent method of the discrete sequence The extreme value and the corresponding cumulative second offset step length are used as the cumulative offset step length of the camera parameter.
[0015] Based on the same inventive concept, on the other hand, the present invention also provides a railway overhead contact network pillar side clearance measurement system, the system comprising:
[0016] An image acquisition module is used to acquire a frame image sequence of a contact network pillar, wherein the frame image sequence is obtained by continuous shooting at a fixed frame rate by a camera during the travel of a railway track vehicle, and the frame image also contains a timestamp and position information; the frame image sequence is grayed and the edge information of each frame image is obtained by an edge detection algorithm, the contact network pillar area is extracted by the edge information through a SURF algorithm, the straight lines in the contact network pillar area are detected by Hough transform, and the straight lines that meet a preset length threshold and are close to one side of the railway track are screened out as the side edges of the contact network pillars; the gradient amplitude standard deviation of the side edges of the contact network pillars is calculated by the grayscale gradient amplitude of the pixels corresponding to the side edges of the contact network pillars; the proportion of the contact network pillar area is obtained by the ratio of the number of pixels in the contact network pillar area to the total number of pixels in the frame image;
[0017] The image processing module is used to obtain the target image frame by using the genetic algorithm to obtain the standard deviation of the gradient amplitude and the proportion of the contact network pillar area corresponding to each frame of the frame image sequence; obtain the multi-level grayscale image by using the adaptive double threshold segmentation algorithm; decompose the multi-level grayscale image into multiple scales by using the wavelet transform and detect the target straight line segment by using the Hough transform at different scales; group and merge the target straight line segments by using the hierarchical clustering algorithm to obtain the edge representation of the side of the contact network pillar;
[0018] The limit measurement module is used to establish a mapping function from pixel coordinates to actual space coordinates through a pre-calibrated image distortion model and camera internal and external parameters; convert the edge representation of the side of the contact network pillar into actual space coordinates, and obtain the plane equation in three-dimensional space through least squares fitting; calculate the intersection of the plane and the preset track centerline plane to obtain the side contour line of the contact network pillar; calculate the minimum distance between the contour line and the track centerline to obtain the side limit value of the contact network pillar, and transmit the side limit value of the contact network pillar and the corresponding timestamp and position information to the server.
[0019] Furthermore, the system also includes: an image frame optimization module for obtaining the number of images of a frame image sequence corresponding to a single contact network pillar , randomly generate a single frame image corresponding to the frame image sequence The observation states of each arrangement are used as processing schemes, each observation state includes processing state and measurement information entropy, where the processing state includes two states: 0 and 1. The processing state 0 represents that the single frame image is not selected as the target image frame, and the processing state 1 represents that the single frame image is selected as the target image frame; the initial population of the processing scheme is generated, and the initial population includes Individual , each individual represents a treatment plan, and each treatment plan has a randomly generated The initial population is iteratively evolved according to the observed state of each arrangement. The iterative evolution steps include: sequentially evaluating the individual The measured information entropy under the corresponding processing state is calculated, and all the measured information entropy of the single frame image with processing state 1 is calculated and recorded as the total measured entropy; the individuals with the largest number of processing states 1 are sorted according to the total measured entropy and eliminated. The winning individuals are selected through the roulette wheel selection method, and the winning individuals are crossovered and mutated to obtain the offspring individuals. ; Replace the initial population with offspring individuals , iterative evolution is performed again until the increase in the total entropy of the measurements of the offspring individuals and the parent individuals is lower than the set measurement information threshold; the single-frame image corresponding to the processing scheme of the final winning individual after the iterative evolution is completed is used as the target image frame.
[0020] Furthermore, the system further comprises:
[0021] Parameter optimization module, used to obtain the first Individual treatment plans ,in Representative Solutions No. The processing status of a single frame image, The value is 0 or 1; Representative Solutions No. The measured information entropy of a single frame image, A variable whose value is a positive integer. The value is 1 to the number of images in the frame image sequence integer variable; Solutions No. The measured information entropy of a single frame image for: ;in For the Solutions No. The standard deviation of the gradient amplitude of a single frame image, For the Solutions No. The proportion of the contact network support area in a single frame image, The value ranges from 1 to integer variable; Individual treatment plans The measured total entropy for: .
[0022] Furthermore, the system also includes: a first optimization module, which is used to adjust the shooting interval and shooting time of the single-frame image of the camera, the interval threshold for adjusting the shooting interval is that the standard deviation of the gradient amplitude of the single-frame image does not exceed the set standard deviation threshold, and the moment threshold for adjusting the shooting moment does not exceed the current corresponding shooting interval; the interval threshold is divided into several equal parts and the distance is set as the first offset step, and the first offset step is not less than the minimum shutter time of the camera itself; the moment threshold is divided into several equal parts and the distance is set as the second offset step; in the process of measuring the side limit of the railway contact network pillar, the shooting interval in the processing scheme is moved by a first offset step each time, and the shooting time is moved by a second offset step each time, and the corresponding measurement total entropy is calculated respectively. , and the corresponding first offset step size and second offset step size are used for camera parameter correction.
[0023] Furthermore, the system further comprises:
[0024] The second optimization module is used to move the shooting interval in the processing scheme by a first offset step length, and obtain the measured total entropy by the gradient descent method of the discrete sequence The extreme value and the corresponding cumulative first offset step length; the shooting time in the processing scheme is moved by a second offset step length, and the total entropy of the measurement is obtained by the gradient descent method of the discrete sequence The extreme value and the corresponding cumulative second offset step length are used as the cumulative offset step length of the camera parameter.
[0025] (3) Beneficial effects
[0026] Compared with the prior art, the present invention has the following beneficial effects:
[0027] The best target single frame image in the contact network support image frame sequence is selected to reduce the amount of data processing while ensuring the accuracy of the processing results.
[0028] Capable of dynamically adjusting shooting parameters to prevent inaccurate measurements caused by different rail vehicle speeds or initial camera settings. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A flowchart of a method for measuring the side limit of a railway overhead contact network support according to Embodiment 1 of the present invention;
[0030] Figure 2 This is a module block diagram of a railway overhead contact network pillar side limit measurement system according to Example 2 of the present invention. DETAILED DESCRIPTION
[0031] 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.
[0032] Before giving examples, it is necessary to explain the application scenarios of the present invention. It is possible to obtain and measure the side limits of the railway contact network pillars by taking photos of the contact network pillars for image analysis, but the present invention needs to be further optimized on this basis. Specifically, the railway section is as short as a few hundred kilometers and as long as thousands of kilometers, and the number of contact network pillars is tens of thousands. The amount of analysis and calculation processed by the image algorithm is very large. Moreover, the image acquisition process is to have a certain speed for high-speed shooting. In theory, each contact network pillar has multiple continuous frames that can capture its relevant image information, but how to select the best image from multiple frames of photos to extract the side limit measurement information of the contact network pillar is a difficulty. Generally speaking, as the shooting distance is closer, the proportion of the contact network pillar in the image screen is larger, and the contact network pillar photos are clearer. It is easiest to process the frame image with the closest distance and the contact network pillar can be fully reflected in the image. However, because the contact network pillar object accounts for too large a proportion of the image screen, the amount of data calculation processing will increase, because we do not care about the background of the screen other than the contact network pillar, we only need to extract the object of interest for processing. Therefore, we need to find an optimal value for the proportion of the contact network pillar object in the image, which can satisfy our ability to extract the object of interest for recognition, and the recognition accuracy can reach our resolution. Of course, this resolution needs to take into account the camera's movement speed, the camera's shooting accuracy, etc. After testing and adjustment, we need to find the best image frame, that is, the proportion of the contact network pillar in the picture is moderate, and it cannot be too small. Although the proportion is too small, the size of the contact network pillar can be barely recognized, but the actual size ratio corresponding to each pixel is too large, that is, as long as the threshold of the recognition process is not set accurately, and a few pixels are slightly offset, the size of the corresponding contact network pillar will be too large, affecting the accuracy; the proportion of the contact network pillar in the picture cannot be too large, otherwise too many image pixel grids need to be processed, resulting in a greater computing and processing burden. Or take multiple frames of images for processing, correct each other, and get the best limit value.
[0033] Example 1: Figure 1 As shown, this embodiment provides a method for measuring the side limit of a railway contact network pillar, the method comprising:
[0034] S1. Obtain a frame image sequence of the contact network pillar, wherein the frame image sequence is obtained by continuous shooting at a fixed frame rate by a camera during the travel of a railway track vehicle, and the frame image also contains a timestamp and position information; grayscale the frame image sequence and obtain edge information of each frame image through an edge detection algorithm, extract the contact network pillar area through the edge information through the SURF algorithm, detect the straight line in the contact network pillar area through Hough transform, and screen out the straight line that meets the preset length threshold and is close to the side of the railway track as the side edge of the contact network pillar; calculate the standard deviation of the gradient amplitude of the side edge of the contact network pillar through the pixel grayscale gradient amplitude corresponding to the side edge of the contact network pillar; obtain the proportion of the contact network pillar area through the ratio of the number of pixels in the contact network pillar area to the total number of pixels in the frame image;
[0035] S2, the standard deviation of the gradient amplitude corresponding to each frame of the image in the frame image sequence and the proportion of the contact network pillar area are obtained by genetic algorithm; the target image frame is segmented by an adaptive double threshold algorithm to obtain a multi-level grayscale image; the multi-level grayscale image is decomposed by wavelet transform and the target straight line segments are detected by Hough transform at different scales; the target straight line segments are grouped and merged by a hierarchical clustering algorithm to obtain the edge representation of the side of the contact network pillar;
[0036] S3. A mapping function from pixel coordinates to actual space coordinates is established through a pre-calibrated image distortion model and camera internal and external parameters; the edge representation of the side of the contact network pillar is converted into actual space coordinates, and the plane equation in the three-dimensional space is obtained by least squares fitting; the intersection of the plane and the preset track centerline plane is calculated to obtain the side contour line of the contact network pillar; the minimum distance between the contour line and the track centerline is calculated to obtain the side limit value of the contact network pillar, and the side limit value of the contact network pillar and the corresponding timestamp and position information are transmitted to the server.
[0037] For example, the railway inspection vehicle travels at a speed of 120 kilometers per hour, and the camera installed on the roof shoots the overhead contact network pillars along the line at a rate of 50 frames per second. A 30-frame continuous image sequence of a pillar is obtained, each frame has a resolution of 3840x2160 pixels, including GPS coordinates and timestamps. The image sequence is grayed and the edges are extracted using the Canny algorithm. The SURF algorithm is used to extract the pillar feature points, and the straight lines in the pillar area are detected by Hough transform. Straight lines with a length of more than 800 pixels and close to the track side are selected as the side edges of the pillars. The standard deviation of the gray gradient amplitude of the side edge pixels is calculated to obtain the clarity index, and the proportion of pixels in the pillar area is calculated. The genetic algorithm is used to select the best image frame based on clarity and proportion. The frame is segmented by adaptive double thresholds to obtain a multi-level grayscale image, and wavelet multi-scale decomposition is performed and the straight line segments are detected by Hough transform. Accurate edges are obtained by merging straight line segments through hierarchical clustering. The edges are converted into spatial coordinates using the pre-calibrated distortion model and camera parameters, and the plane equation is fitted using the least squares method. The intersection of the plane and the track centerline plane is calculated to obtain the side profile of the pillar, and the minimum distance between the profile and the centerline is calculated as 3.15 meters as the limit value. The limit value, GPS coordinates and timestamp are transmitted to the server for storage.
[0038] Furthermore, the method of obtaining the target image frame by using a genetic algorithm based on the standard deviation of the gradient amplitude corresponding to each frame image in the frame image sequence and the proportion of the contact network pillar area includes: obtaining the number of images in the frame image sequence corresponding to a single contact network pillar , randomly generate a single frame image corresponding to the frame image sequence The observation states of each arrangement are used as processing schemes, each observation state includes processing state and measurement information entropy, where the processing state includes two states: 0 and 1. The processing state 0 represents that the single frame image is not selected as the target image frame, and the processing state 1 represents that the single frame image is selected as the target image frame; the initial population of the processing scheme is generated, and the initial population includes Individual , each individual represents a treatment plan, and each treatment plan has a randomly generated The initial population is iteratively evolved according to the observed state of each arrangement. The iterative evolution steps include: sequentially evaluating the individual The measured information entropy under the corresponding processing state is calculated, and all the measured information entropy of the single frame image with processing state 1 is calculated and recorded as the total measured entropy; the individuals with the largest number of processing states 1 are sorted according to the total measured entropy and eliminated. The winning individuals are selected through the roulette wheel selection method, and the winning individuals are crossovered and mutated to obtain the offspring individuals. ; Replace the initial population with offspring individuals , iterative evolution is performed again until the increase in the total entropy of the measurements of the offspring individuals and the parent individuals is lower than the set measurement information threshold; the single-frame image corresponding to the processing scheme of the final winning individual after the iterative evolution is completed is used as the target image frame.
[0039] For example, the inspection vehicle travels at a speed of 150 kilometers per hour in a high-speed railway section, and the on-board camera shoots the overhead contact network pillars along the line at 60 frames per second. 40 consecutive images of a pillar are obtained, each frame is 4096x2160 pixels. 40 observation states are randomly generated as the initial processing scheme, each state contains the processing state (0 or 1) and the measured information entropy. 100 such processing schemes are generated as the initial population. The sum of the measured information entropy of the frames with the processing state of 1 in each scheme is evaluated. According to the total entropy sorting, the scheme with the most processing states of 1 is eliminated. The roulette method is used to select the winning scheme for crossover mutation to generate the offspring scheme. The initial population is replaced with the offspring and the iteration is repeated. The iteration is stopped when the total entropy of two consecutive generations is less than 0.01. The 7 frames of images with the processing state of 1 in the final winning scheme are used as the target image frames. The measured information entropies of these frames are 0.82, 0.79, 0.85, 0.81, 0.83, 0.80, and 0.84, respectively, with a total entropy of 5.74. The selected frame was taken about 10 meters in front of the pillar, and the pillar accounts for about 30% of the picture, with clear edges.
[0040] Furthermore, the individuals in the initial population The method of obtaining the measured information entropy of the processing state corresponding to the measured information entropy of the single frame image with the processing state of 1 and recording it as the measured total entropy includes: obtaining the first Individual treatment plans ,in Representative Solutions No. The processing status of a single frame image, The value is 0 or 1; Representative Solutions No. The measured information entropy of a single frame image, A variable whose value is a positive integer. The value is 1 to the number of images in the frame image sequence integer variable; Solutions No. The measured information entropy of a single frame image for: ;in For the Solutions No. The standard deviation of the gradient amplitude of a single frame image, For the Solutions No. The proportion of the contact network support area in a single frame image, The value ranges from 1 to integer variable; Individual treatment plans The measured total entropy for: .
[0041] For example, the inspection vehicle travels at a speed of 180 kilometers per hour on a high-speed railway line, and the on-board camera shoots the overhead contact network pillars along the line at 80 frames per second. 50 continuous images of a pillar are obtained. In one iteration of the genetic algorithm, the 15th processing scheme is selected for evaluation. The scheme contains 50 observation states, each corresponding to a frame of image. The standard deviation of the gradient amplitude and the pillar area ratio of each frame of image are calculated. For example, the standard deviation of the gradient amplitude of the 10th frame is 85.6, and the area ratio is 0.28; the values of the 20th frame are 92.3 and 0.32 respectively; the values of the 30th frame are 88.9 and 0.30. Substitute these values into the formula to calculate the measured information entropy of each frame. The entropy of the 10th frame is 0.78, the 20th frame is 0.85, and the 30th frame is 0.82. After traversing 50 frames of images, only the frames with a processing state of 1 participate in the total entropy calculation. Assume that there are 12 frames in this scheme whose processing status is 1, and the measured information entropy of these 12 frames are 0.78, 0.81, 0.85, 0.83, 0.79, 0.82, 0.80, 0.84, 0.86, 0.77, 0.83, and 0.81 respectively. Adding these values together, the measured total entropy of this processing scheme is 9.79. Repeat this process to calculate the measured total entropy of all processing schemes for subsequent scheme selection and iterative optimization.
[0042] Further, the method comprises:
[0043] The shooting interval and shooting time of the single-frame image of the camera are adjusted, the interval threshold for adjusting the shooting interval is that the standard deviation of the gradient amplitude of the single-frame image does not exceed the set standard deviation threshold, and the moment threshold for adjusting the shooting time does not exceed the current corresponding shooting interval; the interval threshold is divided into several equal distances and set as the first offset step, and the first offset step is not less than the minimum shutter time of the camera itself; the moment threshold is divided into several equal distances and set as the second offset step; in the process of measuring the side limit of the railway contact network pillar, the shooting interval in the processing scheme is moved by a first offset step each time, and the shooting time is moved by a second offset step each time, and the corresponding measurement total entropy is calculated respectively. , and the corresponding first offset step size and second offset step size are used for camera parameter correction.
[0044] For example, the inspection vehicle travels at a speed of 200 kilometers per hour on a high-speed railway line, and the on-board camera is initially set to shoot at 100 frames per second. The system monitors the shooting quality in real time and finds that some images are blurred under the current settings. It is decided to adjust the shooting parameters to improve the image quality. The gradient amplitude standard deviation threshold is set to 80, and the current shooting interval is 10 milliseconds. The interval threshold is set to 5 milliseconds, divided into 10 equal parts, and 0.5 milliseconds per part is used as the first offset step. The shooting time threshold is set to 2 milliseconds, divided into 4 equal parts, and 0.5 milliseconds per part is used as the second offset step. The system gradually adjusts the shooting interval, increasing it by 0.5 milliseconds each time, and adjusts the shooting time at the same time, delaying it by 0.5 milliseconds each time. The total entropy of the measurement is calculated for each combination. After multiple adjustments, it was found that the best total entropy of 9.85 was obtained when the shooting interval was increased to 12 milliseconds (the frame rate dropped to about 83 frames / second) and the shooting time was delayed by 1.5 milliseconds. The system updates the camera parameters accordingly, improving the clarity of subsequent images and the accuracy of pillar recognition. Under the new settings, the pillar edges are sharper and the area ratio is more stable, which effectively improves the accuracy of limit measurement.
[0045] Furthermore, the shooting interval in the processing scheme is moved by a first offset step each time, and the shooting time is moved by a second offset step each time, and the corresponding total entropy of the measurement is calculated respectively. The method of using the corresponding first offset step and the second offset step for camera parameter correction includes: moving the shooting interval in the processing scheme by a first offset step, and obtaining the measured total entropy by the discrete sequence gradient descent method The extreme value and the corresponding cumulative first offset step length; the shooting time in the processing scheme is moved by a second offset step length, and the total entropy of the measurement is obtained by the gradient descent method of the discrete sequence The extreme value and the corresponding cumulative second offset step length are used as the cumulative offset step length of the camera parameter.
[0046] For example, the inspection vehicle is traveling at a speed of 220 kilometers per hour on a high-speed rail line, and the on-board camera is currently set to shoot at 90 frames per second. The system begins to fine-tune the camera parameters to optimize the image quality. Set the first offset step of the shooting interval to 0.2 milliseconds, and the second offset step of the shooting time to 0.1 milliseconds. First, adjust the shooting interval, starting from the current value of 11.1 milliseconds, and increase it by 0.2 milliseconds each time. Use the gradient descent method of discrete sequences to calculate and measure the total entropy, and find that the local optimum is reached at 11.7 milliseconds, and the total entropy is 9.92. The cumulative first offset step is 0.6 milliseconds. Then adjust the shooting time, starting from the current value, and delay it by 0.1 milliseconds each time. Use the gradient descent method again, and find that the new local optimum is reached when it is delayed by 0.3 milliseconds, and the total entropy is increased to 9.98. The cumulative second offset step is 0.3 milliseconds. The system combines the results of the two adjustments and sets the shooting interval to 11.7 milliseconds (about 85.5 frames / second), and the shooting time is delayed by 0.3 milliseconds. This new setting makes the catenary pillars more distinct in the image, with sharper edges.
[0047] Embodiment 2: Based on the same inventive concept, Figure 2 As shown, this embodiment also provides a railway contact network pillar side clearance measurement system, the system comprising:
[0048] An image acquisition module is used to acquire a frame image sequence of a contact network pillar, wherein the frame image sequence is obtained by continuous shooting at a fixed frame rate by a camera during the travel of a railway track vehicle, and the frame image also contains a timestamp and position information; the frame image sequence is grayed and the edge information of each frame image is obtained by an edge detection algorithm, the contact network pillar area is extracted by the edge information through a SURF algorithm, the straight lines in the contact network pillar area are detected by Hough transform, and the straight lines that meet a preset length threshold and are close to one side of the railway track are screened out as the side edges of the contact network pillars; the gradient amplitude standard deviation of the side edges of the contact network pillars is calculated by the grayscale gradient amplitude of the pixels corresponding to the side edges of the contact network pillars; the proportion of the contact network pillar area is obtained by the ratio of the number of pixels in the contact network pillar area to the total number of pixels in the frame image;
[0049] The image processing module is used to obtain the target image frame by using the genetic algorithm to obtain the standard deviation of the gradient amplitude and the proportion of the contact network pillar area corresponding to each frame of the frame image sequence; obtain the multi-level grayscale image by using the adaptive double threshold segmentation algorithm; decompose the multi-level grayscale image into multiple scales by using the wavelet transform and detect the target straight line segment by using the Hough transform at different scales; group and merge the target straight line segments by using the hierarchical clustering algorithm to obtain the edge representation of the side of the contact network pillar;
[0050] The limit measurement module is used to establish a mapping function from pixel coordinates to actual space coordinates through a pre-calibrated image distortion model and camera internal and external parameters; convert the edge representation of the side of the contact network pillar into actual space coordinates, and obtain the plane equation in three-dimensional space through least squares fitting; calculate the intersection of the plane and the preset track centerline plane to obtain the side contour line of the contact network pillar; calculate the minimum distance between the contour line and the track centerline to obtain the side limit value of the contact network pillar, and transmit the side limit value of the contact network pillar and the corresponding timestamp and position information to the server.
[0051] Furthermore, the system also includes: an image frame optimization module for obtaining the number of images of a frame image sequence corresponding to a single contact network pillar , randomly generate a single frame image corresponding to the frame image sequence The observation states of each arrangement are used as processing schemes, each observation state includes processing state and measurement information entropy, where the processing state includes two states: 0 and 1. The processing state 0 represents that the single frame image is not selected as the target image frame, and the processing state 1 represents that the single frame image is selected as the target image frame; the initial population of the processing scheme is generated, and the initial population includes Individual , each individual represents a treatment plan, and each treatment plan has a randomly generated The initial population is iteratively evolved according to the observed state of each arrangement. The iterative evolution steps include: sequentially evaluating the individual The measured information entropy under the corresponding processing state is calculated, and all the measured information entropy of the single frame image with processing state 1 is calculated and recorded as the total measured entropy; the individuals with the largest number of processing states 1 are sorted according to the total measured entropy and eliminated. The winning individuals are selected through the roulette wheel selection method, and the winning individuals are crossovered and mutated to obtain the offspring individuals. ; Replace the initial population with offspring individuals , iterative evolution is performed again until the increase in the total entropy of the measurements of the offspring individuals and the parent individuals is lower than the set measurement information threshold; the single-frame image corresponding to the processing scheme of the final winning individual after the iterative evolution is completed is used as the target image frame.
[0052] Furthermore, the system further comprises:
[0053] Parameter optimization module, used to obtain the first Individual treatment plans ,in Representative Solutions No. The processing status of a single frame image, The value is 0 or 1; Representative Solutions No. The measured information entropy of a single frame image, A variable whose value is a positive integer. The value is 1 to the number of images in the frame image sequence integer variable; Solutions No. The measured information entropy of a single frame image for: ; Among them is Solutions No. The standard deviation of the gradient amplitude of a single frame image, For the Solutions No. The proportion of the contact network support area in a single frame image, The value ranges from 1 to integer variable; Individual treatment plans The measured total entropy for: .
[0054] Furthermore, the system further comprises:
[0055] The first optimization module is used to adjust the shooting interval and shooting time of the single-frame image of the camera. The interval threshold for adjusting the shooting interval is that the standard deviation of the gradient amplitude of the single-frame image does not exceed the set standard deviation threshold, and the moment threshold for adjusting the shooting moment does not exceed the current corresponding shooting interval; the interval threshold is divided into several equal distances and set as the first offset step, and the first offset step is not less than the minimum shutter time of the camera itself; the moment threshold is divided into several equal distances and set as the second offset step; in the process of measuring the side limit of the railway contact network pillar, the shooting interval in the processing scheme is moved by a first offset step each time, and the shooting time is moved by a second offset step each time, and the corresponding measurement total entropy is respectively calculated. , and the corresponding first offset step size and second offset step size are used for camera parameter correction.
[0056] Furthermore, the system further comprises:
[0057] The second optimization module is used to move the shooting interval in the processing scheme by a first offset step length, and obtain the measured total entropy by the gradient descent method of the discrete sequence The extreme value and the corresponding cumulative first offset step length; the shooting time in the processing scheme is moved by a second offset step length, and the total entropy of the measurement is obtained by the gradient descent method of the discrete sequence The extreme value and the corresponding cumulative second offset step length are used as the cumulative offset step length of the camera parameter.
[0058] It should be noted that, regarding the system in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0059] Finally, it should be noted that: Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for measuring the side clearance of a railway contact network support, characterized in that: The method comprises: A frame image sequence of a contact network pillar is obtained, wherein the frame image sequence is obtained by continuous shooting at a fixed frame rate by a camera during the travel of a railway track vehicle, and the frame image also contains a timestamp and position information; the frame image sequence is grayed and the edge information of each frame image is obtained by an edge detection algorithm, the contact network pillar area is extracted by the edge information through a SURF algorithm, the straight lines in the contact network pillar area are detected by Hough transform, and the straight lines that meet a preset length threshold and are close to one side of the railway track are screened out as the side edges of the contact network pillars; the gradient amplitude standard deviation of the side edges of the contact network pillars is calculated by the grayscale gradient amplitude of the pixels corresponding to the side edges of the contact network pillars; the proportion of the contact network pillar area is obtained by the ratio of the number of pixels in the contact network pillar area to the total number of pixels in the frame image; The target image frame is obtained by using a genetic algorithm to obtain the standard deviation of the gradient amplitude and the proportion of the contact network pillar area corresponding to each frame of the frame image sequence; the target image frame is segmented by an adaptive double threshold algorithm to obtain a multi-level grayscale image; the multi-level grayscale image is decomposed into multiple scales by wavelet transform and the target straight line segments are detected by Hough transform at different scales; the target straight line segments are grouped and merged by a hierarchical clustering algorithm to obtain the edge representation of the side of the contact network pillar; A mapping function from pixel coordinates to actual space coordinates is established through a pre-calibrated image distortion model and camera internal and external parameters; the edge representation of the side of the contact network pillar is converted into actual space coordinates, and the plane equation in three-dimensional space is obtained by least squares fitting; the intersection of the plane and the preset track centerline plane is calculated to obtain the side contour line of the contact network pillar; the minimum distance between the contour line and the track centerline is calculated to obtain the side limit value of the contact network pillar, and the side limit value of the contact network pillar and the corresponding timestamp and position information are transmitted to the server; The method of obtaining a target image frame by using a genetic algorithm to obtain a gradient amplitude standard deviation and a contact network support area ratio corresponding to each frame image in a frame image sequence comprises: Get the number of images in the frame image sequence corresponding to a single contact network pillar , randomly generate a single frame image corresponding to the frame image sequence The observation states of each arrangement are used as processing schemes, each observation state includes processing state and measurement information entropy, where the processing state includes two states: 0 and 1. The processing state 0 represents that the single frame image is not selected as the target image frame, and the processing state 1 represents that the single frame image is selected as the target image frame; the initial population of the processing scheme is generated, and the initial population includes Individual , each individual represents a treatment plan, and each treatment plan has a randomly generated The initial population is iteratively evolved according to the observed state of each arrangement. The iterative evolution steps include: evaluating the individual The measured information entropy under the corresponding processing state is calculated, and all the measured information entropy of the single frame image with processing state 1 is calculated and recorded as the total measured entropy; the individuals with the largest number of processing states 1 are sorted according to the total measured entropy and eliminated. The winning individuals are selected through the roulette wheel selection method, and the winning individuals are crossovered and mutated to obtain the offspring individuals. ; Replace the initial population with offspring individuals , iterative evolution is performed again until the increase in the total entropy of the measurements of the offspring individuals and the parent individuals is lower than the set measurement information threshold; the single-frame image corresponding to the processing scheme of the final winning individual after the iterative evolution is completed is used as the target image frame.
2. A method for measuring the side clearance of a railway overhead contact network support as claimed in claim 1, characterized in that: The individuals in the initial population The method of obtaining the measured information entropy under the corresponding processing state and calculating all the measured information entropy of a single frame image with the processing state of 1 and recording it as the measured total entropy includes: Get the initial population Individual treatment plans ,in Representative Solutions No. The processing status of a single frame image, The value is 0 or 1; Representative Solutions No. The measured information entropy of a single frame image, A variable whose value is a positive integer. The value is 1 to the number of images in the frame image sequence integer variable; Solutions No. The measured information entropy of a single frame image for: ; in For the Solutions No. The standard deviation of the gradient amplitude of a single frame image, For the Solutions No. The proportion of the contact network support area in a single frame image, The value ranges from 1 to integer variable; Individual treatment plans The measured total entropy for: 。 3. A method for measuring the side clearance of a railway overhead contact network support as claimed in claim 2, characterized in that: The method comprises: The shooting interval and shooting time of the single-frame image of the camera are adjusted, the interval threshold for adjusting the shooting interval is that the standard deviation of the gradient amplitude of the single-frame image does not exceed the set standard deviation threshold, and the moment threshold for adjusting the shooting time does not exceed the current corresponding shooting interval; the interval threshold is divided into several equal distances and set as the first offset step, and the first offset step is not less than the minimum shutter time of the camera itself; the moment threshold is divided into several equal distances and set as the second offset step; in the process of measuring the side limit of the railway contact network pillar, the shooting interval in the processing scheme is moved by a first offset step each time, and the shooting time is moved by a second offset step each time, and the corresponding measurement total entropy is calculated respectively. , and the corresponding first offset step size and second offset step size are used for camera parameter correction.
4. A method for measuring the side clearance of a railway overhead contact network support as claimed in claim 3, characterized in that: The shooting interval in the processing scheme is moved by a first offset step each time, and the shooting time is moved by a second offset step each time, and the corresponding total entropy of the measurement is obtained respectively. The method of using the corresponding first offset step size and the second offset step size for camera parameter correction includes: Move the shooting interval in the processing scheme by the first offset step, and obtain the total entropy of the measurement by the gradient descent method of discrete sequence The extreme value and the corresponding cumulative first offset step length; the shooting time in the processing scheme is moved by a second offset step length, and the total entropy of the measurement is obtained by the gradient descent method of the discrete sequence The extreme value and the corresponding cumulative second offset step length are used as the cumulative offset step length of the camera parameter.
5. A railway overhead line support side clearance measurement system, characterized in that: The system comprises: An image acquisition module is used to acquire a frame image sequence of a contact network pillar, wherein the frame image sequence is obtained by continuous shooting at a fixed frame rate by a camera during the travel of a railway track vehicle, and the frame image also contains a timestamp and position information; the frame image sequence is grayed and the edge information of each frame image is obtained by an edge detection algorithm, the contact network pillar area is extracted by the edge information through a SURF algorithm, the straight lines in the contact network pillar area are detected by Hough transform, and the straight lines that meet a preset length threshold and are close to one side of the railway track are screened out as the side edges of the contact network pillars; the gradient amplitude standard deviation of the side edges of the contact network pillars is calculated by the grayscale gradient amplitude of the pixels corresponding to the side edges of the contact network pillars; the proportion of the contact network pillar area is obtained by the ratio of the number of pixels in the contact network pillar area to the total number of pixels in the frame image; The image processing module is used to obtain the target image frame by using the genetic algorithm to obtain the standard deviation of the gradient amplitude and the proportion of the contact network pillar area corresponding to each frame of the frame image sequence; obtain the multi-level grayscale image by using the adaptive double threshold segmentation algorithm; decompose the multi-level grayscale image into multiple scales by using the wavelet transform and detect the target straight line segment by using the Hough transform at different scales; group and merge the target straight line segments by using the hierarchical clustering algorithm to obtain the edge representation of the side of the contact network pillar; The limit measurement module is used to establish a mapping function from pixel coordinates to actual space coordinates through a pre-calibrated image distortion model and camera internal and external parameters; convert the edge representation of the side of the contact network pillar into actual space coordinates, and obtain the plane equation in three-dimensional space through least squares fitting; calculate the intersection of the plane and the preset track centerline plane to obtain the side contour line of the contact network pillar; calculate the minimum distance between the contour line and the track centerline to obtain the side limit value of the contact network pillar, and transmit the side limit value of the contact network pillar and the corresponding timestamp and position information to the server; The system further comprises: Image frame optimization module, used to obtain the number of images in the frame image sequence corresponding to a single contact network pillar , randomly generate a single frame image corresponding to the frame image sequence The observation states of each arrangement are used as processing schemes, each observation state includes processing state and measurement information entropy, where the processing state includes two states: 0 and 1. The processing state 0 represents that the single frame image is not selected as the target image frame, and the processing state 1 represents that the single frame image is selected as the target image frame; the initial population of the processing scheme is generated, and the initial population includes Individual , each individual represents a treatment plan, and each treatment plan has a randomly generated The initial population is iteratively evolved according to the observed state of each arrangement. The iterative evolution steps include: evaluating the individual The measured information entropy under the corresponding processing state is calculated, and all the measured information entropy of the single frame image with processing state 1 is calculated and recorded as the total measured entropy; the individuals with the largest number of processing states 1 are sorted according to the total measured entropy and eliminated. The winning individuals are selected through the roulette wheel selection method, and the winning individuals are crossovered and mutated to obtain the offspring individuals. ; Replace the initial population with offspring individuals , iterative evolution is performed again until the increase in the total entropy of the measurements of the offspring individuals and the parent individuals is lower than the set measurement information threshold; the single-frame image corresponding to the processing scheme of the final winning individual after the iterative evolution is completed is used as the target image frame.
6. A railway overhead line support side clearance measurement system as claimed in claim 5, characterized in that: The system further comprises: Parameter optimization module, used to obtain the first Individual treatment plans ,in Representative Solutions No. The processing status of a single frame image, The value is 0 or 1; Representative Solutions No. The measured information entropy of a single frame image, A variable whose value is a positive integer. The value is 1 to the number of images in the frame image sequence integer variable; Solutions No. The measured information entropy of a single frame image for: ; in For the Solutions No. The standard deviation of the gradient amplitude of a single frame image, For the Solutions No. The proportion of the contact network support area in a single frame image, The value ranges from 1 to integer variable; Individual treatment plans The measured total entropy for: 。 7. A railway overhead line support side clearance measurement system as claimed in claim 6, characterized in that: The system further comprises: The first optimization module is used to adjust the shooting interval and shooting time of the single-frame image of the camera. The interval threshold for adjusting the shooting interval is that the standard deviation of the gradient amplitude of the single-frame image does not exceed the set standard deviation threshold, and the moment threshold for adjusting the shooting moment does not exceed the current corresponding shooting interval; the interval threshold is divided into several equal distances and set as the first offset step, and the first offset step is not less than the minimum shutter time of the camera itself; the moment threshold is divided into several equal distances and set as the second offset step; in the process of measuring the side limit of the railway contact network pillar, the shooting interval in the processing scheme is moved by a first offset step each time, and the shooting time is moved by a second offset step each time, and the corresponding measurement total entropy is respectively calculated. , and the corresponding first offset step size and second offset step size are used for camera parameter correction.
8. A railway overhead line support side clearance measurement system as claimed in claim 7, characterized in that: The system further comprises: The second optimization module is used to move the shooting interval in the processing scheme by a first offset step length, and obtain the measured total entropy by the gradient descent method of the discrete sequence The extreme value and the corresponding cumulative first offset step length; the shooting time in the processing scheme is moved by a second offset step length, and the total entropy of the measurement is obtained by the gradient descent method of the discrete sequence The extreme value and the corresponding cumulative second offset step length are used as the cumulative offset step length of the camera parameter.
Citation Information
Patent Citations
System and method of continuously tracking and measuring geometrical parameters of overhead line system
CN107504899A
A high-speed railway foreign matter invasion detection device and method based on FPGA and deep learning
CN109697424A