Catenary and pantograph contact point detection method based on image vision algorithm
By setting up a camera on the top of the train and using image vision algorithm to identify the intersection of pantograph and contact line, the high cost and maintenance difficulties of the existing contact point detection methods are solved, the reliability and accuracy of the detection are improved, and the correctness and accuracy of the detection are achieved. Reliable detection of contact points of contact nets and pantographs.
Patent Information
- Application Number
- CN202210597226.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2025-01-03
- Estimated Expiration
- 2042-05-30
AI Technical Summary
The existing contact point detection methods have high costs, short sensor life cycle, inconvenient maintenance, and low reliability and accuracy in complex environments, making it difficult to realize reliable detection of contact networks and pantograph contact points.
Using an image vision algorithm method, by setting up a camera on the top of the train, using the target detection, threshold method, edge detection and Hough transformation, the intersection of the pantograph and the contact line is identified as the contact point, and the position detection of the contact point is realized. .
It reduces inspection costs, improves the reliability and accuracy of inspection, simplifies the maintenance process, can accurately identify contact points in complex contexts, and extends the service life of the inspection equipment.
Smart Images

Figure CN114973089B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of railway contact network and pantograph contact point detection, and in particular relates to a contact network and pantograph contact point detection method based on image vision algorithm. Background Art
[0002] When a railway train is running, the pantograph uses the contact network to supply power to the train, which will generate complex friction and current stress, which can easily cause contact network system failures. Therefore, reliable detection of the contact network system has become an important part of safeguarding the safe and stable operation of high-speed railways.
[0003] As an important part of the pantograph-catenary system, the pantograph slide plate is in direct contact with the contact wire, and plays a key role in obtaining energy from the contact wire and transmitting it back to the train. The contact wire is laid out in a zigzag shape along the center line of the track. Under normal conditions, the contact wire will rub evenly on the pantograph slide plate. However, the contact wire equipment installed outdoors is greatly affected by extreme environmental factors, which can easily cause failures in the contact wire device. At this time, the contact wire may rub unevenly on the pantograph slide plate, reducing the service life of the pantograph. When the support device of the contact wire is seriously offset, the contact wire will hook the horns of the pantograph, causing damage to the pantograph. However, most of the contact wire equipment is not in a standby state. During the train operation, the interruption of the train due to a major accident of the contact wire will bring great trouble to the railway operation. Therefore, in order to be able to warn of the impending failure of the contact wire in advance and maintain the contact wire as early as possible, the contact point detection technology of the contact wire is particularly important.
[0004] In recent years, the rapid development of high-speed railways in the world has not only brought huge economic benefits to the national economy and people's livelihood, but also raised new challenges to the research of related theories. With the increase in running speed, once a derailment accident occurs, it will cause greater casualties and property losses than lower-speed vehicles, seriously affecting the economic and social benefits of railway transportation. Therefore, real-time detection of stability indicators during train travel and early warning are of great practical significance.
[0005] Although the existing contact detection for contact point detection has a certain degree of accuracy, the installed sensors need to take into account the insulation performance, which greatly increases the detection cost and affects the dynamic performance of the pantograph. The sensor life cycle is short, maintenance is inconvenient, and long-term reliable monitoring cannot be achieved. Non-contact sensor detection methods usually use photomultiplier tubes, lasers, infrared detectors, etc. to detect abnormal conditions of contact points or contact lines. The railway operates in a complex outdoor environment. These traditional methods of contact point detection through light and heat have certain application value, but they are easily affected by environmental interference, and false alarm information requires manual confirmation. The reliability and accuracy are not high, and the equipment cost is expensive. Summary of the invention
[0006] The intersection of the contact wire of the overhead contact network and the pantograph slide line is called the contact point. The contact point position normally moves in a zigzag shape within a section of the slide area symmetrical to the center line of the pantograph slide. When the contact point moves asymmetrically, the wear of the pantograph slide will be inconsistent, which may easily lead to deformation of the pantograph slide; or when the contact point position is too close to the pantograph horn, it may easily cause the contact line to detach from the pantograph. In severe cases, it may cause the contact line to entangle the pantograph horn, resulting in the horn breaking. Reliable detection of the contact point position is very important for safe and stable railway operation.
[0007] In order to make up for the gaps and deficiencies in the prior art, the present invention proposes a contact point detection method for the overhead line and pantograph based on an image vision algorithm. Considering that the existing contact point detection is generally performed by installing a sensor on the pantograph, this method needs to take into account the insulation performance, greatly increases the detection cost and affects the dynamic performance of the pantograph. The sensor life cycle is short and maintenance is inconvenient. In the solution of the present invention, only a camera installed on the top of the train is needed to detect the position of the contact point through an image vision algorithm.
[0008] The present invention specifically adopts the following technical solutions:
[0009] A method for detecting contact points of a contact network and a pantograph based on an image vision algorithm, characterized in that: a camera is arranged on the top of a train to continuously collect the current state image of the pantograph as a data set, and the position of the contact point is detected by using an image recognition method;
[0010] In the process of detecting the position of the contact point by the image recognition method: the pantograph area is extracted by the target detection algorithm; the foreground image is extracted and the background image is eliminated by the threshold method; the edge detection is performed on the segmented foreground image, and then the straight lines in the edge features are identified, and the identified straight lines are constrained by prior knowledge. The constraints include the position of the line segment, the length of the line segment, and the slope of the line segment. After the constraints, the edge straight line segment only retains the slide line of the pantograph and the contact line of the contact network, and their intersection is determined as the contact point.
[0011] Furthermore, when the pantograph area is located and extracted, the extracted area includes the pantograph and the contact line, and the coverage is ensured by extending a certain distance in all directions with the pantograph as the center: the width of the pantograph in the image is defined as w, and the height is defined as h. The extracted pantograph area is extended by 0.1w to the left and right sides and 0.5h upward with the pantograph as the center. The final width and height of the pantograph area are 1.2w and 1.5h respectively.
[0012] Furthermore, the threshold method is used to extract the foreground image and remove the background image.
[0013] If the image captured by the camera is an RGB image, first convert the image into a grayscale image, then record the foreground and background segmentation threshold as T, the value range of T is 0-255, and the inter-class variance is g. The threshold T that maximizes g is calculated by traversal. The foreground image is extracted and the background image is removed according to the threshold. g is shown in the following formula:
[0014] g=ω0*ω1*(μ0-μ1) 2
[0015] Among them, ω0 is the proportion of the number of foreground pixels to the number of pixels in the entire contact network image, ω1 is the proportion of the number of background pixels to the number of pixels in the entire contact network image, μ0 is the average grayscale value of the foreground pixels, and μ1 is the average grayscale value of the background pixels.
[0016] Furthermore, when there are discontinuous intervals in the foreground image pixel values, the morphological opening operation is used to repair the image edges:
[0017]
[0018] Among them, S is the image after the opening operation; X is the original image, and B is the structural operation kernel of the closing operation. Θ represents the erosion operation in the image processing algorithm, Represents the dilation operation in image processing algorithms.
[0019] Furthermore, the specific process of performing edge detection on the segmented foreground image is as follows:
[0020] First, the pantograph image is smoothed by Gaussian filtering, and then the edge detection operator with a 3*3 convolution kernel is used to calculate the gradient strength and direction of each pixel; the 3*3 convolution kernel operator includes S x and S y , as shown in the following formula, they represent the gradient levels in the x and y directions respectively:
[0021]
[0022] Then the first-order derivatives of the pixel point P(m,n) in the horizontal and vertical directions are divided into:
[0023]
[0024]
[0025] Among them, P1-P8 represent the grayscale values of 8 adjacent positions at the image position (m,n), represents the convolution operation;
[0026] Then the gradient G(m,n) and direction θ(m,n) are defined as:
[0027]
[0028] θ(m,n)=arctan(f x (m,n),f y (m,n)
[0029] Among them, the value of θ(m,n) is limited to the closest angle among 0°, 45°, 90°, -45°, and -90°, and 0°, 45°, -45°, -90°, and 90° are divided into four directions. Two directions perpendicular to each other are called opposite directions;
[0030] Then, the amplitude is non-maximum suppressed according to the angle. At each pixel point, the gradient value of the point with the opposite gradient direction among the 8 points around the point is compared. If the pixel value in the center is relatively large, the pixel point is retained and deleted. By retaining the point with the largest local gradient value and eliminating smaller points, refined edge features can be obtained.
[0031] Furthermore, the specific process of identifying the straight line in the edge feature is:
[0032] Use Hough transform to detect straight line segments in the image: After obtaining the edge detection image, first initialize the accumulator H(θ0,ρ0), then enter the loop and traverse each edge point; convert the edge point image coordinates into polar coordinates, initialize the angle value θ0 to 0°, enter the loop again, calculate ρ0 and add 1 to the corresponding position of the accumulator; then increase the angle value by 1°, calculate ρ0 again and add 1 to the corresponding position of the accumulator until the angle value is 360°, where the polar coordinate ρ0 of the pixel point is as follows:
[0033] ρ0=m*cosθ0+n*sinθ0
[0034] Where m and n are the pixel coordinates of the pixel points respectively;
[0035] Finally, the distance-angle parameter space accumulator H(θ,ρ) is obtained. If the number of accumulators under a certain distance-angle parameter exceeds the set threshold, it is considered to be a found straight line. The straight line equation is as follows; according to the obtained straight line equation, find the image edge segment that meets the conditions:
[0036]
[0037] Furthermore, the specific process of using prior knowledge to constrain the identified straight line is:
[0038] According to the obtained pantograph image, the area of 0.2-0.8 of the width and 0.2-0.4 of the height of the intercepted pantograph area image is used as the position constraint for sliding plate line extraction, and the area of 0.2-0.8 of the width and 0-0.4 of the height is used as the position constraint for contact line extraction; 1 / 5 of the pixel length of the width of the intercepted pantograph area image is taken as the length constraint of the sliding plate line, and 1 / 3 of the pixel length of the height is taken as the length constraint of the contact line; the slope of the sliding plate line is limited to -5°~5°, and the slope of the contact line is limited to -60°~60°; under different camera parameters and installation positions, the above parameters are fine-tuned to achieve the optimal constraint value.
[0039] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the contact network and pantograph contact point detection method based on the image vision algorithm as described above is implemented.
[0040] A computer-readable storage medium having a computer program stored thereon, characterized in that when the program is executed by a processor, the above-mentioned contact network and pantograph contact point detection method based on image vision algorithm is implemented.
[0041] Compared with the prior art, the present invention and its preferred embodiments have at least the following outstanding advantages:
[0042] 1. Considering the cost and maintenance difficulty, only one camera is needed to detect the contact points between the contact network and the pantograph.
[0043] 2. The detection algorithm based on image vision is used to improve the reliability and accuracy of detection in complex backgrounds. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram of the main algorithm modules of the contact network and pantograph contact point detection method based on image vision algorithm provided in an embodiment of the present invention.
[0045] Figure 2 This is a schematic diagram of pantograph area extraction according to an embodiment of the present invention.
[0046] Figure 3 Schematic diagram of adaptive threshold segmentation according to an embodiment of the present invention.
[0047] Figure 4 Schematic diagram of image morphological opening operation according to an embodiment of the present invention.
[0048] Figure 5 FIG. 4 is a schematic diagram of edge detection according to an embodiment of the present invention.
[0049] Figure 6The figure is a schematic diagram of a process of detecting straight line segments in an image by using Hough transform according to an embodiment of the present invention.
[0050] Figure 7 It is a schematic diagram of the straight line segment recognition effect of an embodiment of the present invention.
[0051] Figure 8 Schematic diagram of constraint rules according to an embodiment of the present invention.
[0052] Fig. 9 It is a schematic diagram of the detection effect after utilizing constraints according to an embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to make the features and advantages of this patent more obvious and easy to understand, the following embodiments are specifically described in detail as follows:
[0054] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in this specification have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0055] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0056] like Figure 1-Figure 9 As shown, the contact network and pantograph contact point detection method based on image vision algorithm provided in this embodiment can be described as the following steps:
[0057] Step S11: If the camera is placed at different positions on the top of different trains, the position of the pantograph in the image transmitted by the camera and the proportion of the whole image it occupies are also different, and the background image outside the pantograph area is likely to interfere with the extraction of the contact point in the image. Then the pantograph area must be located and extracted first. The extracted area must include the pantograph and the contact line. The width of the pantograph in the image is defined as w, and the height is defined as h. Then the extracted pantograph area is centered on the pantograph and extends 0.1w to the left and right sides respectively, and extends 0.5h upward. The final width and height of the pantograph area are: 1.2w and 1.5h, respectively. For example, Figure 2 shown.
[0058] Step S12: For the method of region extraction, generally, the method of manual marking can be adopted to specify the position of the pantograph in the image. If the high-speed railway is running, the target detection algorithm can be considered to extract the pantograph area according to the actual situation. The reason is that the pantograph will vibrate at high speed. If the pantograph position exceeds the manually marked area due to vibration, then the target detection algorithm must be used to dynamically identify the pantograph position.
[0059] Step S21: Segment the foreground and background of the image. Since the foreground of the pantograph image is the pantograph and the contact line in contact with the pantograph slide, the background may contain the catenary's suspension strings, support towers, and catenary cables. In order to ensure the reliability and accuracy of contact point recognition, the background information needs to be filtered out. If the image captured by the camera is an RGB image, first convert the image into a grayscale image, and then record the foreground and background segmentation threshold as T, the value range of T is 0-255, and the inter-class variance is g. The threshold T that maximizes g is calculated by traversal, and the foreground image is extracted and the background image is eliminated according to the threshold. g is shown in the following formula.
[0060] g=ω0*ω1*(μ0-μ1) 2
[0061] Among them, ω0 is the proportion of the number of foreground pixels to the number of pixels in the entire contact network image, ω1 is the proportion of the number of background pixels to the number of pixels in the entire contact network image, μ0 is the average grayscale value of the foreground pixels, and μ1 is the average grayscale value of the background pixels.
[0062] The segmentation effect of foreground and background is as follows Figure 3 shown.
[0063] Step S22: Due to differences in image quality, if there are discontinuous intervals in the foreground image pixel values, there may be breakpoints or disconnections in the foreground area after step S21, which will affect the subsequent algorithms. It is necessary to repair the edges that may be damaged and use morphological opening operations to process the image, such as Figure 4 shown.
[0064]
[0065] Among them, S is the image after the opening operation; X is the original image, and B is the structural operation kernel of the closing operation. Θ represents the erosion operation in the image processing algorithm, Represents the dilation operation in image processing algorithms.
[0066] Step S3: Perform edge recognition on the segmented foreground image. The edge of an object in an image is generally manifested as a local feature discontinuity of the pixel grayscale value. The grayscale value changes suddenly at the edge, and the essence of edge detection is to identify the boundary line of the local feature discontinuity of the pixel grayscale value. First, perform Gaussian filter image smoothing on the pantograph image, and then use the edge detection operator with a 3*3 convolution kernel to calculate the gradient strength and direction of each pixel. The 3*3 convolution kernel operator includes S x and S y , as shown in the following formula, they represent the gradient levels in the x and y directions respectively.
[0067]
[0068] Then the first-order derivatives of the pixel point P(m,n) in the horizontal and vertical directions are divided into:
[0069]
[0070]
[0071] Among them, P1-P8 represent the grayscale values of 8 adjacent positions at the image position (m,n), Represents the convolution operation.
[0072] Then the gradient G(m,n) and direction θ(m,n) are defined as:
[0073]
[0074] θ(m,n)=arctan(f x (m,n),f y (m,n)
[0075] The value of θ(m,n) is limited to the closest angle among 0°, 45°, 90°, -45°, and -90°, and 0°, 45°, -45°, -90°, and 90° are divided into four directions. Two directions perpendicular to each other are called opposite directions.
[0076] Then, the amplitude is suppressed according to the angle. At each pixel point, the gradient value of the point with the opposite gradient direction is compared with the 8 points around the point. If the pixel value in the center is relatively large, the pixel point is retained and deleted. By retaining the point with the largest local gradient value and eliminating the smaller points, the refined edge features can be obtained, such as Figure 5 shown.
[0077] Step S4: After edge detection of the image, it is necessary to identify the straight lines in the edge features, namely the pantograph slide line and the contact line. Hough transform is used to detect the straight line segments in the image. The detection process is as follows: Figure 6As shown. After obtaining the edge detection image, first initialize the accumulator H(θ0,ρ0), then enter the loop and traverse each edge point. Convert the edge point image coordinates into polar coordinates, initialize the angle value θ0 to 0°, enter the loop again, calculate ρ0 and add 1 to the corresponding position of the accumulator. Then increase the angle value by 1°, calculate ρ0 again and add 1 to the corresponding position of the accumulator until the angle value is 360°, where the polar coordinate ρ0 of the pixel point is shown below.
[0078] ρ0=m*cosθ0+n*sinθ0
[0079] Where m and n are the pixel coordinates of the pixel points respectively.
[0080] Finally, the distance-angle parameter space accumulator H(θ,ρ) is obtained. If the number of accumulators under a certain distance-angle parameter exceeds the set threshold, it is considered to be a found straight line. The straight line equation is shown below. Based on the obtained straight line equation, the edge line segment of the image that meets the conditions can be found.
[0081]
[0082] The effect of straight line segment recognition is shown in the figure Figure 7 shown.
[0083] Step S5: Based on the analysis and summary of the image positions of the contact line and the slide line, prior knowledge is formed, and the contact point straight line is constrained using the prior knowledge. The constraint items include the position of the line segment, the length of the line segment, and the slope of the line segment. Based on the obtained pantograph image, the constraint diagram is as follows: Figure 8 As shown, the area of 0.2 to 0.8 of the width and 0.2 to 0.4 of the height of the intercepted pantograph area image is taken as the position constraint for the slide line extraction, and the area of 0.2 to 0.8 of the width and 0 to 0.4 of the height is taken as the position constraint for the contact line extraction; 1 / 5 of the pixel length of the intercepted pantograph area image width is taken as the length constraint of the slide line, and 1 / 3 of the pixel length of the height is taken as the length constraint of the contact line; the slope of the slide line is limited to -5° to 5°, and the slope of the contact line is limited to -60° to 60°. Under different camera parameters and installation positions, these parameters can be fine-tuned to achieve the best constraint value. After the constraints, as shown Fig. 9 As shown, the edge straight line segment will only retain the slide line of the pantograph and the contact line of the overhead wire, and their intersection is the contact point.
[0084] In summary, the present invention uses only one camera device and an image vision algorithm to propose background interference information for contact point identification, thereby improving the reliability and accuracy of contact point position detection of the overhead contact network and the pantograph.
[0085] The above-mentioned program design scheme involving the algorithm provided in this embodiment can be stored in a computer-readable storage medium in a coded form, and implemented in the form of a computer program, and the basic parameter information required for the calculation is input through computer hardware, and the calculation result is output.
[0086] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0087] The present invention is described with reference to flowcharts of methods, devices (apparatus), and computer program products according to embodiments of the present invention. It should be understood that each process in the flowchart, as well as the combination of processes in the flowchart, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A device that specifies functions in a process or multiple processes.
[0088] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple functions specified in a flowchart.
[0089] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 The steps of a specified function in a process or multiple processes.
[0090] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
[0091] This patent is not limited to the above-mentioned optimal implementation mode. Anyone can derive other various forms of contact network and pantograph contact point detection methods based on image vision algorithms under the inspiration of this patent. All equal changes and modifications made according to the scope of the patent application of the present invention should be covered by this patent.
Claims
1. A method for detecting contact points of overhead line and pantograph based on image vision algorithm, characterized in that: A camera is set on the top of the train to continuously collect the current state image of the pantograph as a data set, and the position of the contact point is detected using image recognition method; In the process of detecting the position of the contact point by the image recognition method: the pantograph area is extracted by the target detection algorithm; the foreground image is extracted by the threshold method and the background image is eliminated; the edge detection is performed on the segmented foreground image, and then the straight line in the edge feature is identified, and the identified straight line is constrained by prior knowledge, and the constraint items include the position of the line segment, the length of the line segment, and the slope of the line segment. After the constraint, the edge straight line segment only retains the slide line of the pantograph and the contact line of the contact network, and their intersection is determined as the contact point; The specific process of edge detection on the segmented foreground image is as follows: First, the pantograph image is smoothed by Gaussian filtering, and then the edge detection operator with a 3*3 convolution kernel is used to calculate the gradient strength and direction of each pixel; the 3*3 convolution kernel operator includes S x and S y , as shown in the following formula, they represent the gradient levels in the x and y directions respectively: Then the first-order derivatives of the pixel point P(m,n) in the horizontal and vertical directions are divided into: Among them, P1-P8 represent the grayscale values of 8 adjacent positions at the image position (m,n), represents the convolution operation; Then the gradient G(m,n) and direction θ(m,n) are defined as: θ(m,n)=arctan(f x (m,n),f y (m,n)) Among them, the value of θ(m,n) is limited to the closest angle among 0°, 45°, 90°, -45°, and -90°, and 0°, 45°, -45°, -90°, and 90° are divided into four directions; the two directions perpendicular to each other are called opposite directions; Then, the amplitude is suppressed according to the angle. At each pixel point, the gradient value of the point with the opposite gradient direction among the 8 points around the point is compared. If the pixel value at the center is relatively large, the pixel point is retained. If the pixel value at the center is relatively small, the pixel point is deleted. By retaining the point with the largest local gradient value and eliminating the smaller points, the refined edge features can be obtained. The specific process of identifying the straight line in the edge feature is as follows: Use Hough transform to detect straight line segments in the image: After obtaining the edge detection image, first initialize the accumulator H(θ0,ρ0), then enter the loop and traverse each edge point; convert the edge point image coordinates into polar coordinates, initialize the angle value θ0 to 0°, enter the loop again, calculate ρ0 and add 1 to the corresponding position of the accumulator; then increase the angle value by 1°, calculate ρ0 again and add 1 to the corresponding position of the accumulator until the angle value is 360°, where the polar coordinate ρ0 of the pixel point is as follows: ρ0=m*cosθ0+n*sinθ0 Where m and n are the pixel coordinates of the pixel points respectively; Finally, the distance-angle parameter space accumulator H(θ,ρ) is obtained. If the number of accumulators under a certain distance-angle parameter exceeds the set threshold, it is considered to be a found straight line. The straight line equation is as follows; according to the obtained straight line equation, find the image edge segment that meets the conditions: The specific process of using prior knowledge to constrain the identified straight line is as follows: According to the obtained pantograph image, the area of 0.2-0.8 of the width and 0.2-0.4 of the height of the intercepted pantograph area image is used as the position constraint for sliding plate line extraction, and the area of 0.2-0.8 of the width and 0-0.4 of the height is used as the position constraint for contact line extraction; 1 / 5 of the pixel length of the width of the intercepted pantograph area image is taken as the length constraint of the sliding plate line, and 1 / 3 of the pixel length of the height is taken as the length constraint of the contact line; the slope of the sliding plate line is limited to -5°~5°, and the slope of the contact line is limited to -60°~60°; under different camera parameters and installation positions, the above parameters are fine-tuned to achieve the optimal constraint value.
2. The method for detecting contact points of overhead line and pantograph based on image vision algorithm according to claim 1 is characterized in that: When locating and extracting the pantograph area, the extracted area includes the pantograph and the contact line, and the coverage is ensured by extending a certain distance in all directions with the pantograph as the center: the width of the pantograph in the image is defined as w, and the height is defined as h. The extracted pantograph area is extended by 0.1w to the left and right sides and 0.5h upward with the pantograph as the center. The final width and height of the pantograph area are 1.2w and 1.5h respectively.
3. The method for detecting contact points of overhead line and pantograph based on image vision algorithm according to claim 1, characterized in that: The threshold method is used to extract the foreground image and remove the background image. If the image captured by the camera is an RGB image, first convert the image into a grayscale image, then record the foreground and background segmentation threshold as T, the value range of T is 0-255, and the inter-class variance is g. The threshold T that maximizes g is calculated by traversal. The foreground image is extracted and the background image is removed according to the threshold. g is shown in the following formula: g=ω0*ω1*(μ0-μ1) 2 Among them, ω0 is the proportion of the number of foreground pixels to the number of pixels in the entire contact network image, ω1 is the proportion of the number of background pixels to the number of pixels in the entire contact network image, μ0 is the average grayscale value of the foreground pixels, and μ1 is the average grayscale value of the background pixels.
4. The method for detecting contact points of overhead line and pantograph based on image vision algorithm according to claim 1 is characterized in that: When there are discontinuous intervals in the foreground image pixel values, the morphological opening operation is used to repair the image edges: Among them, S is the image after the opening operation; X is the original image, B is the structural operation kernel of the closing operation; Θ represents the corrosion operation in the image processing algorithm, Represents the dilation operation in image processing algorithms.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the contact network and pantograph contact point detection method based on image vision algorithm as described in any one of claims 1-4 is implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the contact network and pantograph contact point detection method based on image vision algorithm as described in any one of claims 1-4 is implemented.
