Power transmission line image segmentation method and device, equipment and storage medium

Through the method of feature extraction and deep learning network construction of transmission line images, the accuracy of transmission line image segmentation is improved, and the problems of low accuracy and poor adaptability in the prior art are solved.

CN119648729APending Publication Date: 2025-03-18YUNNAN POWER GRID CO LTD ELECTRIC POWER RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411717341.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

When the prior art faces complex transmission line environments and diverse image features, the image segmentation accuracy is not high and the adaptability is poor, resulting in large errors in the analysis results.

Method used

A method of segmentation of transmission line images is proposed, including obtaining feature images of target transmission line, extracting features through preset algorithms, building an image segmentation model based on deep learning network, and segmenting the feature image input model to obtain the location of typical components.

Benefits of technology

By extracting feature images before segmenting the graphics, the accuracy of image segmentation is significantly improved, effectively solving the accuracy and adaptability problems of traditional methods in complex environments and diverse image features.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648729A_ABST
    Figure CN119648729A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a power transmission line image segmentation method and device, equipment and a storage medium. The method comprises the following steps: acquiring a feature image of a target power transmission line; performing feature extraction on the feature image according to a preset algorithm to obtain a target feature image of a typical component in the target power transmission line; constructing an image segmentation model based on a deep learning network; and inputting the target feature image into an image segmentation model for image segmentation to obtain the position of the typical part in the target feature image. According to the image segmentation method, before the graph is segmented, feature extraction is carried out on the feature image, so that the image features input into the image segmentation model are more obvious, image segmentation is facilitated, and the accuracy of image segmentation is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image segmentation, and in particular to a method and device, equipment and storage medium for segmenting a power transmission line image. Background Art

[0002] With the continuous development of the power system, the safe operation of transmission lines is of vital importance. Drone inspection has been widely used in transmission line inspection due to its high efficiency and flexibility. The transmission line images obtained by drone inspection are mainly used to perform fault diagnosis and analysis based on the images to determine the status of typical components in the transmission line, thereby ensuring the safe operation of the transmission line. Generally, image segmentation is performed on the image to determine the status of typical components.

[0003] At present, traditional image segmentation methods have problems such as low accuracy and poor adaptability when facing complex transmission line environments and diverse image features. They are difficult to meet the needs of practical applications, resulting in large errors in analysis results. Summary of the invention

[0004] Based on this, it is necessary to propose a segmentation method and device, equipment and storage medium for power transmission line images to address the above problems, so as to improve the segmentation accuracy of power transmission line images.

[0005] To achieve the above-mentioned object, the present application provides a first aspect of a method for segmenting a power transmission line image, the method comprising:

[0006] Acquire a characteristic image of a target transmission line;

[0007] Extracting features from the feature image according to a preset algorithm to obtain a target feature image of a typical component in the target power transmission line;

[0008] Build an image segmentation model based on a deep learning network;

[0009] The target feature image is input into the image segmentation model to perform image segmentation, and the positions of typical components in the target feature image are obtained.

[0010] Furthermore, the feature extraction of the feature image according to a preset algorithm to obtain a target feature image of a typical component in the target power transmission line specifically includes:

[0011] Using the HSV color model, the feature image is subjected to an exclusion operation based on the color characteristics of the atypical component region to obtain a first feature image;

[0012] Using a preset texture extraction algorithm, the first feature image is subjected to an exclusion operation based on texture features of atypical component regions to obtain a second feature image;

[0013] A preset edge detection algorithm is used to perform an exclusion operation on the second feature image based on the shape characteristics of atypical component areas to obtain a target feature image.

[0014] Furthermore, the use of a preset texture extraction algorithm to exclude atypical component regions based on texture features of the first feature image to obtain a second feature image specifically includes:

[0015] Extracting actual texture feature parameters in the first feature image according to a preset texture extraction algorithm;

[0016] The actual texture feature parameters are screened according to the actual texture feature parameters and preset target texture feature parameters of typical components in the target power transmission line to obtain a second typical component region in the first feature image;

[0017] The content in the first characteristic image that is not in the second typical component area is excluded to obtain a second characteristic image.

[0018] Further, the actual texture feature parameters are screened according to the actual texture feature parameters and the preset target texture feature parameters of the typical components in the target transmission line to obtain the second typical component area in the first feature image, specifically including:

[0019] Obtaining a texture parameter range of the target texture feature parameter;

[0020] The actual texture feature parameters corresponding to each pixel point in the first feature image are compared with the target texture parameter range, and the area where the pixel points corresponding to the actual texture feature parameters falling within the target texture parameter range are located is taken as the second typical component area.

[0021] Furthermore, the extracting the actual object shape feature parameters in the second feature image by using a preset edge detection algorithm specifically includes:

[0022] Extracting object edge information in the second feature image using a Canny edge detection algorithm;

[0023] A Hough transform is performed based on the object edge information in the second feature image to obtain actual object shape feature parameters in the second feature image.

[0024] Furthermore, the step of inputting the target feature image into the image segmentation model to perform image segmentation to obtain the positions of typical components in the target feature image specifically includes:

[0025] Inputting the target feature image into the image segmentation model to perform image segmentation, and obtaining an image segmentation result output by the image segmentation model;

