A method for quickly extracting power transmission lines based on Hough transform

By using a method based on Hough transform, combined with the LSD algorithm and improved Canny edge detection, the problem of low efficiency in traditional line inspection is solved, achieving efficient and accurate extraction of transmission lines and reducing inspection costs and risks.

CN115965882BActive Publication Date: 2026-02-17CHINA UNIV OF MINING & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310066853.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-17
Publication Date
2026-02-17
Estimated Expiration
2043-01-17

AI Technical Summary

Technical Problem

Traditional manual power line inspection is inefficient, costly, and dangerous, and cannot meet the inspection needs of large-scale power grids. Extracting power lines from aerial images is difficult, and complex backgrounds affect the extraction results.

Method used

A method based on Hough transform, combined with LSD algorithm, improved Canny edge detection and 2D EMD algorithm, is adopted to accurately extract transmission lines through image preprocessing, coarse line extraction, component map extraction and morphological transformation.

Benefits of technology

It improves the accuracy and efficiency of power transmission line extraction, reduces workload and risk, and enables rapid and accurate power transmission line detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115965882B_ABST
    Figure CN115965882B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on the fast extraction power transmission line method of Hough transform, comprising: based on the feature of power transmission line in aerial image, the power transmission line aerial image collected is handled, and complete power transmission line is quickly and effectively extracted from complex and varied background.Main steps include pre-processing to aerial image, and the straight line information of image is extracted using LSD algorithm;Subsequently, the IMF of line feature is most obvious, and the background information is most simple using two-dimensional EMD decomposition, interpolation is carried out in gradient direction when Canny edge detection, and the real edge point is determined, to further filter out background;Finally, power line is extracted using Hough transform.This method greatly reduces the consumption of resources and time, solves the problem of time-consuming and labor-consuming of traditional manual inspection method, and has high engineering application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and power transmission line inspection technology, specifically to a method for rapidly extracting power transmission lines based on Hough transform. Background Technology

[0002] With the rapid development of smart grid construction, the scale of transmission lines is gradually increasing, bringing new challenges to the safe operation of the power grid. New and efficient management methods are needed to ensure the safety of power grid transmission lines. Transmission line inspection is a crucial part of ensuring the operation of power grid facilities, primarily aimed at understanding the operational status of transmission lines and promptly identifying defects in related equipment and issues threatening line safety.

[0003] Traditional manual power line inspection is limited by terrain and topography, resulting in low efficiency, high cost, and certain dangers. With the increasing scale of power grids, manual measurement methods can no longer meet the coverage and real-time requirements of transmission line inspection. With the rapid development of small drones and high-resolution visible light cameras, acquiring images of transmission lines using drones equipped with visible light cameras for environmental inspection of transmission line corridors has become a new research approach. This method combines the advantages of high efficiency, low cost, and high automation. However, because image data is easily affected by various factors such as the shooting environment and shooting angle, the acquired images are not simply of transmission lines but often contain complex backgrounds. Therefore, how to completely and effectively extract transmission lines from aerial images is of significant research importance in the field of transmission line inspection. Summary of the Invention

[0004] The purpose of this invention is to provide a method for rapid extraction of transmission lines based on Hough transform, so as to achieve accurate extraction of transmission lines, reduce the workload and risk factor of inspection personnel, and improve work efficiency.

[0005] To achieve the above objectives, the present invention specifically provides the following technical solution:

[0006] A method for fast extraction of transmission lines based on Hough transform includes the following steps:

[0007] Step S1: Use drones to inspect and collect images of power transmission lines;

[0008] Step S2: Preprocess the transmission line inspection images;

[0009] Step S3: Use the LSD algorithm to coarsely extract straight lines from the preprocessed transmission line inspection image to obtain transmission line features;

[0010] Step S4: The two-dimensional EMD algorithm is used to extract the component image with the most obvious features of the transmission line;

[0011] Step S5: The improved Canny edge detection algorithm extracts the edge features of the component map;

[0012] Step S6: Extract electric field lines from the edge features based on morphological Hough transform.

[0013] As a preferred embodiment of the present invention, the preprocessing of the transmission line inspection images includes:

