Statistics-based railway overhead line system scene structure branch line fitting method

By analyzing and combining straight lines in the railway contact network scene based on statistics, the problem of straight lines being split due to occlusion, local blur and intersection is solved, the accuracy of straight lines is improved, and a more reliable solution is provided for the attitude analysis of railway contact network scene facilities.

CN119723506AActive Publication Date: 2025-03-28ZHENGZHOU PANHUI ELECTRONIC TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410988991.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2025-03-28
Estimated Expiration
2044-07-23

AI Technical Summary

Technical Problem

The prior art cannot screen out the most accurate straight lines in dealing with the problem that straight lines are cut due to factors such as occlusion, local blur and intersection in the railway contact network scenario, which affects the accuracy of straight lines calculation.

Method used

The statistical-based method is adopted to analyze the straight line features, slopes and intercepts in the image, infer and merge straight lines, and dynamic parameter classification to restore straight lines, improve the LSD algorithm to improve the accuracy of straight line detection.

Benefits of technology

It can extract continuous, unsliced ​​straight lines from complex scenarios, significantly improve the accuracy of straight lines calculation, and provide a more reliable solution for the attitude analysis of railway contact network scenario facilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723506A_ABST
    Figure CN119723506A_ABST
Patent Text Reader

Abstract

The invention relates to the field of railway line graph analysis and processing methods, in particular to a railway contact network scene structure branch line fitting method based on statistics. The objective of the invention is to solve the problem that a large amount of redundant data is brought to later image analysis due to the fact that a straight line in a line image is often split due to shielding, local blurring, intersection and other factors in the prior art. The method comprises the steps of image acquisition, line extraction, image analysis, data merging, branch line merging and the like. The method has the advantages that at least one round of branch line fitting is carried out before further image analysis is proposed for the first time, and a later data algorithm is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of railway line graphics analysis and processing methods, in particular to a railway overhead line scene structure branch line fitting method based on statistics. Background Art

[0002] In the operation lines of railways, especially high-speed railways, the power supply system is a system composed of power supply system and power transmission and distribution system that generates electric energy and supplies and transmits it to electrical equipment. In long-distance power supply systems, the problem of line equipment damage and difficulty in maintenance is often faced. This means that in the work along the line, there is a lot of graphic monitoring work, and most of the LSD line segment detection algorithms for railway line graphic analysis can obtain the straight line segment detection results. Through local analysis of the image, the pixel point set of the straight line is obtained, and then the hypothesis parameters are verified and solved, and the pixel point set is merged with the error control set, and then the number of false detections is adaptively controlled. Generally speaking, to detect straight lines in an image, the most basic idea is to detect the pixel point set with large gradient changes in the image. The LSD algorithm also uses gradient information and level-lines to detect straight lines.

[0003] However, there are the following problems in the prior art:

[0004] (1) In the existing technical solution, for the intersection of straight lines, because each point is set to be USED, each point can only belong to one straight line. If there is an intersection, at least one straight line must be split into two. Because it is based on gradient, the gradient value of the intersection of straight lines is often small (not detected as an edge point), so it is very likely that the two intersecting straight lines will be split into four line segments at the intersection.

[0005] (2) Due to the self-growth characteristics of the local detection algorithm, long line segments are often split into multiple straight lines due to reasons such as occlusion and local blur.

[0006] That is to say, the traditional LSD method has certain limitations when dealing with these situations and cannot screen out the most accurate straight line, thus affecting the accuracy of the straight line calculation. Summary of the invention

[0007] The purpose of the present invention is to solve the common problems faced by the straight line detection part in the posture analysis of railway contact network scene facilities, that is, the straight line is often split due to factors such as occlusion, local blur and intersection. In other words, in order to solve the problem that the straight line is often split due to factors such as occlusion, local blur and intersection, this method proposes a statistical method for calculating complete straight lines. We use statistical classification technology to calculate the structural posture of facilities in the image. By analyzing the characteristics, slope and intercept of the straight line in the image, we can infer how the straight line is merged. This method improves the LSD algorithm and restores the straight line through dynamic parameter classification.

[0008] The specific scheme of the present invention is:

[0009] A statistically based railway overhead contact network scenario structural branch line fitting method is designed, which includes the following steps:

[0010] (1) Image acquisition: A video recording device is installed on the front of the high-speed train. When the high-speed train runs at a speed of more than 150 km / h, a camera is taken every 0.2 to 0.5 seconds to form a captured image. The captured image is input into the communication or the hard disk at a fixed time and the image processing system starts to identify and screen.