[0026] Performing morphological operations on the image segmentation results to obtain a target image segmentation result after noise reduction;

[0027] Connected domain analysis is performed on the target image segmentation result to obtain the positions of typical components in the target feature image.

[0028] Furthermore, the image segmentation result output by the image segmentation model is a typical component category corresponding to each pixel in the target feature image;

[0029] Then the connected domain analysis is performed on the target image segmentation result to obtain the position of the typical component in the target feature image, specifically including:

[0030] Performing connected domain analysis according to typical component categories corresponding to each pixel in the target feature image to obtain a plurality of connected regions in the target feature image;

[0031] Acquire regional features of the connected area and prior features of typical components in the target transmission line;

[0032] Feature analysis is performed based on the regional features and the prior features, and connected regions belonging to the same typical component in all the connected regions are merged to obtain the position of the typical component in the target feature image.

[0033] To achieve the above-mentioned purpose, the second aspect of the present application provides a transmission line image segmentation device, the device comprising: an image acquisition module, a feature extraction module and an image segmentation module;

[0034] The image acquisition module is used to obtain a characteristic image of the target transmission line;

[0035] The feature extraction module is used to extract features from the feature image according to a preset algorithm to obtain a target feature image of a typical component in the target power transmission line;

[0036] The image segmentation module is used to build an image segmentation model based on a deep learning network;

[0037] The target feature image is input into the image segmentation model to perform image segmentation, and the positions of typical components in the target feature image are obtained.

[0038] To achieve the above-mentioned purpose, the third aspect of the present application provides a computer-readable storage medium storing a computer program, characterized in that when the computer program is executed by a processor, the processor executes the steps of the method described in the first aspect.

[0039] To achieve the above-mentioned purpose, the fourth aspect of the present application provides a computer device, including a memory and a processor, characterized in that the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method described in the first aspect.

[0040] The embodiments of the present invention have the following beneficial effects:

[0041] The embodiment of the present invention proposes a method for segmenting a transmission line image, the method comprising: obtaining a feature image of a target transmission line; extracting features from the feature image according to a preset algorithm to obtain a target feature image of a typical component in the target transmission line; building an image segmentation model based on a deep learning network; inputting the target feature image into the image segmentation model for image segmentation to obtain the position of the typical component in the target feature image. By further extracting features from the feature image before segmenting the graphic, the image features in the input image segmentation model are made more obvious, which is beneficial to image segmentation and effectively improves the accuracy of image segmentation. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] in:

[0044] Figure 1 is a schematic flow chart of a method for segmenting a power transmission line image in an embodiment of the present invention;

[0045] Figure 2 is a structural block diagram of a power transmission line image segmentation device in an embodiment of the present invention;

[0046] Figure 3 1 is a diagram showing the internal structure of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] In order to achieve accurate segmentation of typical components in a transmission line image, an embodiment of the present invention proposes a segmentation method for a transmission line image to improve the accuracy of segmentation of typical components in a transmission line image. For details, please refer to Figure 1 , Figure 1 A method for segmenting a power transmission line image in an embodiment of the present invention includes:

[0049] Step 110: Acquire a characteristic image of the target transmission line.

[0050] In an embodiment of the present invention, any section of a transmission line is selected as a target transmission line for monitoring. A detection route is deployed in the area where the target transmission line is located, and a drone is used to inspect the target transmission line according to the detection route. During the inspection, the target transmission line is sampled according to preset sampling parameters to obtain an original image containing the target transmission line.

[0051] In order to reduce the impact of noise on image segmentation, the original image needs to be denoised to obtain the denoised target image. Optionally, the median filter algorithm is used to denoise the original image. The median filter algorithm can not only remove the salt and pepper noise and Gaussian noise in the original image, but also maintain the edge and detail information of the original image.

[0052] In order to make the features of typical components more prominent in the target image and facilitate the subsequent segmentation of the typical component area in the target image, the histogram equalization method can be used to enhance the contrast of the target image and obtain a characteristic image of the target transmission line with obvious features.

[0053] Step 120: extract features from the feature image according to a preset algorithm to obtain a target feature image of a typical component in the target power transmission line.

[0054] Specifically, an algorithm for extracting features is pre-set, and features are extracted from a feature image by using the algorithm to obtain features of typical components in a target power transmission line in the feature image, and non-typical component areas in the feature image are excluded based on the features of the typical components to obtain a target feature image containing only typical component areas.

[0055] In the embodiment of the present invention, a suitable algorithm may be selected for feature extraction based on the characteristics of typical components in the image, so that typical components and atypical components can be accurately distinguished when extracting features, thereby making the target feature image obtained more accurate.

[0056] Step 130: construct an image segmentation model based on a deep learning network.

[0057] In an embodiment of the present invention, the deep learning network adopts a convolutional neural network (CNN) architecture, and a typical component segmentation model of the target power transmission line graph is constructed based on the convolutional neural network. Specifically, the network structure can be selected from classic models for image segmentation tasks, such as U-Net or FCN, wherein U-Net introduces a skip connection structure, which can better retain contextual information and details, making U-Net perform well in complex image segmentation tasks; FCN has a relatively simple network structure, and can capture local features in the image through convolution operations.