[0014] Step S201, Grayscale Processing: The R, G, and B components of the RGB values ​​in the transmission line inspection image are converted to grayscale using Gamma correction. The specific calculation formula is as follows:

[0015]

[0016] The grayscale image is denoted as img1.

[0017] Step S202, Image Enhancement: Use histogram equalization to enhance the brightness and contrast of image img1. The enhanced image is denoted as img2.

[0018] Step S203, Filtering and Denoising: Use a linear filtering algorithm to denoise img2, and denote the processed image as img3.

[0019] As a preferred embodiment of the present invention, the method of using the LSD algorithm to coarsely extract straight lines from transmission line inspection images includes:

[0020] Step S301: Perform Gaussian downsampling on image img3, with a downsampling ratio S = 0.8. Calculate the magnitude and direction of the gradient using the finite difference of the first-order partial derivative.

[0021] Step S303: Perform gradient pseudo-sorting: 1024 buckets are evenly spaced between 0 and the maximum gradient magnitude of the image. Pixels are then classified into the 1024 buckets according to their corresponding gradient magnitude. LSD first uses the pixel with the maximum gradient as the seed point, and then selects a seed point from the second bin, and so on until all bins are exhausted.

[0022] Step S304: Set the gradient threshold ρ = 5.23. Points with gradient values ​​less than ρ are set to USED, and points with gradient values ​​greater than ρ are set to UNUSED. Extract all points in the UNUSED state.

[0023] Step S305: Select the points with large gradient magnitudes from the sorted list as seed points, and use the horizontal angle of these points as the initial angle θ of the region. region Then search for the relationship with θ in the eight neighborhoods. region The point whose deviation is less than the tolerance value τ is then added to the region and θ is updated. region The update method is as follows:

[0024]

[0025] In the above formula, j traverses all points in the region. When none of the eight neighbors of any point in the region satisfy the condition θ... region Growth stops when the deviation is less than the tolerance value τ. Tolerance value

[0026] The image after coarse extraction is denoted as img4.

[0027] As a preferred embodiment of the present invention, the step of extracting the feature component map of the transmission line using a two-dimensional EMD algorithm includes:

[0028] Step S401: Let image img4 be f(x,y), such that r i (x,y)=f(x,y). Let j=1, h ij (x,y)=f(x,y).

[0029] Step S402, calculate h ij The maximum spectrum P of (x,y) ij and the minimum spectrum Q ij and draw h ij The upper envelope U of (x,y) max (x,y) and the lower envelope L min (x,y).

[0030] Step S403, calculate h ij The mean envelope M of (x,y) ij (x,y):

[0031] Step S404: Calculate the local information h of the source image. i(j+1) (x,y): h i(j+1) (x,y)=h ij (x,y)-M ij (x,y)

[0032] Step S405, check h i(j+1) Whether (x,y) satisfies the BIFM property is determined by the stopping condition SD. Based on experience, SD is taken as 0.24.

[0033] Step S406, if h i(j+1) If (x,y) does not meet the stopping condition, let j = j + 1, and return to step S402 to perform the operation until the condition is met.

[0034] Step S407, if h i(j+1) If (x,y) satisfies the requirements, then let ci (x,y)=h i(j+1) (x,y),r (i+1) =r i -h i(j+1) ,i=i+1. Then c i (x,y) is the i-th component obtained from the decomposition.

[0035] The component image with the most obvious transmission line characteristics and the simplest background information among all components is manually selected and denoted as img5.

[0036] As a preferred embodiment of the present invention, the step of extracting the edge features of the component map using the improved Canny edge detection algorithm includes:

[0037] Step S501: Calculate the image gradient using the 3*3 Sobel operator in the x-direction, y-direction, 45° direction, and 13° direction.

[0038] Step S502, as follows Figure 2 As shown, the gradient linear interpolation between two adjacent pixels spanning the gradient direction is calculated as follows:

[0039] tan(θ)=G y / G x

[0040] G I1 =(1-tan(θ))×I(i,j+1)+tan(θ)×I(i-1,j+1)

[0041] G I2 =(1-tan(θ))×I(i,j-1)+tan(θ)×I(i+1,j-1)

[0042] Step S503: If the gradient value of pixel I simultaneously satisfies G I ≥G I1 G I ≥G I2 If the condition is met, point I will be retained; otherwise, it will be suppressed.