[0011] (2) Image line extraction: Starting from the lower right corner of the acquired image to the upper left corner, the pixel points along the way are horizontally checked in units of single pixels, and the LSD algorithm is used to detect all straight line elements in the image to form a sample image A;

[0012] (3) Analyze sample image A: In sample image A, take each branch line as a data group, collect pixel coordinate information of at least two points in each data group, and use the slope-intercept equation, b = y-mx; to obtain the slope of the data group, where: x1, y1 are the pixel coordinate information of pixel one, and x0, y0 are the pixel coordinate information of pixel two;

[0013] (4) Data merging based on slope information:

[0014] a. Set the slope error threshold LK and the intercept error threshold LB;

[0015] b. Create a mapping data structure (MAP) to store the classified line data;

[0016] Get the slope m and intercept b of the next straight line. If there is no straight line data, end the algorithm;

[0017] If MAP is empty, the current line is directly put into the dictionary, and the key of the dictionary is 1. Then execute step 3. If MAP is not empty, execute step (5).

[0018] d. Traverse the MAP and check whether the slope m of the first element in all keys in the MAP is less than LK and whether the intercept b is less than LB. If the conditions are met, merge the slope m and intercept b of the current line into the set of lines corresponding to this key, and then continue to execute step 3; if the conditions are not met, create a new key in the MAP, the value of which is the maximum value of the existing keys plus 1, then put the current line into the set of lines corresponding to this new key, and then execute step (3);

[0019] (5) Merge the branch lines according to the keys of the dictionary: Through step (3), N sets of line sets have been obtained,

[0020] Let the set of lines be U ij , where i represents the i-th group of lines, j represents the j-th line segment, and j <= n, where n is the number of line segments; let x i be the x coordinate of the line, 0 < i < 1, the starting coordinate when i = 0, and the ending coordinate when i = 1; let y i be the y coordinate of the line, 0 < i < 1, the starting coordinate when i = 0, and the ending coordinate when i = 1; let the result set be R i , where i represents the result of merging the lines in the i-th group.

[0021] The merging formula is:

[0022] R i = ((U i0 x0, U i0 y0), (U in x1, U in y1))

[0023] During the merging process, we use the starting coordinates (U i0 x0, U i0 y0) of the first group of lines as the starting coordinates of the result set R_i, and use the ending coordinates (U in x1, U in y1) of the last group of lines as the ending coordinates of the result set R_i.

[0024] Alternatively, after step (5), combined with the sample image A in step (1), screen out the data of the merged lines to form a sample image B, and perform a secondary screening on the remaining lines in the sample image B. The screening steps are as follows:

[0025] (6) In the sample image B, take each branch line as a data group, collect the pixel point coordinate information of at least 3 points on each data group, and use the sum and the parabola formula, y = dx2 + ex + cf), to form 3 ternary quadratic equations, and then form a set of ternary quadratic equation systems to solve for d, e, f, and use d, e, f as the judgment array conditions;

[0026] a. Create a mapping data structure (MAP) to store the classified curve data;

[0027] b. Obtain the array conditions of the next curve. If there is no more array condition data, end the algorithm;

[0028] Among them, if MAP is empty, directly put the current line into the dictionary with the key of 1. Then execute step (6). If MAP is not empty, execute step (5).

[0029] c. Traverse MAP and check if the array conditions in all keys in MAP are the same as the previous array conditions. If the condition is met, merge the current curve into the curve set corresponding to the key and continue to execute step 3; if the condition is not met, create a new key in MAP with the value being the maximum value of the existing keys plus 1, then put the current curve into the curve set corresponding to the new key, and then execute step (6);

[0030] (7) Merge the branches according to the keys of the dictionary: Through step three, N groups of curve sets have been obtained. Let the line set be U ij , i represents the i-th group of lines, j represents the j-th line segment, j <= n, where n is the number of line segments; Let x i be the x coordinate of the line, 0 < i < 1, the starting coordinate when i = 0, and the ending coordinate when i = 1; Let y i be the y coordinate of the line, 0 < i < 1, the starting coordinate when i = 0, and the ending coordinate when i = 1; Let the result set be R i , i represents the result of the merged curve of the i-th group.

[0031] The merging formula is:

[0032] R i = ((U i0 x0, U i0 y0), (U in x1, U in y1))

[0033] During the merging process, we use the starting coordinates of the first group of lines (U i0 x0, U i0 y0) as the starting coordinates of the result set R_i, and use the ending coordinates of the last group of lines (U in x1, U in y1) as the ending coordinates of the result set R_i. Before step (2), perform color removal processing on the image.

