Insulator chain icing degree diagnosis method, electronic equipment and medium
Through the insulator string ice degree diagnosis method based on the contour area, image processing and machine learning technology are used to automatically diagnose the insulator string ice coating, solving the problems of inefficient and insufficient reliability of traditional manual line patrol methods, and achieving more efficient and accurate power system monitoring.
Patent Information
- Application Number
- CN202411775544.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-05-02
AI Technical Summary
The traditional manual line patrol method is inefficient and difficult to implement in severe weather conditions. The diagnosis results of the degree of insulator ice covering is low, making it impossible to meet the power system's more efficient and accurate monitoring needs.
The insulator string ice-covered degree diagnosis method based on the contour area is used to enhance the insulator string images by collecting and defogging, and the recognition frame is positioned using the pre-trained ice-covered detection model, and the contours of ice-free and ice-covered insulator strings are obtained through the graph theory segmentation model to calculate the longitudinal and transverse ice-covered degree.
It realizes automatic and accurate diagnosis of the degree of ice covering insulators, improves the safety and stability of power system operation under extreme climate conditions, and reduces the dependence on manual intervention and large amounts of labeled data.
Smart Images

Figure CN119919705A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of electric power vision, and in particular to a method for diagnosing the ice coating degree of an insulator string, an electronic device and a medium. Background Art
[0002] Insulators are key components used to support and fix conductors in power systems and to achieve electrical insulation between conductors and towers. Icing on insulator strings can seriously affect the safe operation of transmission lines and may lead to serious accidents such as short circuits and power outages. In power systems, the icing problem of insulator strings is a key technical issue that needs to be solved urgently, especially in extreme weather conditions, where icing is more serious.
[0003] Traditional manual line inspection methods are not only inefficient, but also difficult to implement in severe weather conditions. Image analysis of insulator icing usually relies on manual review of images and the issuance of alarm signals. This method is not only inefficient, but also easily affected by human factors, thus reducing the reliability of the diagnostic results. With the development of power systems, the performance requirements for insulator strings are increasing, especially in icing monitoring. More efficient and accurate technical means are urgently needed to achieve automatic diagnosis of the degree of icing on insulator strings. Summary of the invention
[0004] In order to solve at least one of the technical problems existing in the prior art to a certain extent, the object of the present invention is to provide a method, electronic equipment and medium for diagnosing the ice coating degree of an insulator string based on contour area.
[0005] The first technical solution adopted by the present invention is:
[0006] A method for diagnosing ice coverage of an insulator string comprises the following steps:
[0007] Collecting an insulator string image, and performing defogging and enhancement processing on the insulator string image;
[0008] Input the insulator string image into the pre-trained ice detection model, locate the identification frame of the insulator string, and determine whether it is covered with ice;
[0009] Distinguish the template image from the image to be tested, and match the template image and the image to be tested taken from the same viewing angle;
[0010] According to the template image and the identification frame parameters of the ice-free insulator string, the segmentation mask and contour of the ice-free insulator string are obtained by rectangular segmentation;
[0011] According to the segmentation mask of the ice-free insulator string of the image to be tested and the template image with the same viewing angle, the segmentation mask and the contour of the ice-covered insulator string are obtained by template segmentation;
[0012] The minimum circumscribed rectangles of the contours of the ice-free insulator string and the ice-covered insulator string are fitted respectively, the longitudinal distance and the lateral distance of the ice-free insulator string and the ice-covered insulator string are calculated, and the longitudinal and lateral icing degrees of the ice-covered insulator string are obtained by solving.
[0013] Furthermore, the insulator string image is a visible light three-channel color image;
[0014] The collecting of the insulator string image and performing defogging and enhancement processing on the insulator string image includes:
[0015] Determine shooting conditions: adjust the camera's shooting angle, distance, and exposure parameters to ensure that the insulator strings are clearly visible in the image;
[0016] The contrast adaptive equalization algorithm is used to dehaze and enhance the image.
[0017] Furthermore, the step of inputting the insulator string image into a pre-trained ice detection model, locating an identification frame of the insulator string, and determining whether ice is applied includes:
[0018] Training the target recognition model: traverse the insulator string image in the annotation software, select the insulator string in the image with a vertical rectangular frame, and if ice and snow accumulate on the surface of the insulator string, mark the category of the rectangular frame as "ice-covered"; if the surface of the insulator string is clean and there is no ice and snow, mark the category of the rectangular frame as "ice-free"; train the target recognition model with the insulator string image, rectangular frame and category to obtain an ice detection model;
[0019] Identify the insulator string image: load the ice detection model and input the newly collected insulator string image to be tested; use the ice detection model to extract the features of the input image, detect the insulator string in the input image and determine whether it is iced, filter and remove low-confidence recognition frames through the non-maximum suppression algorithm, merge the overlapping recognition frames, and obtain the vertex coordinates of the insulator string recognition frame and the classification label of "ice-covered" or "ice-free".
[0020] Furthermore, the distinguishing the template image from the image to be tested and matching the template image and the image to be tested taken from the same viewing angle include:
[0021] Distinguish the template image from the image to be tested: Set the insulator string image with the classification label "ice-free" as the template image, and extract the ice-free insulator string recognition box B from the template image. n The coordinates of the upper left corner (x a1 ,y a1 ) and the coordinates of the lower right corner (x a2 ,y a2 ); Set the insulator string image with the classification label of "ice-covered" as the image to be tested, and extract the ice-covered insulator string identification box B in the image to be tested iThe coordinates of the upper left corner (x b1 ,y b1 ) and the coordinates of the lower right corner (x b2 ,y b2 );
[0022] Match the same-viewing angle image: Calculate the ice-free insulator string identification box B in the template image n Identification frame B for iced insulator string i The intersection-and-union ratio (IOU) of the recognition box is not less than the threshold IOU of the recognition box. th , match the template image with the image to be tested, and mark that they are taken from the same viewing angle.
[0023] Furthermore, the step of obtaining the segmentation mask and the outline of the ice-free insulator string by rectangular segmentation according to the template image and the ice-free insulator string identification frame parameters includes:
[0024] Map the template image to a template weighted graph: load the Grabcut graph segmentation model; input the template image and the vertex coordinates of the ice-free insulator string recognition box in the template image; n The template image composed of pixels is converted into a matrix z n ={z1,···,z n ···,z Nn}, and mapped to N n A template weighted graph of nodes; in the template weighted graph, each node is connected to its adjacent nodes, the source vertex s representing the foreground, and the sink vertex t representing the background as a node edge nl, a source vertex edge sl, and a sink vertex edge tl, respectively, and the edge weight V represents the similarity between the nodes;
[0025] Template weighted graph modeling: using vector α n ={α1,···,α Nn} Initialize the template weighted graph and set the ice-free insulator string identification box B n The inner nodes are foreground and assigned α=1, and the nodes outside the recognition box are background and assigned α=0. The template weighted graph is modeled using a Gaussian mixture model to obtain the Gibbs energy function E(α,k,θ,z)=U(α,k,θ,z)+V(α,z), where k={k1,···,k n ···,k Nn} is the node vector, k n is the Gaussian component of node n, U(α, k, θ, z) is the data item representing the node difference, θ is the iteration parameter, and V(α, z) is the smoothing item representing the weight of each edge;
[0026] Solve the Gibbs energy function: set the number of iterations I, use the maximum flow and minimum cut algorithm to solve the minimum value of the Gibbs energy function, and update the weight of the connecting edge each iteration until the Gibbs energy function is reduced to convergence; traverse N n nodes, and compare the edge weights V of each node with the source vertex s and the sink vertex t s-l 、V t-l ; If V s-l ≥V t-l , disconnect the sink edge tl so that the node is only connected to the source vertex s; if V s-l <V t-l , disconnect the source edge sl so that the node is only connected to the sink vertex t;
[0027] Segment the ice-free insulator string: map the nodes connected to the source vertex s in the template weighted graph back to the original graph, and set the nodes connected to the sink vertex t to zero, to obtain the ice-free insulator string segmentation mask; remove the inner edge line of the ice-free insulator string segmentation mask, and approximate its outer boundary to m n The polygon C with vertices n ={C1,C2,···,C mn}, and obtain the ice-free insulator string profile.
[0028] Furthermore, the segmentation mask of the ice-free insulator string of the image to be tested and the template image with the same viewing angle is used to obtain the segmentation mask and the contour of the ice-covered insulator string through template segmentation, including:
[0029] Modeling of the image to be tested: Input the image to be tested and the ice-free insulator string segmentation mask of the same viewing angle template image into the Grabcut graph segmentation model; i The image to be tested is composed of pixels and converted into a matrix z i ={z1,···,z n ···,z Ni}, and mapped to N i The weighted graph to be tested has N nodes; the nodes corresponding to the ice-free insulator string segmentation mask coordinates are set as the foreground and assigned α=1, and the remaining nodes are set as the background and assigned α=0; the weighted graph to be tested is modeled using a Gaussian mixture model; the Gibbs energy function is solved to obtain N i A node that is only connected to the source vertex s or the sink vertex t;
[0030] Segment the ice-covered insulator string: map the nodes connected to the source vertex s in the weighted graph to be tested back to the original graph to obtain a segmentation mask for the ice-covered insulator string; remove the inner edge line of the segmentation mask for the ice-covered insulator string and approximate its outer boundary to m i The polygon C with vertices i ={C1,C2,···,C mi}, and obtain the outline of the iced insulator string.
[0031] Further, the method of fitting the minimum circumscribed rectangles of the contours of the ice-free insulator string and the ice-covered insulator string respectively, calculating the longitudinal distance and the lateral distance of the ice-free insulator string and the ice-covered insulator string, and solving to obtain the longitudinal ice coating degree and the lateral ice coating degree of the ice-covered insulator string includes:
[0032] Calculate the contour area: Use Green's formula to calculate the contour area A of the ice-free insulator string and the ice-covered insulator string respectively, and get the contour area A of the ice-free insulator string none and the outline area A of the iced insulator string ice ;
[0033] Solve the long and short sides of the contour fitting rectangle: Solve the centroid (x C ,y C ); taking the center of mass (x C ,y C ) as the center point, and the rotating caliper algorithm is used to solve the minimum area fitting rectangle R of the outer contour of the ice-free and ice-covered insulator strings. n , R i , respectively obtain the lengths of the long and short sides h of the fitting rectangle of the ice-free insulator string none 、w none , and the lengths of the long and short sides of the fitted rectangle of the ice-covered insulator string h ice 、w ice ;
[0034] Calculate the horizontal and vertical distances of the insulator string: Use the contour area and the length of the long and short sides of the fitted rectangle to calculate the horizontal and vertical distances of the insulator string, and get the horizontal distance of the ice-free insulator string. and longitudinal distance and the lateral distance of the iced insulator string and longitudinal distance
[0035] Solve the horizontal and vertical ice coverage: Use the horizontal and vertical distances of the same insulator string before and after ice coverage to analyze the horizontal and vertical ice coverage of the insulator string;
[0036] Assess the horizontal and vertical icing risks of the insulator string based on the degree of horizontal and vertical icing.
[0037] Furthermore, the calculation formula of the contour area A is:
[0038]
[0039] In the formula, x i ,y i are the horizontal and vertical coordinates of the i-th contour point respectively;
[0040] The lateral ice coverage degree P W The calculation formula is:
[0041]
[0042] The longitudinal ice coverage degree P H The calculation formula is:
[0043]
[0044] The step of evaluating the transverse and longitudinal icing risks of the insulator string according to the transverse and longitudinal icing degrees includes:
[0045] When the horizontal and vertical ice coverage degree P W , P H Both are less than 1%, and the output is "no ice"; when the horizontal and vertical ice coverage levels P W , P H Both are higher than 1% and lower than 5%, the output is “light icing”; when the horizontal and vertical icing degrees P W , P H If one of them is higher than 5% and lower than 15%, the output is "medium icing"; when the horizontal and vertical icing degrees P W , P H Both are higher than 15%, outputting "repeated ice".
[0046] The second technical solution adopted by the present invention is:
[0047] An electronic device comprises a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a method for diagnosing the degree of ice coating of an insulator string as described above.
[0048] The third technical solution adopted by the present invention is:
[0049] A computer-readable storage medium stores at least one instruction, at least one program, a code set or an instruction set, wherein the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a method for diagnosing the degree of ice coating on an insulator string as described above.
[0050] The fourth technical solution adopted by the present invention is:
[0051] A computer program product or a computer program, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned insulator string ice coating degree diagnosis method.
[0052] The beneficial effects of the present invention are as follows: the present invention provides an innovative solution that can automatically diagnose the degree of ice coverage of insulator strings directly using monitoring images, which can automatically and accurately diagnose the ice coverage of insulator strings of transmission lines, and help ensure the safe and stable operation of power systems under extreme climatic conditions. At the same time, the present invention solves the problem of the existing technology's high reliance on manual intervention and the need for a large amount of manually labeled data in the image analysis of the degree of ice coverage of insulator strings, and improves the monitoring efficiency and accuracy of the operating status of insulators in extreme ice and snow environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the embodiments of the present invention or the drawings of related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0054] Figure 1 An overall flow chart of a method for diagnosing ice coverage of an insulator string based on contour area provided in an embodiment of the present invention;
[0055] Figure 2 A schematic diagram of a step execution module of a method for diagnosing ice coverage of an insulator string based on contour area provided by an embodiment of the present invention;
[0056] Figure 3 This is a diagram showing the contour area analysis results of a typical insulator string before and after ice coating provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limitations of the present invention. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0058] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.
[0059] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0060] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.
[0061] Example 1
[0062] like Figure 1 and Figure 2 As shown, this embodiment provides a method for diagnosing the ice coverage degree of an insulator string based on contour area, comprising the following steps:
[0063] S1. Collecting an image of an insulator string: using a camera to capture an image of an insulator string, and performing defogging and enhancement on the image of the insulator string; the image of the insulator string is a visible light three-channel color image.
[0064] As an optional implementation, step S1 specifically includes the following steps:
[0065] S1-1. Determine shooting conditions: adjust the shooting angle, distance and exposure parameters of the camera to ensure that the insulator string in the image is clearly visible;
[0066] S1-2, using contrast adaptive equalization algorithm to perform defogging and enhancement on the image, including: dividing the insulator string image into square initial sub-blocks with a side length of a; adaptively equalize each initial sub-block; combine the equalized sub-blocks according to the arrangement order of the initial sub-blocks to enhance the insulator ice monitoring image; the pixel value C(x,y) of the pixel point with coordinates (x,y) in the i-th equalized sub-block i for:
[0067]
[0068] In the formula, f imax and f imin are the maximum pixel value and the minimum pixel value of the i-th initial sub-block respectively.
[0069] S2. Identify the insulator string and determine whether it is covered with ice: annotate the insulator string image, train the target recognition model, and obtain an ice detection model; input the insulator string image into the ice detection model, locate the identification frame of the insulator string and determine whether it is covered with ice.
[0070] In some embodiments, step S2 specifically includes the following steps:
[0071] S2-1. Training a target recognition model: traverse the insulator string image in the annotation software, select the insulator string in the image with a vertical rectangular frame, and if ice and snow accumulate on the surface of the insulator string, mark the category of the rectangular frame as "ice-covered"; if the surface of the insulator string is clean and there is no ice and snow, mark the category of the rectangular frame as "ice-free"; train the target recognition model with the insulator string image, rectangular frame and category to obtain an ice detection model;
[0072] S2-2, identifying the image of the insulator string: loading the ice detection model, inputting the newly acquired image of the insulator string to be tested; using the ice detection model to extract the features of the input image, detecting the insulator string in the input image and determining whether it is iced, filtering and removing the recognition frames with low confidence through the non-maximum suppression algorithm, merging the overlapping recognition frames, and obtaining the vertex coordinates of the insulator string recognition frame and the classification label of "ice-covered" or "ice-free".
[0073] S3, matching the template image with the image to be tested: distinguishing the template image from the image to be tested, and matching the template image and the image to be tested taken from the same viewing angle.
[0074] As an optional implementation, step S3 specifically includes the following steps:
[0075] S3-1. Distinguishing the template image from the image to be tested: setting the insulator string image with the classification label of “ice-free” as the template image, and extracting the ice-free insulator string identification box B from the template image. n The coordinates of the upper left corner (x a1 ,y a1 ) and the coordinates of the lower right corner (x a2 ,y a2 ); Set the insulator string image with the classification label of "ice-covered" as the image to be tested, and extract the ice-covered insulator string identification box B in the image to be tested i The coordinates of the upper left corner (x b1 ,y b1 ) and the coordinates of the lower right corner (x b2 ,y b2 );
[0076] S3-2, matching the same-viewing angle image: calculating the ice-free insulator string identification box B in the template image n Identification frame B for iced insulator string i The intersection-and-union ratio (IOU) of the recognition box is not less than the threshold IOU of the recognition box. th , match the template image with the image to be tested, and mark that they are taken from the same viewing angle.
[0077] The calculation formula of the intersection-over-union (IOU) is:
[0078]
[0079] In the formula, x′2 and x1′ are the larger and smaller values of the horizontal coordinates of the vertices of the recognition box, respectively, and x′2=max{x a1 ,x a2},x1′=min{x a1 ,x a2}, y′2 and y1′ are the larger and smaller values of the vertical coordinates of the vertices of the identification box, respectively, y′2=max{x a1 ,x a2},y1′=min{x a1 ,x a2},S in To identify the frame B n With B i The intersection area, S un To identify the frame B n With B i The union area of the i , S n They are identified as box B i , B n The area, S i =(x a2 -x a1 )×(y a2 -y a1 ), S n =(x b2 -x b1 )×(y b2 -y b1 ).
[0080] S4. Segmenting the contour of the ice-free insulator string: inputting the template image and the identification frame parameters of the ice-free insulator string into the graph theory model, and obtaining the segmentation mask and contour of the ice-free insulator string through rectangular segmentation.
[0081] As an optional implementation, step S4 specifically includes the following steps:
[0082] S4-1. Map the template image to a template weighted graph: load the Grabcut graph segmentation model; input the template image and the vertex coordinates of the ice-free insulator string identification box in the template image; map the N n The template image composed of pixels is converted into a matrix z n ={z1,···,z n ···,z Nn}, and mapped to N n A template weighted graph of nodes; in the template weighted graph, each node is connected to its adjacent nodes, the source vertex s representing the foreground, and the sink vertex t representing the background as a node edge nl, a source vertex edge sl, and a sink vertex edge tl, respectively, and the edge weight V represents the similarity between the nodes;
[0083] S4-2. Template weighted graph modeling: using vector α n ={α1,···,α Nn} Initialize the template weighted graph and set the ice-free insulator string identification box B n The inner nodes are foreground and assigned α=1, and the nodes outside the recognition box are background and assigned α=0. The template weighted graph is modeled using a Gaussian mixture model to obtain the Gibbs energy function E(α,k,θ,z)=U(α,k,θ,z)+V(α,z), where k={k1,···,k n ···,k Nn} is the node vector, k n is the Gaussian component of node n, U(α, k, θ, z) is the data item representing the node difference, θ is the iteration parameter, and V(α, z) is the smoothing item representing the weight of each edge;
[0084] S4-3. Solve the Gibbs energy function: Set the number of iterations I, use the maximum flow and minimum cut algorithm to solve the minimum value of the Gibbs energy function, and update the weight of the connecting edge in each iteration until the Gibbs energy function is reduced to convergence; traverse N n nodes, and compare the edge weights V of each node with the source vertex s and the sink vertex t s-l 、V t-l ; If V s-l ≥V t-l , disconnect the sink edge tl so that the node is only connected to the source vertex s; if V s-l <V t-l , disconnect the source edge sl so that the node is only connected to the sink vertex t;
[0085] S4-4, segmenting the ice-free insulator string: mapping the nodes connected to the source vertex s in the template weighted graph back to the original graph, and setting the nodes connected to the sink vertex t to zero, to obtain the ice-free insulator string segmentation mask; removing the inner edge line of the ice-free insulator string segmentation mask, and approximating its outer boundary to m nThe polygon C with vertices n ={C1,C2,···,C mn}, and obtain the ice-free insulator string profile.
[0086] S5. Segmenting the contour of the ice-covered insulator string: inputting the segmentation mask of the image to be tested and the ice-free insulator string of the template image with the same viewing angle into the graph theory model, and obtaining the segmentation mask and contour of the ice-covered insulator string through template segmentation.
[0087] In one embodiment, step S5 specifically includes the following steps:
[0088] S5-1. Modeling of the image to be tested: Input the image to be tested and the ice-free insulator string segmentation mask of the template image with the same viewing angle into the Grabcut graph segmentation model; i The image to be tested is composed of pixels and converted into a matrix z i ={z1,···,z n ···,z Ni}, and mapped to N i The weighted graph to be tested has N nodes; the nodes corresponding to the ice-free insulator string segmentation mask coordinates are set as the foreground and assigned α=1, and the remaining nodes are set as the background and assigned α=0; the weighted graph to be tested is modeled using a Gaussian mixture model; the Gibbs energy function is solved to obtain N i A node that is only connected to the source vertex s or the sink vertex t;
[0089] S5-2, segmenting the ice-covered insulator string: mapping the nodes connected to the source vertex s in the weighted graph to be tested back to the original graph to obtain a segmentation mask for the ice-covered insulator string; removing the inner edge line of the segmentation mask for the ice-covered insulator string, and approximating its outer boundary to m i The polygon C with vertices i ={C1,C2,···,C mi}, and obtain the outline of the iced insulator string.
[0090] S6. Calculate the horizontal and vertical ice coverage degrees: fit the minimum circumscribed rectangles of the contours of the ice-free and ice-covered insulator strings respectively, calculate the longitudinal distance and the lateral distance of the ice-free and ice-covered insulator strings, and solve to obtain the longitudinal ice coverage degree and the lateral ice coverage degree of the ice-covered insulator string.
[0091] See also Figure 3 As an implementation mode, step S6 specifically includes the following steps:
[0092] S6-1. Calculate the contour area: Use Green's formula to calculate the contour area A of the ice-free and ice-covered insulator strings respectively, and obtain the contour area A of the ice-free insulator string. none and the outline area A of the iced insulator string ice .
[0093] The calculation formula of the contour area A is:
[0094]
[0095] In the formula, x i ,y i are the horizontal and vertical coordinates of the i-th contour point respectively.
[0096] S6-2, solving the long and short sides of the contour fitting rectangle: solving the centroid (x C ,y C ); taking the center of mass (x C ,y C ) as the center point, and the rotating caliper algorithm is used to solve the minimum area fitting rectangle R of the outer contour of the ice-free and ice-covered insulator strings. n , R i , respectively obtain the lengths of the long and short sides h of the fitting rectangle of the ice-free insulator string none 、w none , and the lengths of the long and short sides of the fitted rectangle of the ice-covered insulator string h ice 、w ice .
[0097] S6-3. Calculate the horizontal and vertical distances of the insulator string: Use the contour area and the length of the long and short sides of the fitted rectangle to calculate the horizontal and vertical distances of the insulator string, respectively, to obtain the horizontal distance of the ice-free insulator string. and longitudinal distance and the lateral distance of the iced insulator string and longitudinal distance
[0098] S6-4. Determine the horizontal and vertical ice coverage degree: Use the horizontal and vertical distances of the same insulator string before and after ice coverage to analyze the horizontal and vertical ice coverage degree of the insulator string.
[0099] The lateral ice coverage degree P W The calculation formula is:
[0100]
[0101] The longitudinal ice coverage degree P H The calculation formula is:
[0102]
[0103] S6-5. Assess the risk of horizontal and vertical icing of insulator strings: When the horizontal and vertical icing degree P W , P H Both are less than 1%, and the output is "no ice"; when the horizontal and vertical ice coverage levels P W , PH Both are higher than 1% and lower than 5%, the output is “light icing”; when the horizontal and vertical icing degrees P W , P H If one of them is higher than 5% and lower than 15%, the output is "medium icing"; when the horizontal and vertical icing degrees P W , P H Both are higher than 15%, outputting "repeated ice".
[0104] Example 2
[0105] An embodiment of the present invention further provides an electronic device, the electronic device comprising a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by the processor to implement the following Figure 1 A method for diagnosing the ice coverage of an insulator string based on contour area is shown.
[0106] It is understood that the memory may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory may be used to store instructions, programs, codes, code sets, or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data created according to the use of the server, etc.
[0107] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect the various parts of the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory. Optionally, the processor can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor can integrate one or a combination of a central processing unit (CPU) and a modem. Among them, the CPU mainly processes the operating system and application programs; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor, but implemented separately through a chip.
[0108] Since the electronic device is an electronic device corresponding to a method for diagnosing the degree of ice coating on an insulator string based on contour area in an embodiment of the present invention, and the principle of solving the problem by the electronic device is similar to that of the method, the implementation of the electronic device can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0109] Example 4
[0110] The embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, the at least one program, the code set or instruction set is loaded and executed by a processor to implement the following Figure 1 A method for diagnosing the ice coverage of an insulator string based on contour area is shown.
[0111] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0112] Since the storage medium is a storage medium corresponding to a method for diagnosing the degree of ice coating on an insulator string based on contour area in an embodiment of the present invention, and the principle of solving the problem by the storage medium is similar to that of the method, the implementation of the storage medium can refer to the implementation process of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0113] Example 5
[0114] In some possible implementations, various aspects of the method of the embodiment of the present invention may also be implemented in the form of a program product, which includes a program code. When the program product is run on a computer device, the program code is used to enable the computer device to execute the steps of the insulator string ice coverage diagnosis method based on contour area according to various exemplary embodiments of the present application described above in this specification. The executable computer program code or "code" for executing various embodiments may be written in a high-level programming language such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, structured query language (e.g., Transact-SQL), Perl, or in various other programming languages.
[0115] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0116] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0117] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable ordinary technicians in the field to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made based on the essence of the content of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for diagnosing ice coverage of an insulator string, characterized in that: The following steps are involved: Collecting an insulator string image, and performing defogging and enhancement processing on the insulator string image; Input the insulator string image into the pre-trained ice detection model, locate the identification frame of the insulator string, and determine whether it is covered with ice; Distinguish the template image from the image to be tested, and match the template image and the image to be tested taken from the same viewing angle; According to the template image and the identification frame parameters of the ice-free insulator string, the segmentation mask and contour of the ice-free insulator string are obtained by rectangular segmentation; According to the segmentation mask of the ice-free insulator string of the image to be tested and the template image with the same viewing angle, the segmentation mask and the contour of the ice-covered insulator string are obtained by template segmentation; The minimum circumscribed rectangles of the contours of the ice-free insulator string and the ice-covered insulator string are fitted respectively, the longitudinal distance and the lateral distance of the ice-free insulator string and the ice-covered insulator string are calculated, and the longitudinal and lateral icing degrees of the ice-covered insulator string are obtained by solving.
2. The method for diagnosing ice coating degree of an insulator string according to claim 1, characterized in that: The insulator string image is a visible light three-channel color image; The collecting of the insulator string image and performing defogging and enhancement processing on the insulator string image includes: Determine shooting conditions: adjust the camera's shooting angle, distance, and exposure parameters to ensure that the insulator strings in the image are clearly visible; The contrast adaptive equalization algorithm is used to dehaze and enhance the image.
3. The method for diagnosing ice coating degree of an insulator string according to claim 1, characterized in that: The step of inputting the insulator string image into a pre-trained ice detection model, locating an identification frame of the insulator string, and determining whether ice is applied includes: The insulator string image is traversed in the annotation software, and the insulator string is selected with a vertical rectangular frame in the image. If ice and snow accumulate on the surface of the insulator string, the category of the rectangular frame is marked as "ice-covered"; if there is no ice and snow on the surface of the insulator string, the category of the rectangular frame is marked as "ice-free"; the target recognition model is trained with the insulator string image, the rectangular frame and the category to obtain an ice detection model; The ice detection model is loaded, and a newly collected image of an insulator string to be tested is input; the features of the input image are extracted using the ice detection model, the insulator string is detected in the input image and it is determined whether it is iced; low-confidence recognition frames are removed by screening using a non-maximum suppression algorithm, and overlapping recognition frames are merged to obtain the vertex coordinates of the insulator string recognition frame and the classification label of "ice-covered" or "ice-free".
4. The method for diagnosing ice coating degree of an insulator string according to claim 1, characterized in that: The distinguishing the template image from the image to be tested and matching the template image and the image to be tested taken from the same viewing angle include: The insulator string image with the classification label "ice-free" is set as the template image, and the ice-free insulator string recognition box B is extracted from the template image. n The coordinates of the upper left corner (x a1 ,y a1 ) and the coordinates of the lower right corner (x a2 ,y a2 ); the insulator string image with the classification label "ice-covered" is set as the image to be tested, and the ice-covered insulator string identification box B is extracted from the image to be tested i The coordinates of the upper left corner (x b1 ,y b1 ) and the coordinates of the lower right corner (x b2 ,y b2 ); Calculate the ice-free insulator string identification box B in the template image n Identification frame B for iced insulator string i The intersection-and-union ratio (IOU) of the recognition box is not less than the threshold IOU of the recognition box. th , match the template image with the image to be tested, and mark that they are taken from the same viewing angle.
5. The method for diagnosing ice coating degree of an insulator string according to claim 1, characterized in that: The method of obtaining the segmentation mask and the outline of the ice-free insulator string by rectangular segmentation according to the template image and the ice-free insulator string identification frame parameters includes: Load the Grabcut graph segmentation model; input the template image and the vertex coordinates of the ice-free insulator string recognition box in the template image; n The template image composed of pixels is converted into a matrix z n ={z1,···,z n ···,z Nn }, and mapped to N n A template weighted graph of nodes; in the template weighted graph, each node is connected to its adjacent nodes, the source vertex s representing the foreground, and the sink vertex t representing the background as a node edge nl, a source vertex edge sl, and a sink vertex edge tl, respectively, and the edge weight V represents the similarity between the nodes; With vector α n ={α1,···,α Nn } Initialize the template weighted graph and set the ice-free insulator string identification box B n The internal nodes are foreground and assigned a value of α=1, and the nodes outside the recognition box are background and assigned a value of α=0; the template weighted graph is modeled to obtain a Gibbs energy function E; Set the number of iterations I, use the maximum flow and minimum cut algorithm to solve the minimum value of the Gibbs energy function, and update the weight of the connecting edge in each iteration until the Gibbs energy function is reduced to convergence; traverse N n nodes, and compare the edge weights V of each node with the source vertex s and the sink vertex t s-l 、V t-l ; If V s-l ≥V t-l , disconnect the sink edge tl so that the node is only connected to the source vertex s; if V s-l <V t-l , disconnect the source edge sl so that the node is only connected to the sink vertex t; Segment the ice-free insulator string: map the nodes connected to the source vertex s in the template weighted graph back to the original graph, and set the nodes connected to the sink vertex t to zero, to obtain the ice-free insulator string segmentation mask; remove the inner edge line of the ice-free insulator string segmentation mask, and approximate its outer boundary to m n The polygon C with vertices n ={C1,C2,···,C mn }, and obtain the ice-free insulator string profile.
6. The method for diagnosing ice coating degree of an insulator string according to claim 1, characterized in that: The method of obtaining the segmentation mask and the contour of the ice-covered insulator string by template segmentation based on the image to be tested and the ice-free insulator string of the same viewing angle template image includes: The image to be tested and the ice-free insulator string segmentation mask of the same viewing angle template image are input to the Grabcut graph segmentation model; i The image to be tested is composed of pixels and converted into a matrix z i ={z1,···,z n ···,z Ni }, and mapped to N i The weighted graph to be tested has N nodes; the nodes corresponding to the ice-free insulator string segmentation mask coordinates are set as the foreground and assigned α=1, and the remaining nodes are set as the background and assigned α=0; the weighted graph to be tested is modeled using a Gaussian mixture model; the Gibbs energy function is solved to obtain N i A node that is only connected to the source vertex s or the sink vertex t; The nodes connected to the source vertex s in the weighted graph to be tested are mapped back to the original graph to obtain the ice-covered insulator string segmentation mask; the inner edge line of the ice-covered insulator string segmentation mask is removed, and its outer boundary is approximated to m i The polygon C with vertices i ={C1,C2,···,C mi }, and obtain the outline of the iced insulator string.
7. The method for diagnosing ice coating degree of an insulator string according to claim 1, characterized in that: The method of fitting the minimum circumscribed rectangles of the contours of the ice-free insulator string and the ice-covered insulator string respectively, calculating the longitudinal distance and the lateral distance of the ice-free insulator string and the ice-covered insulator string, and solving to obtain the longitudinal ice coverage degree and the lateral ice coverage degree of the ice-covered insulator string includes: Calculate the contour area A of the ice-free insulator string and the ice-covered insulator string respectively, and get the contour area A of the ice-free insulator string none and the outline area A of the iced insulator string ice ; The centroid (x) of the ice-free insulator string and the ice-covered insulator string is solved respectively. C ,y C ); taking the center of mass (x C ,y C ) as the center point, and the rotating caliper algorithm is used to solve the minimum area fitting rectangle R of the outer contour of the ice-free and ice-covered insulator strings. n , R i , respectively obtain the lengths of the long and short sides h of the fitting rectangle of the ice-free insulator string none 、w none , and the lengths of the long and short sides of the fitted rectangle of the ice-covered insulator string h ice 、w ice ; The horizontal and vertical distances of the insulator string are calculated using the contour area and the lengths of the long and short sides of the fitted rectangle to obtain the horizontal distance of the ice-free insulator string. and longitudinal distance and the lateral distance of the iced insulator string and longitudinal distance The horizontal and vertical distances of the same insulator string before and after icing are used to analyze the horizontal and vertical icing degree of the insulator string; Assess the horizontal and vertical icing risks of the insulator string based on the degree of horizontal and vertical icing.
8. The method for diagnosing ice coating degree of an insulator string according to claim 7, characterized in that: The calculation formula of the contour area A is: In the formula, x i ,y i are the horizontal and vertical coordinates of the i-th contour point respectively; The lateral ice coverage degree P W The calculation formula is: The longitudinal ice coverage degree P H The calculation formula is: The step of evaluating the transverse and longitudinal icing risks of the insulator string according to the transverse and longitudinal icing degrees includes: When the horizontal and vertical ice coverage degree P W , P H Both are less than 1%, and the output is "no ice"; when the horizontal and vertical ice coverage levels P W , P H Both are higher than 1% and lower than 5%, the output is "light icing"; when the horizontal and vertical icing degrees P W , P H If one of the two levels is higher than 5% and lower than 15%, the output is "medium icing"; when the horizontal and vertical icing levels P W , P H All above 15%, output "re-ice".
9. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Insulator icing identification method and device, storage medium and equipment
CN114049619A