[0043] Step S504: Use the Otsu method to select the image threshold: Let the target image pixel size be M×N, the gray value range be [0, L-1], and let the segmentation threshold be t. Then the pixels on the image can be divided into the following two categories:

[0044] C0={f1(x,y)∣0≤f(x,y)≤t}

[0045] C1={f2(x,y)∣L-1≥f(x,y)>t}

[0046] Step S505: Let N be the number of pixels with grayscale value i.i The total number of pixels in the target image is The ratio of each gray level to the total number of pixels is: The probabilities of categories C0 and C1 are respectively and The grayscale mean values ​​of categories C0 and C1 are respectively and

[0047] Step S506: Based on the above results, the equivalent expression for the inter-class variance of the image can be obtained as follows:

[0048] σ 2 =P0×P1×(μ0-μ1) 2

[0049] Step S507: After repeated iterations, the segmentation threshold at which the inter-class variance is maximized is the optimal threshold. At this point, the lower threshold T is determined. l =T h / 2, while the high threshold is:

[0050]

[0051] Step S508, if G I ≥T h Then point I is recorded as a strong edge point and determined as an image edge; if G I ≥T l If the condition is not met, then point I is marked as a weak edge point. If none of the conditions are met, then the point is suppressed.

[0052] Step S509: Using weak edge points as seed points, search for strong edge points in the eight neighborhoods. If there are strong edge points, retain them as edges; otherwise, suppress them.

[0053] The image after edge extraction is denoted as img6 after iterating through all pixels in the image.

[0054] As a preferred embodiment of the present invention, electric field lines in the edge features are extracted based on morphological Hough transform, characterized in that:

[0055] Step S601: Set a rhombus matrix template with a length of 3, and perform a morphological closing operation on the edge-extracted image to fill small holes in the line segments. The closing operation expression is:

[0056]

[0057] In the formula, Where A and B represent the target binary image and the selected structuring element, respectively; B′ represents the image of image B; (B) x This represents the distance B moves along the vector.

[0058] Step S602: Perform the opening operation using the following formula. During the opening operation, small-area objects are removed to achieve the effect of noise removal. The opening operation expression is:

[0059]

[0060] In the formula, Where A and B represent the target binary image and the selected structuring element, respectively; B′ represents the image of image B; (B) x This represents the distance B moves along the vector.

[0061] Step S603: Obtain all edge points in the above image as target points, perform Hough transform on each target point to map it to the parameter space, and quantize the ρ and θ parameters into M. ρ and N θ Divide into equal portions.

[0062] Step S604: Based on the discretized M ρ and N θ Create a two-dimensional accumulator A(ρ) with an initial value of 0. i ,θ i ).

[0063] Step S605: Use the following formula to calculate and statistically determine the x-axis of each point in the Cartesian coordinate system. i ,y i The position of ) on polar coordinates (ρ) i ,θ i For each additional sinusoidal intersecting curve generated, the accumulator is incremented by 1, and this process is repeated for all target points.

[0064] ρ=xcosθ+ysinθ