[0034] After step (8), the sample image A in step (1) is combined to screen out the data of the merged straight lines and curves to form a sample image C. The remaining lines in sample C are subjected to pixel analysis to further determine their component types.

[0035] The beneficial effects of the present invention are:

[0036] This patented technology uses innovative methods and algorithms to extract continuous, unbroken straight lines from complex scenes such as occlusion, partial blur, and intersection. The introduction of this technology will significantly improve the accuracy of straight line calculation and provide a more reliable solution for the posture analysis of railway contact network facilities.

[0037] This patent is intended to protect the proposed method for linear structure calculation for railway structure detection. This includes algorithm improvements and optimizations specifically for railway scene structure detection to improve the accuracy and reliability of straight line fitting. The patent may clearly specify the technical details and innovations in this specific scenario, such as specific image processing steps, optimization algorithms, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a comparison diagram of the original photo in the present invention and the corresponding photo after the LSD algorithm in the prior art;

[0039] Figure 2 It is a comparison diagram after the prior art LSD algorithm in the present invention and after fitting in the present application;

[0040] Figure 3 It is a flowchart of the steps of this algorithm. DETAILED DESCRIPTION

[0041] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0042] Example 1

[0043] A statistically based method for fitting branch lines of railway overhead contact network scenarios, see Figures 1 to 3 , the design includes the following steps:

[0044] (1) Image acquisition: A video recording device is installed on the front of the high-speed train. When the high-speed train runs at a speed of more than 150 km / h, a camera is taken every 0.2 to 0.5 seconds to form a captured image. The captured image is input into the communication or the hard disk at a fixed time and the image processing system starts to identify and screen.

[0045] (2) Image line extraction: Starting from the lower right corner of the acquired image and moving towards the upper left corner, check the pixels horizontally one by one. The LSD algorithm is used to detect all the straight line elements in the image, forming a sample image A.

[0046] (3) Analyze the sample image A: In the sample image A, taking each branch line as a data group, collect the pixel coordinate information of at least 2 points on each data group. Using the slope-intercept equation, b = y - mx; obtain the slope of this data group, where, x1, y1 are the pixel coordinate information of one of the pixels, and x0, y0 are the pixel coordinate information of the other pixel.

[0047] (4) Merge data based on the slope information:

[0048] a. Set the slope error threshold LK and the intercept error threshold LB;

[0049] b. Create a mapping data structure (MAP) to store the classified straight line data;

[0050] Obtain the slope m and intercept b of the next straight line. If there is no more straight line data, end the algorithm;

[0051] Among them, if MAP is empty, directly put the current straight line into the dictionary, and the key of the dictionary is 1. Then execute step three. If MAP is not empty, execute step (5).

[0052] d. Traverse MAP, check whether the slope m of the first element in all keys in MAP is less than LK and whether the intercept b is less than LB. If the conditions are met, merge the slope m and intercept b of the current straight line into the straight line set corresponding to this key, and continue to execute step 3; if the conditions are not met, create a new key in MAP, the value of this key is the maximum value of the existing key plus 1, then put the current straight line into the straight line set corresponding to this new key, and then execute step (3);

[0053] (5) Merge the branch lines according to the keys of the dictionary: Through step (3), N groups of straight line sets have been obtained,

[0054] Let the straight line set be U ij , i represents the i-th group of straight lines, j represents the j-th line segment, j <= n, n is the number of line segments; Let x i be the x coordinate of the straight line, 0 < i < 1, when i = 0 it is the starting point coordinate, when i = 1 it is the ending point coordinate; Let y i be the y coordinate of the straight line, 0 < i < 1, when i = 0 it is the starting point coordinate, when i = 1 it is the ending point coordinate; Let the result combination be R i , i represents the merged straight line result of the i-th group.

[0055] The combined formula is:

[0056] R i =((U i0 x0,U i0 y0),(U in x1,U in y1))

[0057] During the merging process, we take the starting coordinates of the first set of lines (U i0 x0,U i0 y0) as the starting coordinate of the result set R_i, and the end coordinate of the last set of straight lines (U in x1,U in y1) as the end point coordinate of the result set R_i. Through this merging formula, we can merge multiple straight line segments into a curve. This merging method is applicable to the situation where there is continuity between multiple straight line segments, and can play an important role in the fields of graphics processing, computer vision, etc. The present invention provides a straight line merging method based on the starting point coordinates and the end point coordinates to improve the readability and processing efficiency of straight line data, and provides a new solution for the technical development and practical application of related fields.