[0058] For the target feature image segmentation task of the target transmission line, the basic network architecture can be appropriately adjusted and optimized according to factors such as the image characteristics of the target feature image and the size of typical components. For example, if the typical components in the target transmission line are relatively small in the target feature image, it is necessary to increase the depth of the network or use a smaller convolution kernel to improve the image segmentation model's ability to capture details in the target feature image; if the background of the target feature image is relatively complex, it is necessary to strengthen the network's learning of contextual information to better distinguish between typical components and atypical component areas.

[0059] In one embodiment of the present invention, the convolutional neural network includes a plurality of convolutional layers, pooling layers and fully connected layers.

[0060] In the convolution layer, select an appropriate convolution kernel size. For example, for the input target feature image, a 3x3 convolution kernel can be used to extract the features of typical components such as conductors, insulators, and pole towers.

[0061] Furthermore, the number and arrangement of convolutional layers are determined. n convolutional layers, such as 3-4 convolutional layers, are set at the beginning of the contraction path. Each convolutional layer is followed by an activation function (such as ReLU) and a pooling layer to achieve feature extraction and downsampling. In the expansion path, a certain number of convolutional layers are also set accordingly to restore resolution and refine features.

[0062] The pooling layer is used to reduce the resolution of the target feature image, reduce the amount of calculation, and extract the main information of the typical component features, thereby enhancing the robustness of the network and its adaptability to image deformation. The maximum pooling method can be selected, and the pooling window size can be 2x2 or 3x3, with the step size being the same as or slightly smaller than the window size. In the contraction path, the pooling layer is usually followed by the convolution layer, and a pooling layer is set every certain number of convolution layers to gradually reduce the size of the target feature image.

[0063] After the deep learning network architecture is built, training data is collected to train it and generate an image segmentation model for segmenting typical components in the image.

[0064] Specifically, a large number of annotated transmission line images are collected as training samples. First, the transmission line images are preprocessed to achieve noise reduction of the transmission line images. The preprocessing includes image enhancement, normalization and other operations. The transmission line images are manually annotated with the locations of typical components in the transmission lines and the categories of the typical components. After the annotation is completed, the transmission line images and the annotation results are used as training samples. The model is trained using the training samples to generate an image segmentation model for segmenting typical components in the image.

[0065] The loss function in the image segmentation model can be selected from the cross entropy loss function and the Dice loss function. Specifically, the cross entropy between the category probability predicted by the model and the true category label is calculated based on the cross entropy loss function, and the overlap between the typical component area predicted by the model and the true segmentation area is calculated based on the Dice loss function, and the weighted value between the cross entropy and the overlap is calculated in a weighted manner.

[0066] In one embodiment of the present invention, the Adam optimization algorithm can be selected to update the parameters in the deep learning network to minimize the loss function. When using the Adam optimization algorithm, the parameters in the Adam optimization algorithm need to be set, such as the learning rate, the exponential decay rate of the first-order moment estimate, the exponential decay rate of the second-order moment estimate, etc. In general, the learning rate can be initialized to about 0.001, usually set to 0.9 or 0.999, and the learning rate is adjusted according to the training situation of the model and the performance of the validation set.

[0067] After the model training is completed, the output results of the model are evaluated. In one embodiment of the present invention, the accuracy of the segmentation results of the image segmentation model for different typical components can be evaluated by calculating the pixel accuracy (PA), mean pixel accuracy (MPA), and intersection over union (IoU). According to the evaluation results of the image segmentation model and the analysis of the training process, the model is optimized and adjusted.

[0068] Step 140: Input the target feature image into the image segmentation model to perform image segmentation, and obtain the positions of typical components in the target feature image.

[0069] Specifically, the target feature image is input into a trained image segmentation model, and the image segmentation model segments the target feature image to determine the area where the typical component is located in the target feature image, so as to determine the specific position of the typical component in reality based on the area of ​​the typical component in the image.

[0070] In an embodiment of the present invention, by extracting features from a feature image before segmenting a graphic, component features with obvious contrast between typical components and atypical components are obtained, so that typical component segmentation can be performed based on a target feature image with obvious typical component features input into an image segmentation model, thereby effectively improving the accuracy of image segmentation.

[0071] In one embodiment of the present invention, step 120, extracting features from the feature image according to a preset algorithm to obtain a target feature image of a typical component in the target power transmission line, specifically includes:

[0072] Step 210, using the HSV color model to exclude the atypical component areas based on the color features of the feature image, to obtain a first feature image.

[0073] Specifically, the color features of typical components in the target transmission line are extracted through the HSV color model. For example, the conductor has a certain range of tones in the HSV color space; insulators usually have a unique color distribution; and poles and towers also have relatively stable color features. Therefore, the color features can be analyzed to preliminarily screen out areas in the feature image that may belong to typical components.

[0074] In one embodiment of the present invention, Step 210, using the HSV color model to perform an exclusion operation on the feature image based on the color characteristics of the atypical component area to obtain a first feature image, specifically includes:

[0075] Step 211, use the HSV color model to extract the actual color feature parameters in the feature image.

