A Power Line Detection Method and System Based on Maximum Tree and Graph Signal Processing
By employing a method based on maximum tree and graph signal processing, color filtering and the Maxtree model are used to separate power lines from noise. The least squares method is then used to fit the linear equation, which solves the problems of false detection and missed detection in power line detection and achieves more efficient power line identification.
Patent Information
- Application Number
- CN202311079726.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-25
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-08-25
AI Technical Summary
Existing power line detection methods suffer from false positives and false negatives, especially in unsupervised learning methods, where it is difficult to effectively separate power lines from background noise.
A method based on maximum tree and graph signal processing is adopted. Color images are converted into grayscale images by constructing a color filter. The power lines and noise are segmented into different nodes using the Maxtree model. The linear equations of the power lines are fitted by combining graph signal processing and least squares method to filter out background noise and improve detection accuracy.
It effectively reduces false positives and false negatives, improves the accuracy and efficiency of power line detection, and reduces memory consumption and computational complexity.
Smart Images

Figure CN117011682B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power line detection technology in UAV remote sensing, and in particular to a power line detection method based on maximum tree and graph signal processing. Background Technology
[0002] Power line detection methods are mainly divided into supervised learning methods and unsupervised learning methods. For supervised methods, neural networks are widely used, such as Convolutional Neural Networks (CNNs) and Fully Convolutional Networks (FCNs). The detection problem can be reformulated as a model training process, which requires a large number of training samples to feed the network to identify the correct power lines. For unsupervised methods, features are extracted through a carefully designed procedure and do not require a large number of training samples. Radon transform or Hough transform are often used to detect power lines based on the linearity of the conductors. The CannyLine algorithm and the LSD algorithm are also widely used in power line detection.
[0003] Although there are many methods for detecting power lines, the problems of false detection and missed detection have always existed. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a power line detection method based on maximum tree and graph signal processing. This method utilizes the difference between power lines and background image signals to segment background noise, thereby improving power line recognition and detection.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] The power line detection method based on maximum tree and graph signal processing provided by this invention includes the following steps:
[0007] Obtain the raw image data;
[0008] A color filter is constructed based on the numerical patterns of the RGB channels in the original image data. The color filter is used to retain grayscale pixels.
[0009] The original image data is input into a color filter to obtain a grayscale image;
[0010] Construct a Maxtree model, which is used to transform grayscale images into a tree structure constructed from grayscale levels, and segment power lines and noise in different nodes;
[0011] Set the node attribute signals of the Maxtree model, and filter out background noise based on the Maxtree model to obtain power line image data;
[0012] The linear equation of the power line is obtained by processing the power line image data using graph signal processing.
[0013] Furthermore, the color filter is constructed as follows: P = max(r,g,b) - mean(r+g+b-max(r,g,b));
[0014] Where P represents the color filter parameters, r represents the red channel; g represents the green channel; b represents the blue channel; max() represents the maximum value; and mean() represents the average value.
[0015] Furthermore, the Maxtree model is constructed in the following manner:
[0016] The Maxtree represents all connected regions with the same gray level and certain connectivity in space, as well as the inclusion relationship between subtrees; each node represents a connected region whose pixel value falls within a certain interval, which is determined by gray level and spatial connectivity. The inclusion relationship between subtrees is reflected in the fact that a connected region obtained with a given pixel value threshold is contained in another connected region obtained with a lower threshold. The leaves represent the brightest pixels in the image, and the root node represents the entire image.
[0017] Furthermore, a grayscale threshold is set for the grayscale value of the node attribute signal, and nodes with a grayscale value greater than the grayscale threshold are discarded.
[0018] Furthermore, a linearity threshold is set for the linearity of the node attribute signal, and nodes with linearity values less than the linearity threshold are discarded.
[0019] Furthermore, a length threshold is set for the node attribute signal length, and nodes shorter than the length threshold are discarded.
[0020] Furthermore, the linear equation of the electric field line obtained through graph signal processing is performed in the following manner:
[0021] Each line is divided into different connecting blocks. In each new connecting block, the least squares method is used for fitting, the line equation is calculated, and the line is plotted based on the equation.
[0022] Furthermore, it also includes the following steps:
[0023] The resulting equation of the straight line is displayed on the original image.
[0024] The power line detection system based on maximum tree and graph signal processing provided by the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-described method.
[0025] The beneficial effects of this invention are as follows:
[0026] This invention provides a power line detection method based on Maxtree and graph signal processing. This method utilizes the unique structure of Maxtree combined with graph signal processing methods to achieve power line detection. In preprocessing, a color filter is designed using the color difference between power lines and background noise to remove brightly colored background noise. Furthermore, converting the color image to grayscale reduces the amount of data required to build the Maxtree, improving algorithm efficiency and reducing memory consumption. By using Maxtree to segment power lines and background noise into different nodes, the difference between them is used to completely filter out background noise, thus largely eliminating false detections. Finally, the least squares method is used to fit the power lines, thereby reducing missed detections.
[0027] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0028] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the following figures are provided for illustration:
[0029] Figure 1 This is a flowchart of power line detection based on Maxtree and graph signal processing.
[0030] Figure 2 This is a schematic diagram of the Maxtree structure.
[0031] Figure 3 To simulate the winding phase and the corresponding stripe lines.
[0032] Figure 4 A comparison of power line detection methods. Detailed Implementation
[0033] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0034] like Figure 1 As shown, the power line detection method based on maximum tree and graph signal processing provided in this embodiment converts the input power line image into a maximum tree, filters out non-power line parts through graph attribute signals, and retains the power line parts, thereby achieving power line detection. The detection strategy of this method mainly includes a preprocessing process, constructing a Maxtree model, and calculating node attributes. The main steps are as follows:
[0035] The preprocessing procedure is carried out according to the following steps:
[0036] Obtain the raw image data;
[0037] Based on the numerical patterns of the RGB channels in the original image data, a color filter is constructed. The color filter is used to retain grayscale pixels. The filter parameter P = max(r,g,b) - mean(r+g+b-max(r,g,b)); where max() represents the maximum value, mean() represents the average value; r represents the red channel; g represents the green channel; and b represents the blue channel.
[0038] The original image data is input into a color filter to obtain a grayscale image;
[0039] The preprocessing procedure in this embodiment aims to reduce computation and memory consumption; therefore, it is necessary to convert the color image to a grayscale image, meaning the RGB channels share the same pixel values. To utilize color information as much as possible, a color filter is designed before converting to grayscale. Since power lines are dark gray, their pixels have the same RGB components. However, for other objects, their pixels have different RGB values. Therefore, based on the numerical patterns of the RGB channels, a color filter is designed (using the difference between the average of the minimum and second-minimum RGB values and the maximum value as the filtering parameter) to retain only grayscale pixels and remove most non-power line objects.
[0040] Construct a Maxtree model, which is used to transform a grayscale image into a tree structure constructed by grayscale level classification, and separate power lines and noise in different nodes;
[0041] The Maxtree represents all connected regions that have the same gray level and 8-connectivity in space, as well as the inclusion relationships between subtrees. Each node represents a connected region whose pixels fall within a certain interval, determined by gray level (less than 200) and spatial connectivity (8-connectivity). The inclusion relationship between subtrees is reflected in the fact that a connected region obtained with a given pixel value threshold is contained in another connected region obtained with a lower threshold. For example, a node obtained with a gray level of 0 is contained in a node obtained with a gray level of 1, and so on from 0 to 255. The leaves represent the brightest pixels in the image, and the root node represents the entire image.
[0042] like Figure 2 As shown, Figure 2 The images shown are: (a) a 5x6 image, (b) a maximum tree (8-connected), and (c) a maximum tree (4-connected). Figure 2This shows a Maxtree model created using a simple 5×6 image. The leaves of the Maxtree model represent the maximum values in the image. In the case of 4 connectivity, the original image ( Figure 2 (a) has 6 local maxima, and the corresponding Maxtree model has 6 leaves. Figure 2 (b)). With a connectivity of 8, the original image ( Figure 2 (a) has three local maxima, corresponding to the three leaves on the Maxtree model. Figure 2 (c)). The root node and its subtrees constitute the entire image, with pixels in the root node preserved at the lowest threshold. Within the tree, each node and its subtree form a connected region (grayscale values 1-255), which is further contained within lower-level connected components corresponding to lower thresholds (0-254). Finally, in Figure 2 In (b) and (c), the gray level is the gray value (0-255) of each connected region.
[0043] Considering the connectivity of power lines, in a tree structure, the power line detection task is represented as finding the tree node corresponding to each power line instance. The attributes of the filled tree are treated as graphical attribute signals and processed to improve the robustness of detection. Furthermore, with the connectivity of the components, as many power line pixels as possible can be detected during the filtering process.
[0044] After establishing the maximum tree, three node attribute signals were set for detecting power lines:
[0045] 1) Grayscale value: Set a preset threshold for the grayscale value of the node attribute signal, and discard nodes that are greater than the preset threshold. Since power lines have a low grayscale value, by setting a grayscale value of 200 and discarding nodes that are greater than this threshold, the brighter non-power line parts, such as white lane lines on a road, can be filtered out.
[0046] 2) Linearity: Set a linearity threshold for the node attribute signal, discarding nodes with linearity values less than the threshold. Based on the geometric characteristics of the electric field lines, calculate the linear correlation coefficient of pixels in the node using the least squares method as the linear attribute signal. Since electric field lines are all straight lines, the linear correlation coefficient of the node corresponding to the cross-section of the electric field line is closer to 1. Set this attribute to 0.85 to filter out non-straight parts.
[0047] 3) Length: Set the length threshold for the node attribute signal, discarding nodes with a length less than the threshold. Power lines are relatively long and thin, while non-power line elements such as leaves are blocky. Therefore, the larger value of the pixel coordinates (x or y) in the node (max(max(x), max(y))) is used as the length attribute. Setting this attribute to 60 can filter out short non-power line portions.
[0048] The linear equation of the power line is obtained by processing the power line image data through image signal processing: For the power line loss after filtering, the connection blocks are re-established, and each line is divided into 40*10 connection blocks (connected lines are determined to be within 40 pixels in height or 10 pixels in width). The least squares method is used to fit the line in each new connection block. The linear equation of the pixel is calculated based on the (x,y) coordinates of all pixels in each connection block. This linear equation represents the line fitted in each block. Finally, the linear equations of all connection blocks are combined to form the linear equation of the entire power line. The complete line is then drawn based on the linear equation and displayed on the original image.
[0049] The test results are as follows Figure 3 As shown, Figure 3 (a) Original image; (b) Image after color filtering; (c) Image after image signal processing; (d) Least squares fitting result; From Figure 3 (a) and Figure 3 As can be seen in (b), after color filtering, the green leaves are basically removed, while the power transmission lines remain unaffected. From... Figure 3 (b) and Figure 3 As can be seen in (c), the background was completely removed, thus reducing false detections. However, many pixels of the power lines on the left were also removed. From Figure 3 (c) and Figure 3 As can be seen in (d), the missing power lines were repaired and fully displayed in the original image, thus reducing the number of missed detections.
[0050] The method proposed in this embodiment has significant advantages over other methods. Figure 4 This is a diagram comparing the effectiveness of different power line detection methods. Figure 4 It can be seen that, Figure 4 The diagram shows (a) the original image, (b) the CannyLine algorithm, (c) the LSD algorithm, and (d) the processing result obtained by the method provided in this embodiment. The CannyLine algorithm detects less noise in the power line image than the LSD algorithm, but the CannyLine algorithm detects less completeness and continuity of power lines than the LSD algorithm. Furthermore, both CannyLine and LSD detection results have a large number of false alarms, mistaking lanes and vehicle outlines for power lines. Meanwhile, the method provided in this embodiment can detect power line drive as much as possible, reducing false alarms and missed alarms.
[0051] The method provided in this embodiment utilizes the unique structure of the Maxtree model combined with graph signal processing methods to achieve power line detection. In preprocessing, a color filter is designed based on the color difference between power lines and background noise to remove brightly colored background noise. Furthermore, converting the color image to grayscale reduces the amount of data required to build the Maxtree model, improving algorithm efficiency and reducing memory consumption. By using the Maxtree model to segment power lines and background noise into different nodes, the difference between them is used to completely filter out background noise, thus largely eliminating false detections. Finally, the least squares method is used to fit the power lines, thereby reducing missed detections.
[0052] Compared with traditional power line detection methods, the power line detection method based on the maximum tree model and graph signal processing proposed in this embodiment can effectively eliminate missed detections and false detections.
[0053] The power line detection system based on maximum tree and graph signal processing provided in this embodiment includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-described method.
[0054] The above-described embodiments are merely preferred embodiments provided to fully illustrate the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention. The scope of protection of the present invention is defined by the claims.
Claims
1. A power line detection method based on maximum tree and graph signal processing, characterized in that: The method comprises the following steps: obtaining original image data; constructing a color filter according to the numerical law of the RGB channel of the original image data, the color filter being used to retain gray pixels; inputting the original image data into the color filter to obtain a gray image; constructing a Maxtree model, the Maxtree being used to convert the gray image into a tree structure of gray level hierarchical construction, and to separate power lines and noise in different nodes; setting the node attribute signal of the Maxtree model, and filtering out background noise according to the Maxtree model to obtain power line image data; obtaining a straight line equation of the power line by graph signal processing the power line image data; the color filter is constructed in the following manner: P = max(r, g, b) - mean(r + g + b - max(r, g, b)); wherein, P represents a color filter filter parameter, r represents a red channel; g represents a green channel; b represents a blue channel; max() represents a maximum value, and mean() represents an average value; the Maxtree model is constructed in the following manner: the Maxtree represents all connected regions with the same gray level and certain connectivity in space and the inclusion relationship between sub-trees; each node represents a connected region, the pixel value of which falls within a certain interval, which is determined by the gray level and spatial connectivity, the inclusion relationship between sub-trees is embodied in that the connected region obtained by a given pixel value threshold is contained in another connected region obtained by a lower threshold, the tree leaves represent the brightest pixels in the image, and the root node represents the entire image.
2. The method of power line detection based on maximum tree and graph signal processing as claimed in claim 1, wherein: setting a gray threshold of the gray value of the node attribute signal, and discarding nodes greater than the gray threshold.
3. The method of claim 1, wherein the maximum tree and graph signal processing based power line detection method is characterized by: setting a linearity threshold of the linearity of the node attribute signal, and discarding nodes less than the linearity threshold.
4. The method of power line detection based on maximum tree and graph signal processing as recited in claim 1, wherein: setting a length threshold of the length of the node attribute signal, and discarding nodes less than the length threshold.
5. The method of power line detection based on maximum tree and graph signal processing as recited in claim 1, wherein: the straight line equation of the power line obtained by graph signal processing is performed in the following manner: dividing each line into different connection blocks, fitting in each new connection block by using the least square method, calculating the straight line equation, and drawing a straight line according to the straight line equation.
6. The method of power line detection based on maximum tree and graph signal processing as recited in claim 1, wherein: the method further comprises the following steps: displaying the obtained straight line equation on the original image.
7. A power line detection system based on maximum tree and graph signal processing, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that: the processor implements the method of any one of claims 1 to 6 when executing the program.