[0065] Step S606: Set the threshold T = 265. Accumulator A(ρ i ,θ i Let N be the number of collinear points in the image. If N > T, prove that the parameter (ρ) i ,θ i The matched line is the required straight line, thus completing the extraction of the straight line.

[0066] The beneficial effects achieved by this invention are as follows:

[0067] The proposed method for fast extraction of power transmission lines based on Hough transform involves preprocessing the inspection image to filter out some background information; using the LSD algorithm to retain straight line information; and then using two-dimensional EMD to filter out most of the complex background. Combined with the improved Canny operator, the edge of the power line can be completely extracted and the edge is smoothed. This makes the edge of the power line in the image highly recognizable, improves the working accuracy of Hough transform, greatly reduces the workload, and achieves fast extraction. Attached Figure Description

[0068] Figure 1 This is a flowchart of the present invention;

[0069] Figure 2 This is a schematic diagram of the gradient interpolation method in this invention. Detailed Implementation

[0070] The following embodiments are only used to illustrate the technical solutions of the present invention more clearly, and should not be used to limit the scope of protection of the present invention.

[0071] like Figure 1 As shown, this invention provides a method for fast extraction of transmission lines based on Hough transform, comprising the following steps:

[0072] Step S1: Use drones to inspect and collect images of power transmission lines;

[0073] Step S2: Preprocess the transmission line inspection images;

[0074] Step S3: Use the LSD algorithm to coarsely extract straight lines from the preprocessed transmission line inspection image to obtain transmission line features;

[0075] Step S4: The two-dimensional EMD algorithm is used to extract the component image with the most obvious features of the transmission line;

[0076] Step S5: The improved Canny edge detection algorithm extracts the edge features of the component map;

[0077] Step S6: Extract electric field lines from the edge features based on morphological Hough transform.

[0078] As a preferred embodiment of the present invention, the preprocessing of the transmission line inspection images includes:

[0079] Step S201, Grayscale Processing: The R, G, and B components of the RGB values ​​in the transmission line inspection image are converted to grayscale using Gamma correction. The specific calculation formula is as follows:

[0080]

[0081] The grayscale image is denoted as img1.

[0082] Step S202, Image Enhancement: Use histogram equalization to enhance the brightness and contrast of image img1. The enhanced image is denoted as img2.

[0083] Step S203, Filtering and Denoising: Use a linear filtering algorithm to denoise img2, and denote the processed image as img3.

[0084] As a preferred embodiment of the present invention, the method of using the LSD algorithm to coarsely extract straight lines from transmission line inspection images includes:

[0085] Step S301: Perform Gaussian downsampling on image img3, with a downsampling ratio S = 0.8. Calculate the magnitude and direction of the gradient using the finite difference of the first-order partial derivative.

[0086] Step S303: Perform gradient pseudo-sorting: 1024 buckets are evenly spaced between 0 and the maximum gradient magnitude of the image. Pixels are then classified into the 1024 buckets according to their corresponding gradient magnitude. LSD first uses the pixel with the maximum gradient as the seed point, and then selects a seed point from the second bin, and so on until all bins are exhausted.

[0087] Step S304: Set the gradient threshold ρ = 5.23. Points with gradient values ​​less than ρ are set to USED, and points with gradient values ​​greater than ρ are set to UNUSED. Extract all points in the UNUSED state.

[0088] Step S305: Select the points with large gradient magnitudes from the sorted list as seed points, and use the horizontal angle of these points as the initial angle θ of the region. region Then search for the relationship with θ in the eight neighborhoods. region The point whose deviation is less than the tolerance value τ is then added to the region and θ is updated. region The update method is as follows:

[0089]

[0090] In the above formula, j traverses all points in the region. When none of the eight neighbors of any point in the region satisfy the condition θ... region Growth stops when the deviation is less than the tolerance value τ. Tolerance value

[0091] The image after coarse extraction is denoted as img4.

[0092] As a preferred embodiment of the present invention, the feature component map of the transmission line is extracted using a two-dimensional EMD algorithm, including:

[0093] Step S401: Let image img4 be f(x,y), such that r i (x,y)=f(x,y). Let j=1, h ij (x,y)=f(x,y).

[0094] Step S402, calculate h ij The maximum spectrum P of (x,y) ij and the minimum spectrum Q ij and draw h ij The upper envelope U of (x,y) max (x,y) and the lower envelope L min (x,y).

[0095] Step S403, calculate h ij The mean envelope M of (x,y) ij (x,y):

[0096] Step S404: Calculate the local information h of the source image. i(j+1) (x,y): h i(j+1) (x,y)=h ij (x,y)-M ij (x,y)

[0097] Step S405, check h i(j+1) Whether (x,y) satisfies the BIFM property is determined by the stopping condition SD. Based on experience, SD is taken as 0.24.

[0098] Step S406, if h i(j+1) If (x,y) does not meet the stopping condition, let j = j + 1, and return to step S402 to perform the operation until the condition is met.

[0099] Step S407, if h i(j+1) If (x,y) satisfies the requirements, then let c i (x,y)=h i(j+1) (x,y),r (i+1) =r i -h i(j+1) ,i=i+1. Then c i (x,y) is the i-th component obtained from the decomposition.

[0100] The component image with the most obvious transmission line characteristics and the simplest background information among all components is manually selected and denoted as img5.

[0101] As a preferred embodiment of the present invention, the step of extracting the edge features of the component map using the improved Canny edge detection algorithm includes:

[0102] Step S501: Calculate the image gradient using the 3*3 Sobel operator in the x-direction, y-direction, 45° direction, and 135° direction.

[0103] Step S502, as follows Figure 2 As shown, the gradient linear interpolation between two adjacent pixels spanning the gradient direction is calculated as follows:

[0104] tan(θ)=G y / G x

[0105] G I1 =(1-tan(θ))×I(i,j+1)+tan(θ)×I(i-1,j+1)

[0106] G I2 =(1-tan(θ))×I(i,j-1)+tan(θ)×I(i+1,j-1)

[0107] Step S503: If the gradient value of pixel I simultaneously satisfies G I ≥G I1 G I ≥G I2 If the condition is met, point I will be retained; otherwise, it will be suppressed.

[0108] Step S504: Use the Otsu method to select the image threshold: Let the target image pixel size be M×N, the gray value range be [0, L-1], and let the segmentation threshold be t. Then the pixels on the image can be divided into the following two categories:

[0109] C0={f1(x,y)∣0≤f(x,y)≤t}

[0110] C1={f2(x,y)∣L-1≥f(x,y)>t}

[0111] Step S505: Let N be the number of pixels with grayscale value i. i The total number of pixels in the target image is The ratio of each gray level to the total number of pixels is: The probabilities of categories C0 and C1 are respectively and The grayscale mean values ​​of categories C0 and C1 are respectively and

[0112] Step S506: Based on the above results, the equivalent expression for the inter-class variance of the image can be obtained as follows:

[0113] σ 2 =P0×P1×(μ0-μ1) 2

[0114] Step S507: After repeated iterations, the segmentation threshold at which the inter-class variance is maximized is the optimal threshold. At this point, the lower threshold T is determined. l =T h / 2, while the high threshold is:

[0115]

[0116] Step S508, if G I ≥T h Then point I is recorded as a strong edge point and determined as an image edge; if G I ≥T l If the condition is not met, then point I is marked as a weak edge point. If none of the conditions are met, then the point is suppressed.

[0117] Step S509: Using weak edge points as seed points, search for strong edge points in the eight neighborhoods. If there are strong edge points, retain them as edges; otherwise, suppress them.

[0118] The image after edge extraction is denoted as img6 after iterating through all pixels in the image.

[0119] As a preferred embodiment of the present invention, the electric field lines in the edge features are extracted based on the morphological Hough transform, including:

[0120] Step S601: Set a rhombus matrix template with a length of 3, and perform a morphological closing operation on the edge-extracted image to fill small holes in the line segments. The closing operation expression is:

[0121]

[0122] In the formula, Where A and B represent the target binary image and the selected structuring element, respectively; B′ represents the image of image B; (B) x This represents the distance B moves along the vector.

[0123] Step S602: Perform the opening operation using the following formula. During the opening operation, small-area objects are removed to achieve the effect of noise removal. The opening operation expression is:

[0124]

[0125] In the formula, Where A and B represent the target binary image and the selected structuring element, respectively; B′ represents the image of image B; (B) x This represents the distance B moves along the vector.

[0126] Step S603: Obtain all edge points in the above image as target points, perform Hough transform on each target point to map it to the parameter space, and quantize the ρ and θ parameters into M.ρ and N θ Divide into equal portions.

[0127] Step S604: Based on the discretized M ρ and N θ Create a two-dimensional accumulator A(ρ) with an initial value of 0. i ,θ i ).