[0058] In this implementation, it is equivalent to finding all lines with the same slope, intersecting and merging them based on the condition that the slope is the same, and managing them as unified line segments, so that each line segment is grouped and named for easy later processing.

[0059] The steps before this embodiment are the same as those in embodiment 1, and the specific difference is that after step (5) is completed, the data of the merged straight line is screened out in combination with the sample image A in step (1) to form a sample image B, and the remaining straight lines in the sample image B are screened twice. The screening steps are as follows:

[0060] (6) In sample image B, take each branch line as a data group, collect pixel coordinate information of at least 3 points on each data group, use the parabola formula, y = dx2 + ex + cf), form 3 three-variable quadratic equations, and then form a set of three-variable quadratic equations, solve d, e, f, and use d, e, f as the judgment array conditions;

[0061] a. Create a mapping data structure (MAP) to store the classified curve data;

[0062] b. Get the array condition of the next curve. If there is no array condition data, the algorithm ends;

[0063] If MAP is empty, the current line is directly put into the dictionary, and the key of the dictionary is 1. Then execute step (6). If MAP is not empty, execute step (5).

[0064] c. Traverse the MAP and check whether the array condition in all keys in the MAP is the same as the previous array condition. If the condition is met, merge the current curve into the curve set corresponding to the key and continue to execute step 3; if the condition is not met, create a new key in the MAP, the value of which is the maximum value of the existing key plus 1, then put the current curve into the curve set corresponding to the new key, and then execute step (6);

[0065] (7) Merge branch lines according to the keys of the dictionary: Through step three, N sets of curve sets have been obtained,

[0066] Let the set of lines be U ij , i represents the i-th group of lines, j represents the j-th line segment, j <= n, where n is the number of line segments; let x i be the x coordinate of the line, 0 < i < 1, the starting coordinate when i = 0, and the ending coordinate when i = 1; let y i be the y coordinate of the line, 0 < i < 1, the starting coordinate when i = 0, and the ending coordinate when i = 1; let the result set be R i , i represents the result of the merged curve of the i-th group.

[0067] The merging formula is:

[0068] R i = ((U i0 x0, U i0 y0), (U in x1, U in y1))

[0069] During the merging process, we use the starting coordinates (U i0 x0, U i0 y0) of the first group of lines as the starting coordinates of the result set R_i, and use the ending coordinates (U in x1, U in y1) of the last group of lines as the ending coordinates of the result set R_i. In this embodiment, the design purpose is to realize the recognition of curves, that is, the recognition of cables. Before step (2), the image is decolorized.

[0070] In the field of computer vision, LSD represents the Line Segment Detector, which is a line segment detection algorithm that can provide sub-pixel accuracy in linear time. The algorithm forms a horizontal line field by calculating the horizontal line angle of each pixel point and further divides it into connected regions, which are called line support regions. By counting the number of pixels and the number of alignment points in these regions, it can be determined whether there is a line segment.

[0071] Embodiment 3

[0072] After the steps of Example 2, that is, after step (8), this embodiment combines the sample image A in step (1), screens out the data of the merged straight line and the data of the curve to form a sample image C, and performs pixel analysis on the remaining lines in sample C to further determine the type of its component. This step is equivalent to reverse judgment. After the branch lines and curves are screened out, the remaining branch line segments or curve segments are analyzed in detail, which can save subsequent analysis time and make the image more focused.