[0076] Specifically, the feature image is converted from the RGB color space to the HSV color space. The HSV color space is more consistent with the way humans perceive colors and has an advantage in distinguishing the colors of typical components in the target transmission line. The feature image converted to the HSV color space is analyzed to determine the hue value of each pixel in the image, which is the actual color feature parameter in the feature image.

[0077] Step 212, screening the actual color feature parameters according to the actual color feature parameters and the preset target color feature parameters of typical components in the target transmission line to obtain a first typical component area in the feature image.

[0078] Specifically, different typical components have different hue value ranges in the HSV color space. Therefore, the typical component region in the feature image can be determined according to the hue value range of the typical component in the HSV color space.

[0079] For example, for a conductor, its hue value is generally within the range of [H1, H2]. It can be understood that H1 and H2 can be empirical values ​​obtained based on the hue statistical analysis of a large number of conductor image samples. Then, the actual color feature parameter (i.e., hue value) of each pixel in the feature image is compared with the hue value range of the conductor. If the hue value of the pixel is within the hue value range of the conductor, then the pixel is a candidate area of ​​the conductor. Similarly, for typical components such as insulators and poles, the actual color feature parameters in the target feature image are preliminarily screened according to the hue value range of the typical components in the HSV color space to determine the corresponding component candidate area. The candidate areas of all typical components in the feature image constitute the first typical component area.

[0080] Step 213: exclude the content of the feature image that is not the first typical component area to obtain the first feature image.

[0081] Specifically, images of other regions except the first typical component region in the characteristic image are deleted, and only the image of the first typical component region is retained to obtain the first characteristic image.

[0082] In the above manner, some areas that are obviously not typical parts can be quickly excluded based on color features, and the image range of suspected typical parts in the feature image can be narrowed, providing a more targeted target area for subsequent image segmentation.

[0083] Step 220, using a preset texture extraction algorithm to exclude atypical component regions based on texture features from the first feature image to obtain a second feature image.

[0084] Specifically, the texture features of typical components in the target transmission line are extracted through texture extraction algorithms. For example, comparison, correlation, energy, and entropy are performed. The textures of typical components in the transmission line have certain regularities. For example, the surface texture of the insulator is relatively uniform; the texture of the conductor is relatively smooth; and the texture of the tower has certain directionality. Therefore, secondary screening can be performed based on the texture features in the first feature image to obtain the area in the first feature image that may belong to the typical component.

[0085] In one embodiment of the present invention, Step 220, using a preset texture extraction algorithm to exclude the atypical component area based on the texture feature of the first feature image to obtain the second feature image, specifically includes:

[0086] Step 221, extracting actual texture feature parameters in the first feature image according to a preset texture extraction algorithm.

[0087] In the embodiment of the present invention, the gray level co-occurrence matrix of the first feature image is calculated, and texture features are extracted based on the gray level co-occurrence matrix.

[0088] Specifically, the first feature image is first converted into a grayscale image. Then a certain direction and distance are selected to calculate the grayscale co-occurrence matrix. For example, the direction can be selected as 0°, 45°, 90°, 135° and other angles; the distance can be selected as 1 pixel, 2 pixels and other sizes. By combining any direction and distance, several combinations of different directions and distances can be generated. The values ​​of direction α and distance d are preset, and the frequency of the grayscale combination composed of two pixels appearing in the first feature image based on direction α and distance d is counted. For example, assuming that the grayscale level of the first feature image is 0-255, on the basis of the direction being 0° and the distance being 1, there are several pairs of pixels in the first feature image. If in one pair of pixels, the grayscale value of one pixel is 100 and the grayscale value of the other pixel is 105, then the grayscale combination of the pair of pixels is (100, 105), and the frequency of the corresponding position in the corresponding grayscale co-occurrence matrix needs to be added by 1. By performing grayscale combination frequency statistics on all qualified pixel pairs in the first feature image, the grayscale co-occurrence matrix of the first feature image at different directions and distances can be obtained, so as to calculate the actual texture feature parameters in the first feature image based on the grayscale co-occurrence matrix.

[0089] In an embodiment of the present invention, actual texture feature parameters may include contrast, correlation, energy, entropy, and the like.

[0090] Contrast reflects the clarity and depth of the texture in the image, and is a measure of the difference in the element values ​​in the gray level co-occurrence matrix. Different typical components have different appearances and structures, so the clarity and depth of different typical components in the image are also different. Therefore, the candidate area of ​​the typical component in the first feature image can be determined by contrast. In one embodiment of the present invention, the contrast can be calculated by the following formula:

[0091]

[0092] Where P(i,j) is the value of the (i,j)th element in the gray-level co-occurrence matrix, and N is the number of gray levels.

[0093] Correlation is used to measure the similarity of gray levels in the row or column direction in the image. Different typical components have different similarities in the row or column direction. Therefore, the candidate area of ​​the typical component in the first feature image can be determined by correlation. In one embodiment of the present invention, the contrast value correlation can be calculated by the following formula:

[0094]

[0095] Among them, μ i and μ j are the means of the gray-level co-occurrence matrix in the i and j directions, σi and σ j are the standard deviations of the gray-level co-occurrence matrix in the i and j directions, respectively.