[0128] Step S605: Use the following formula to calculate and statistically determine the x-axis of each point in the Cartesian coordinate system. i ,y i The position of ) on polar coordinates (ρ) i ,θ i For each additional sinusoidal intersecting curve generated, the accumulator is incremented by 1, and this process is repeated for all target points.

[0129] ρ=xcosθ+ysinθ

[0130] Step S606: Set the threshold T = 265. Accumulator A(ρ i ,θ i Let N be the number of collinear points in the image. If N > T, prove that the parameter (ρ) i ,θ i The matched line is the required straight line, thus completing the extraction of the power line.

[0131] The transmission line inspection images are preprocessed to improve data quality and simplify image complexity.

[0132] The LSD algorithm is used to coarsely extract straight lines from the preprocessed transmission line inspection images, enhancing the straight line features in the images and further filtering out noise points.

[0133] The component map of the transmission line features is extracted using a two-dimensional EMD algorithm to separate the transmission line features from the complex background, thus facilitating edge detection.

[0134] An improved Canny edge detection algorithm is used to extract the edge features of the component image to remove most of the background in the image, so that only the edges of the electric field lines exist in the image, thereby improving the recognition of the electric field lines.

[0135] The morphology-based Hough transform algorithm significantly reduces the running time while ensuring extraction quality, thus providing a guarantee for UAVs to inspect power transmission lines and has certain engineering significance.

[0136] LSD, Line Segment Detector, is a line segment detection algorithm.

[0137] EMD, Empirical Mode Decomposition.

[0138] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for fast extraction of transmission lines based on Hough transform, characterized in that, include: Step S1: Use drones to inspect and collect images of power transmission lines; Step S2: Preprocess the transmission line inspection images; Step S3: Use the LSD algorithm to coarsely extract straight lines from the preprocessed transmission line inspection image to obtain transmission line features; Step S4: The two-dimensional EMD algorithm is used to extract the component maps of the transmission line features; Step S5: Improve the Canny edge detection algorithm to extract the edge features of the component image; Step S6: Extract electric field lines from the edge features based on morphological Hough transform; The improved Canny edge detection algorithm extracts the edge features of the component map, including: Step S501: Calculate the image gradient using 3*3 Sobel operators in the x, y, 45°, and 135° directions; Step S502: Calculate the gradient linear interpolation between two adjacent pixels spanning the gradient direction, as shown in the following formula: tan(θ)=G y / G x G I1 =(1-tan(θ))×I(i,j+1)+tan(θ)×I(i-1,j+1) G I2 =(1-tan(θ))×I(i,j-1)+tan(θ)×I(i+1,j-1) Step S503: If the gradient value of pixel I simultaneously satisfies G I ≥G I1 G I ≥G I2 If the condition is met, then point I will be retained; otherwise, it will be suppressed. Step S504: Use the Otsu method to select the image threshold: Let the target image pixel size be M×N, the gray value range be [0, L-1], and let the segmentation threshold be t. Then the pixels in the image are divided into the following two categories: C0={f1(x,y)∣0≤f(x,y)≤t} C1={f2(x,y)∣L-1≥f(x,y)>t} Step S505: Let N be the number of pixels with grayscale value i. i The total number of pixels in the target image is The ratio of each gray level to the total number of pixels is: The probabilities of categories C0 and C1 are respectively and The grayscale mean values ​​of categories C0 and C1 are respectively and Step S506: Based on the above results, the equivalent expression for the inter-class variance of the image is as follows: s 2 =P0×P1×(μ0-μ1) 2 Step S507: After repeated iterations, the segmentation threshold at which the inter-class variance is maximized is the optimal threshold. At this point, the lower threshold T is determined. l =T h / 2, while the high threshold is: Step S508, if G I ≥T h Then point I is recorded as a strong edge point and determined as an image edge; if G I ≥T l If the condition is met, then point I is marked as a weak edge point; if none of these conditions are met, then the point is suppressed. Step S509: Using weak edge points as seed points, search for strong edge points in the eight neighborhoods. If there are strong edge points, retain them as edges; otherwise, suppress them. The image after edge extraction is denoted as img6 after iterating through all pixels in the image. The morphological Hough transform extracts electric field lines from the edge features, including: Step S601: Set a rhombus matrix template with a length of 3, and perform a morphological closing operation on the edge-extracted image to fill small holes in the line segments. The closing operation expression is: In the formula, Where A and B represent the target binary image and the selected structuring element, respectively; B′ represents the image of image B; (B) x This represents the distance B moves along the vector. Step S602: Perform the opening operation using the following formula. During the opening operation, small-area objects are removed to achieve the effect of noise removal. The opening operation expression is: In the formula, Where A and B represent the target binary image and the selected structuring element, respectively; B′ represents the image of image B; (B) x This represents the distance B moves along the vector. Step S603: Obtain all edge points in the above image as target points, perform Hough transform on each target point to map it to the parameter space, and quantize the ρ and θ parameters into M. ρ and N θ Equal portions; Step S604: Based on the discretized M ρ and N θ Create a two-dimensional accumulator A(ρ) with an initial value of 0. i ,θ i ); Step S605: Use the following formula to calculate and statistically determine the x-axis of each point in the Cartesian coordinate system. i ,y i The position of ) on polar coordinates (ρ) i ,θ i For each additional sinusoidal intersecting curve generated, the accumulator is incremented by 1, and this process is repeated for all target points. ρ=xcosθ+ysinθ Step S606: Set the threshold T = 265, accumulator A(ρ i ,θ i Let N be the number of collinear points in the image. If N > T, prove that the parameter (ρ) i ,θ i The matched line is the required straight line, thus completing the extraction of the straight line.

2. The method according to claim 1, characterized in that, The preprocessing of the transmission line inspection images includes: Step S201, Grayscale Processing: The R, G, and B components of the RGB values ​​in the transmission line inspection image are converted to grayscale using Gamma correction. The specific calculation formula is as follows: The image after grayscale conversion is denoted as img1; Step S202, Image Enhancement: Use histogram equalization to enhance the brightness and contrast of image img1. The enhanced image is denoted as img2. Step S203, Filtering and Denoising: Use the joint bilateral filtering algorithm to denoise img2, and denote the processed image as img3.

3. The method according to claim 2, characterized in that, The method of using the LSD algorithm to coarsely extract straight lines from the preprocessed transmission line inspection image to obtain transmission line features includes: Step S301: Perform Gaussian downsampling on image img3 with a downsampling ratio S = 0.8, and use the finite difference of the first-order partial derivative to calculate the magnitude and direction of the gradient; Step S303: Perform gradient pseudo-sorting: Set 1024 buckets evenly and at equal intervals between 0 and the maximum gradient magnitude of the image. Pixels are classified into 1024 buckets according to their corresponding gradient magnitude. LSD first uses the pixel with the maximum gradient as the seed point, and then selects the seed point from the second bin. This process is repeated until all bins are exhausted. Step S304: Set the gradient threshold ρ = 5.23, set points with gradient values ​​less than ρ as USED, and set points with gradient values ​​greater than ρ as UNUSED, and extract all points in the UNUSED state; Step S305: Select the points with large gradient magnitudes from the sorted list as seed points, and use the horizontal angle of these points as the initial angle θ of the region. region Then search for the relationship with θ in the eight neighborhoods. region The point whose deviation is less than the tolerance value τ is then added to the region and θ is updated. region The update method is as follows: In the above formula, j traverses all points in the region; When none of the eight neighbors of any point in the region satisfy the condition θ region When the deviation is less than the tolerance value τ, growth stops. The image after coarse extraction is denoted as img4.

4. The method according to claim 3, characterized in that, The two-dimensional EMD algorithm extracts component maps of the transmission line features, including: Step S401: Let image img4 be f(x,y), such that r i (x,y)=f(x,y), let j=1, h ij (x,y)=f(x,y); Step S402, calculate h ij The maximum spectrum P of (x,y) ij and the minimum spectrum Q ij and draw h ij The upper envelope U of (x,y) max (x,y) and the lower envelope L min (x,y); Step S403, calculate h ij The mean envelope M of (x,y) ij (x,y): Step S404: Calculate the local information h of the source image. i(j+1) (x,y): h i(j+1) (x,y)=h ij (x,y)-M ij (x,y); Step S405, check h i(j+1) Whether (x,y) satisfies the BIMF property is determined by the stopping condition SD. Based on experience, SD is taken as 0.

24. Step S406, if h i(j+1) If (x,y) does not meet the stopping condition, let j = j + 1, and return to step S402 to perform the operation until the condition is met; Step S407, if h i(j+1) If (x,y) satisfies the requirements, then let c i (x,y)=h i(j+1) (x,y),r (i+1) =r i -h i(j+1) , i=i+1, then c i (x,y) is the i-th component obtained from the decomposition; The component image with the most obvious transmission line characteristics and the simplest background information among all components is manually selected and denoted as img5.