[0073] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A railway overhead line scenario structure branch line fitting method based on statistics, characterized in that: The steps include: (1) Image acquisition: A video recording device is installed on the front of the high-speed train. When the high-speed train runs at a speed of more than 150 km / h, a camera is taken every 0.2 to 0.5 seconds to form a captured image. The collected image is input through communication or timing hard disk into the image processing system to start identification and screening (2) Image line extraction: Starting from the lower right corner of the acquired image to the upper left corner, the pixel points along the way are horizontally checked in units of single pixels, and the LSD algorithm is used to detect all straight line elements in the image to form a sample image A; (3) Analyze sample image A: In sample image A, take each branch line as a data group, collect pixel coordinate information of at least two points in each data group, and use the slope-intercept equation, b = y-mx; to obtain the slope of the data group, where: x1, y1 are the pixel coordinate information of one pixel point, and x0, y0 are the pixel coordinate information of the second pixel point; (4) Data merging is performed based on the slope information: a. Set the slope error threshold LK and the intercept error threshold LB; b. Create a mapping data structure (MAP) to store the classified line data; c. Get the slope m and intercept b of the next straight line. If there is no straight line data, the algorithm ends; If MAP is empty, the current line is directly put into the dictionary, and the key of the dictionary is 1. Then execute step 3. If MAP is not empty, execute step (5). d. Traverse MAP and check whether the slope m of the first element in all keys in MAP is less than LK and whether the intercept b is less than LB. If the conditions are met, merge the slope m and intercept b of the current line into the line set corresponding to the key, and continue to step 3; if the conditions are not met, create a new key in MAP, the value of which is the maximum value of the existing key plus 1, and then put the current line into the line set corresponding to the new key, and then execute step (3); (5) Merge branches according to the dictionary key: N sets of straight lines have been obtained through step (3). Let the set of lines be U ij , where i represents the i-th group of lines, j represents the j-th line segment, and j <= n, with n being the number of line segments; let x i be the x-coordinate of the line, 0 < i < 1, and when i = 0, it is the starting point coordinate, and when i = 1, it is the ending point coordinate; let y i be the y-coordinate of the line, 0 < i < 1, and when i = 0, it is the starting point coordinate, and when i = 1, it is the ending point coordinate; let the result set be R i , where i represents the result of the merged lines in the i-th group. The combined formula is: R i =((U i0 x0,U i0 y0),(U in x1,U in y1)) During the merging process, we take the starting coordinates of the first set of lines (U i0 x0,U i0 y0) as the starting coordinate of the result set R_i, and the end coordinate of the last set of straight lines (U in x1,U in y1) as the end point coordinate of the result set R_i.

2. The method for fitting the branch line of the railway overhead contact network scene structure based on statistics according to claim 1, characterized in that: After step (5) is completed, the data of the merged straight line is screened out in combination with the sample image A in step (1) to form a sample image B. The remaining straight lines in the sample image B are screened twice. The screening steps are as follows: (6) In sample image B, take each branch line as a data group, collect pixel coordinate information of at least 3 points on each data group, use the parabola formula, y = dx2 + ex + cf), form 3 three-variable quadratic equations, and then form a set of three-variable quadratic equations, solve d, e, f, and use d, e, f as the judgment array conditions; a. Create a mapping data structure (MAP) to store the classified curve data; b. Get the array condition of the next curve. If there is no array condition data, the algorithm ends; If MAP is empty, the current line is directly put into the dictionary, and the key of the dictionary is 1. Then execute step (6). If MAP is not empty, execute step (5). c. Traverse the MAP and check whether the array conditions in all keys in the MAP are the same as the previous array conditions. If the conditions are met, merge the current curve into the curve set corresponding to the key and continue to step 3. If the conditions are not met, create a new key in the MAP, the value of which is the maximum value of the existing key plus 1, and then put the current curve into the curve set corresponding to the new key, and then execute step (6); (7) Merge branches according to dictionary keys: N sets of curves have been obtained through step 3. Let the set of lines be U ij , where i represents the i-th group of lines and j represents the j-th line segment, with j <= n and n being the number of line segments; let x i be the x-coordinate of the line, where 0 < i < 1, and when i = 0, it is the starting point coordinate, and when i = 1, it is the ending point coordinate; let y i be the y-coordinate of the line, where 0 < i < 1, and when i = 0, it is the starting point coordinate, and when i = 1, it is the ending point coordinate; let the result set be R i , where i represents the result of the merged curve for the i-th group. The combined formula is: R i =((U i0 x0,U i0 y0),(U in x1,U in y1)) During the merging process, we take the starting coordinates of the first set of lines (U i0 x0,U i0 y0) as the starting coordinate of the result set R_i, and the end coordinate of the last set of straight lines (U in x1,U in y1) as the end point coordinate of the result set R_i.

3. The method for fitting railway overhead line scene structure based on statistics according to claim 1, characterized in that: Before step (2), the image is decolorized.

4. The method for fitting railway overhead contact network scene structure branch line based on statistics according to claim 1, characterized in that: After step (8), the sample image A in step (1) is combined to screen out the data of the merged straight lines and curves to form a sample image C. The remaining lines in sample C are subjected to pixel analysis to further determine their component types.

Citation Information

Patent Citations

  • Railway traffic overhead line system inspection method based on attention mechanism full convolutional network

    CN111553500A

  • Method for extracting discontinuous straight lines in image

    CN111932506A

  • Straight line detection method based on template classification and explicit straight line descriptor

    CN116363055A

  • Line scanning airport map splicing method based on line alignment

    CN117391936A

  • Method, device, and track-bound vehicle, in particular rail vehicle, for a track-based image analysis in track-bound traffic, in particular for a rail-based image analysis in rail traffic

    WO2018104462A1