[0096] Energy reflects the uniformity and regularity of image texture. Typical components in power transmission lines have different texture uniformity and regularity due to factors such as texture and shape. Therefore, the candidate area of ​​the typical component in the first feature image is determined based on energy. In one embodiment of the present invention, the energy can be calculated by the following formula:

[0097]

[0098] Entropy represents the randomness and complexity of image texture. For typical components in a power transmission line, the degree of randomness and complexity is different. Therefore, the candidate region of the typical component in the first feature image can be determined by the entropy value. In one embodiment of the present invention, the entropy value can be calculated by the following formula:

[0099]

[0100] By calculating these texture feature parameters, the present invention can more comprehensively describe the texture features of typical components in the target power transmission line in the first feature image, and provide richer information for subsequent classification and segmentation.

[0101] Step 222, screening the actual texture feature parameters according to the actual texture feature parameters and the preset target texture feature parameters of the typical components in the target transmission line to obtain a second typical component area in the first feature image.

[0102] Specifically, the typical component area in the first feature image is determined according to the degree of expression of different typical components in different texture feature parameters. In one embodiment of the present invention, Step 222, according to the actual texture feature parameters and the preset target texture feature parameters of the typical components in the target transmission line, the actual texture feature parameters are screened to obtain the second typical component area in the first feature image, specifically including:

[0103] Step 2221. Obtain the texture parameter range of the target texture feature parameters.

[0104] Step 2222, compare the actual texture feature parameters corresponding to each pixel point in the first feature image with the target texture parameter range, and take the area where the pixel points corresponding to the actual texture feature parameters falling within the target texture parameter range are located as the second typical component area.

[0105] Specifically, the performance of typical components in the transmission line varies in terms of contrast. For example, the surface texture of the insulator is relatively uniform, and its contrast may be within a smaller range; the texture of the conductor is relatively smooth, and the contrast is relatively low; the texture of the tower may have a certain directionality and complexity, and its contrast may be relatively high. Therefore, the optimal contrast range of different typical components can be determined based on experience, and the contrast calculated based on the gray level co-occurrence matrix can be compared with the optimal contrast range to determine the contrast that meets the typical component area conditions, and then determine the candidate area of ​​the typical component in the first feature image.

[0106] In terms of correlation, the performance of typical components in the transmission line varies. For example, the texture of the conductor may have a higher correlation in a certain direction because its grayscale changes are relatively regular; the correlation of the insulator may also have certain characteristics, depending on the texture structure of its surface; the tower may have a more complex correlation due to its complex structure and texture. Similarly, the optimal correlation range of different typical components can be determined empirically, and the correlation calculated based on the grayscale co-occurrence matrix can be compared with the optimal correlation range to determine the correlation that meets the typical component area conditions, thereby determining the candidate area of ​​the typical component in the first feature image.

[0107] In terms of energy, the performance of typical components in transmission lines varies. Generally speaking, the surface texture of insulators is relatively uniform and their energy is higher; the texture of conductors is relatively smooth and their energy is relatively stable; if the texture of towers has more details and irregularities, their energy may be relatively low, but this is not absolute. It is necessary to analyze the specific situation and image to obtain the optimal energy range, compare the energy calculated based on the gray level co-occurrence matrix with the optimal energy range, determine the energy that meets the typical component area conditions, and then determine the candidate area of ​​the typical component in the first feature image.

[0108] In terms of entropy values, there are also differences in the entropy values ​​of typical components in the transmission line. For example, the texture of the conductor is relatively simple, and the entropy value may be low; the texture of the insulator may be relatively regular, but if there are some stains or damage on its surface, the entropy value may increase; the texture of the tower is relatively complex, and the entropy value may be relatively high. The optimal entropy value range of different typical components can be determined based on experience, and the entropy value calculated based on the gray level co-occurrence matrix is ​​compared with the optimal entropy value range to determine the entropy value that meets the typical component area conditions, and then determine the candidate area of ​​the typical component in the first feature image.

[0109] In the embodiment of the present invention, the candidate regions obtained based on a variety of texture feature parameters may be comprehensively analyzed to determine the second typical component region in the first feature image.

[0110] Step 223: Exclude the content of the first characteristic image that is not in the second typical component area to obtain a second characteristic image.

[0111] Specifically, the images of other regions except the second typical component region in the first characteristic image are deleted, and only the image of the second typical component region is retained to obtain the second characteristic image.

[0112] In the above manner, some areas that are obviously not typical components can be quickly excluded based on texture features, and the image range of suspected typical components in the first feature image can be further narrowed, providing a more targeted target area for subsequent image segmentation.

[0113] Step 230, using a preset edge detection algorithm to exclude regions with atypical component shapes from the second feature image, to obtain a target feature image.

[0114] Specifically, edge detection algorithms are used to extract edge information of objects in the second feature image, and then shape features in the second feature image are detected based on the edge information. Since the shapes of typical components in transmission lines are different, such as conductors are usually straight segments, towers have specific geometric shapes, and insulators also have certain contour characteristics; therefore, the area where the typical components in the second feature image are located can be determined based on shape features.

[0115] In one embodiment of the present invention, Step 230, using a preset edge detection algorithm to perform an exclusion operation on the second feature image based on the shape feature of the atypical component area to obtain a target feature image, specifically includes:

[0116] Step 231, using a preset edge detection algorithm to extract actual object shape feature parameters in the second feature image.

[0117] Specifically, typical components of the transmission line will present a specific shape in the image, so the area of ​​the typical component in the second feature image can be determined based on the shape. Optionally, the Canny edge detection algorithm can be used to detect shape feature parameters of actual objects in the second feature image.

[0118] In one embodiment of the present invention, Step 231, using a preset edge detection algorithm to extract the actual object shape feature parameters in the second feature image, specifically includes:

[0119] Step 2311, use the Canny edge detection algorithm to extract the object edge information in the second feature image.

[0120] Specifically, the Canny edge detection algorithm is used to extract the edge information of the actual object in the second feature image. The Canny edge detection algorithm first performs Gaussian filtering on the second feature image to smooth the second feature image and remove noise. Then the gradient amplitude and direction of the second feature image are calculated to obtain the edge data in the second feature image, and the edge is refined by non-maximum suppression. Finally, the double threshold method is used to detect and connect the edges to obtain the final object edge information.

[0121] Step 2312: Perform Hough transform based on the object edge information in the second feature image to obtain the actual object shape feature parameters in the second feature image.

[0122] Specifically, the shapes of typical parts are diverse, including straight lines, circles, polygons, etc. Therefore, based on the object edge information, the actual object shape feature parameters such as straight lines and circles in the object edge information can be detected by using methods such as Hough transform, so as to further screen based on the actual object shape feature parameters in the second feature data, so as to obtain the area in the second feature image that may belong to the typical parts.

[0123] For example, the recognition of the straight line in the second feature data can be based on the Hough transform by converting the straight line in the image space into a point in the parameter space, and then detecting it by voting. In the parameter space, the straight line can be represented by the polar coordinate equation ρ=xcosθ+ysinθ, where ρ is the distance from the origin to the straight line, and θ is the angle between the normal of the straight line and the x-axis. Each edge point in the second feature image corresponds to a sine curve in the parameter space. By voting on the curves in the parameter space and finding the peak point, the parameters of the straight line in the second feature image can be determined, thereby detecting the position and direction of the straight line.

[0124] In addition to detecting straight lines, it can also detect circles and geometric features. For example, by grouping and fitting edge points, polygons that conform to typical component shapes can be determined; by analyzing edge information, edge curvature, circularity and other features can be obtained to assist in identification, so as to determine circles in images.

[0125] Step 232, screening the actual object shape feature parameters according to the actual object shape feature parameters and the preset target object shape feature parameters of typical components in the target transmission line to obtain a third typical component area in the second feature image.

[0126] In the transmission line image, the conductor is usually presented as a straight line segment, and its edge will show a more obvious straight line feature after edge detection. The pole tower has a specific geometric shape, and its edge will form some specific contours, such as a polygon composed of multiple straight line segments. The edge of the insulator is relatively smooth, but there may be some changes in the connection with other components or where there are defects. Therefore, the shape characteristics of different typical components can be used as preset target object status characteristic parameters, and the actual object shape characteristic parameters detected based on Step 2312 are compared with the target object status characteristic parameters to determine the actual object shape characteristic parameters that meet the target object status characteristic parameter conditions, thereby obtaining candidate areas of different typical components, and determining the third typical component area in the second characteristic image based on the candidate areas of all typical components.

[0127] Step 233, exclude the content of the second feature image that is not the third typical component area to obtain the target feature image.

[0128] Specifically, the images of other regions except the third typical component region in the second characteristic image are deleted, and only the image of the third typical component region is retained to obtain the target characteristic image.

[0129] In the above manner, some areas that are obviously not typical components can be quickly excluded based on shape features, and the image range of suspected typical components in the second feature image can be further narrowed, providing a more targeted target area for subsequent image segmentation.

[0130] The embodiment of the present invention screens typical component areas through color features, texture features and edge features in the feature image, excludes atypical component areas as much as possible, reduces the interference of atypical components in the feature image on the segmentation results during subsequent image segmentation, and effectively improves the accuracy of the image segmentation results.

[0131] In one embodiment of the present invention, step 140, inputting the target feature image into the image segmentation model to perform image segmentation to obtain the position of the typical component in the target feature image, specifically includes:

[0132] Step 410, input the target feature image into the image segmentation model for image segmentation, and obtain the image segmentation result output by the image segmentation model.

[0133] Specifically, the target feature image is input into the trained image segmentation model, and the image segmentation model marks each pixel in the target feature image, and outputs the target feature image containing the marking result, that is, the image segmentation result. The marking result marks the typical component category corresponding to each pixel in the target feature image, for example, a certain pixel belongs to any one of the conductors, insulators, poles or backgrounds.

[0134] In one embodiment of the present invention, a simple visual evaluation of the image segmentation results can be performed. Pixels of different categories can be marked with different colors so that the approximate segmentation situation can be observed intuitively. For example, pixels belonging to the conductor are marked red, pixels belonging to the insulator are marked blue, pixels belonging to the tower are marked green, pixels belonging to the background are marked black, etc. This is to facilitate observation of whether there are obvious unreasonable aspects of the segmentation results, such as incorrect classification of large areas, unclear boundaries between components, etc. If obvious problems are found, a preliminary analysis can be made of which link has an error, such as problems with the image segmentation model or problems in other links such as image preprocessing, and timely adjustments and corrections can be made to provide a reference for subsequent post-processing and further optimization.

[0135] Step 420, perform morphological operations on the image segmentation results to obtain the target image segmentation results after denoising.

[0136] Specifically, the image segmentation result output by the image segmentation model is processed, such as using morphological operations to remove noise and small holes in the segmentation result. In an embodiment of the present invention, the image segmentation result is subjected to morphological operations such as dilation and erosion to make the segmented area smoother and more complete.

[0137] For example, the image segmentation result can be expanded using a structural element. The structural element is usually a small matrix, such as a 3x3 or 5x5 matrix, and its element values ​​can be set according to specific needs, such as a matrix of all 1s. The structural element is placed on the image segmentation result and moved. When the combination of the structural element and a pixel in the image and its neighborhood pixels meets certain conditions, the category of the pixel is marked as the same typical component category as the domain pixel. The expansion operation can fill some small holes and gaps in the image segmentation result. For example, in the segmentation result of the wire, if there are some small discontinuities in the wire area due to noise or local inaccuracies of the image segmentation model, the expansion operation can connect these discontinuities to make the wire area more continuous and complete. At the same time, the expansion operation can also smooth the boundaries of the components to a certain extent, making them look more natural.

[0138] In addition, the structural element can be used to perform an erosion operation on the image segmentation result. The erosion operation is the opposite of the dilation operation. The structural element is placed on the image segmentation result and moved. When the structural element completely contains a pixel in the image and the combination of its neighboring pixels, the category of the pixel is marked as the typical component category of other pixels in the structural element. The erosion operation can remove some small noise spots and protrusions in the image segmentation result. In the image segmentation result, there may be some small areas that are mistakenly marked as typical components due to image noise or mis-segmentation. These small areas can be removed through the erosion operation to make the segmentation result more accurate. For example, if there are some small isolated pixels in the background area that are mistakenly classified as components such as insulators or pole towers, the erosion operation can remove these erroneous pixels and purify the segmentation result.

[0139] In the embodiment of the present invention, the expansion and erosion operations can be used alternately multiple times according to actual conditions to achieve better results. For example, a expansion operation is first performed to fill the main holes and the areas with similar connections, and then an erosion operation is performed to remove some unnecessary small protrusions, and then it is determined whether further expansion or erosion operations are needed based on the results, so that the segmented area can maintain integrity while removing noise and abnormal parts as much as possible, and obtain the final target image segmentation result.

[0140] Step 430, perform connected domain analysis on the target image segmentation result to obtain the location of typical components in the target feature image.

[0141] Specifically, a connected region analysis is performed on the target image segmentation result, and the parts belonging to the same typical component but divided into multiple connected regions are merged to obtain a complete typical component region, and then the specific position of the typical component in the final target transmission line is obtained.

[0142] In one embodiment of the present invention, Step 430, performing connected domain analysis on the target image segmentation result to obtain the location of typical components in the target feature image, specifically includes:

[0143] Step 431, perform connected domain analysis based on the typical component categories corresponding to each pixel in the target feature image to obtain several connected regions in the target feature image.

[0144] Specifically, adjacent pixels in the target feature image that have the same typical component category are connected to obtain a number of connected regions.

[0145] Step 432, obtain regional characteristics of the connected area and prior characteristics of typical components in the target transmission line.

[0146] In the embodiment of the present invention, the regional features may be reference values ​​of the area, perimeter, centroid, direction, position, etc. of each connected region. The prior features may be conventional values ​​of the area, perimeter, centroid, direction, position, etc. of a typical component.

[0147] Step 433: Perform feature analysis based on regional features and prior features, merge all connected regions belonging to the same typical component, and obtain the position of the typical component in the target feature image.

[0148] In the process of image segmentation, there may be some cases where the same typical component is segmented into multiple connected regions due to the inaccuracy of image segmentation, for example, the same wire is segmented into multiple segments and multiple connected regions. Therefore, based on the regional features of the connected regions and the prior knowledge of typical components, it is determined which connected regions should belong to the same typical component.

[0149] For example, for a conductor, adjacent connected regions that meet certain length and direction constraints can be merged based on the length, direction and other features of the connected regions and their positional relationship in the image to obtain a complete conductor region. For typical components such as insulators and pole towers, connected regions can also be merged based on their shape, size and position features.

[0150] Through connected region analysis, the present invention can merge parts belonging to the same typical component but divided into multiple connected regions to obtain typical component regions of different categories in the final target transmission line, so as to determine the specific position of the typical component in reality based on the position of each typical component region in the image, providing a more reliable basis for subsequent transmission line detection, analysis and maintenance.

[0151] In an embodiment of the present invention, the present invention further proposes a transmission line image segmentation device, which can be referred to as Figure 2 , Figure 2 2 is a structural block diagram of a transmission line image segmentation device in an embodiment of the present invention. The device includes: an image acquisition module 201, a feature extraction module 202 and an image segmentation module 203.

[0152] The image acquisition module 201 is used to acquire a characteristic image of a target transmission line.

[0153] The feature extraction module 202 is used to extract features from the feature image according to a preset algorithm to obtain a target feature image of a typical component in the target power transmission line.

[0154] The image segmentation module 203 is used to build an image segmentation model based on a deep learning network.

[0155] The target feature image is input into the image segmentation model for image segmentation to obtain the positions of typical components in the target feature image.

[0156] The transmission line image segmentation device proposed in the present invention extracts features from the feature image before segmenting the image to obtain component features with obvious contrast between typical components and atypical components, so as to perform typical component segmentation based on a target feature image with obvious typical component features input into an image segmentation model, thereby effectively improving the accuracy of image segmentation.

[0157] Figure 3 FIG. 1 shows an internal structure diagram of a computer device in one embodiment of the present invention. The computer device may be a terminal or a system. Figure 3 As shown, the computer device includes a processor, a memory and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor may implement each step in the above method embodiment. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor may implement each step in the above method embodiment. Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0158] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes each step in the above method embodiment.

[0159] In one embodiment, a computer-readable storage medium is proposed, which stores a computer program. When the computer program is executed by a processor, the processor executes each step in the above method embodiment. A person of ordinary skill in the art can understand that all or part of the processes in the above embodiment method can be completed by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium, and the program can include the processes of the embodiments of the above methods when executed. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0160] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0161] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for segmenting a power transmission line image, characterized in that: The method comprises: Acquire a characteristic image of a target transmission line; Extracting features from the feature image according to a preset algorithm to obtain a target feature image of a typical component in the target power transmission line; Build an image segmentation model based on a deep learning network; The target feature image is input into the image segmentation model to perform image segmentation, and the positions of typical components in the target feature image are obtained.

2. The method according to claim 1, characterized in that The step of extracting features from the feature image according to a preset algorithm to obtain a target feature image of a typical component in the target power transmission line specifically includes: Using the HSV color model, the feature image is subjected to an exclusion operation based on the color characteristics of the atypical component region to obtain a first feature image; Using a preset texture extraction algorithm, the first feature image is subjected to an exclusion operation based on texture features of atypical component regions to obtain a second feature image; A preset edge detection algorithm is used to perform an exclusion operation on the second feature image based on the shape characteristics of atypical component areas to obtain a target feature image.

3. The method according to claim 2, characterized in that The step of using a preset texture extraction algorithm to perform an exclusion operation on the first feature image based on texture features of atypical component regions to obtain a second feature image specifically includes: Extracting actual texture feature parameters in the first feature image according to a preset texture extraction algorithm; The actual texture feature parameters are screened according to the actual texture feature parameters and preset target texture feature parameters of typical components in the target power transmission line to obtain a second typical component region in the first feature image; The content in the first characteristic image that is not in the second typical component area is excluded to obtain a second characteristic image.

4. The method according to claim 3, characterized in that The step of screening the actual texture feature parameters according to the actual texture feature parameters and the preset target texture feature parameters of the typical components in the target transmission line to obtain the second typical component area in the first feature image specifically includes: Obtaining a texture parameter range of the target texture feature parameter; The actual texture feature parameters corresponding to each pixel point in the first feature image are compared with the target texture parameter range, and the area where the pixel points corresponding to the actual texture feature parameters falling within the target texture parameter range are located is taken as the second typical component area.

5. The method according to claim 2, characterized in that The step of extracting the actual object shape feature parameters in the second feature image by using a preset edge detection algorithm specifically includes: Extracting object edge information in the second feature image using a Canny edge detection algorithm; A Hough transform is performed based on the object edge information in the second feature image to obtain actual object shape feature parameters in the second feature image.

6. The method according to claim 1, characterized in that The step of inputting the target feature image into the image segmentation model to perform image segmentation to obtain the position of a typical component in the target feature image specifically includes: Inputting the target feature image into the image segmentation model to perform image segmentation, and obtaining an image segmentation result output by the image segmentation model; Performing morphological operations on the image segmentation results to obtain a target image segmentation result after noise reduction; Connected domain analysis is performed on the target image segmentation result to obtain the positions of typical components in the target feature image.

7. The method according to claim 6, characterized in that The image segmentation result output by the image segmentation model is the typical component category corresponding to each pixel in the target feature image; Then the connected domain analysis is performed on the target image segmentation result to obtain the position of the typical component in the target feature image, specifically including: Performing connected domain analysis according to typical component categories corresponding to each pixel in the target feature image to obtain a plurality of connected regions in the target feature image; Acquire regional features of the connected area and prior features of typical components in the target transmission line; Feature analysis is performed based on the regional features and the prior features, and connected regions belonging to the same typical component in all the connected regions are merged to obtain the position of the typical component in the target feature image.

8. A device for segmenting a power transmission line image, characterized in that: The device comprises: an image acquisition module, a feature extraction module and an image segmentation module; The image acquisition module is used to obtain a characteristic image of the target transmission line; The feature extraction module is used to extract features from the feature image according to a preset algorithm to obtain a target feature image of a typical component in the target power transmission line; The image segmentation module is used to build an image segmentation model based on a deep learning network; The target feature image is input into the image segmentation model to perform image segmentation, and the positions of typical components in the target feature image are obtained.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.

10. A computer device comprising a memory and a processor, characterized in that: The memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 7.