CN114359156A - Insulator string-dropping fault detection method based on image recognition - Google Patents

Insulator string-dropping fault detection method based on image recognition Download PDF

Info

Publication number
CN114359156A
CN114359156A CN202111487299.4A CN202111487299A CN114359156A CN 114359156 A CN114359156 A CN 114359156A CN 202111487299 A CN202111487299 A CN 202111487299A CN 114359156 A CN114359156 A CN 114359156A
Authority
CN
China
Prior art keywords
image
insulator
point
ellipse
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111487299.4A
Other languages
Chinese (zh)
Inventor
陈林
贺菲
姚钦
谢洪云
李百川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yichang Power Supply Co of State Grid Hubei Electric Power Co Ltd
Original Assignee
Yichang Power Supply Co of State Grid Hubei Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yichang Power Supply Co of State Grid Hubei Electric Power Co Ltd filed Critical Yichang Power Supply Co of State Grid Hubei Electric Power Co Ltd
Priority to CN202111487299.4A priority Critical patent/CN114359156A/en
Publication of CN114359156A publication Critical patent/CN114359156A/en
Pending legal-status Critical Current

Links

Images

Abstract

The insulator string drop fault detection method based on image recognition is characterized in that insulator images are taken as a basis, edge features of the insulator images are extracted by using a two-dimensional maximum entropy improved Canny operator, single insulators are detected by improving Hough transformation, and finally the number of ellipses on the insulator strings is counted by straight line fitting, so that insulator string drop fault detection is realized. According to the insulator string drop fault detection method based on image recognition, insulator images are taken as a basis, image edge characteristics are extracted through a two-dimensional maximum entropy improved Canny operator based on an image recognition technology, and string drop fault detection is realized by combining improved Hough transformation and straight line fitting, so that the problems of low efficiency and poor accuracy caused by a traditional inspection method are effectively solved.

Description

Insulator string-dropping fault detection method based on image recognition
Technical Field
The invention relates to the technical field of insulator fault maintenance, in particular to an insulator string-dropping fault detection method based on image recognition.
Background
With the continuous strengthening of power grid construction in China, power networks are becoming more and more complex, and the insulator is used as an indispensable device in the power networks, and is particularly important for timely detecting whether the insulator breaks down or not. Therefore, more and more researchers apply the research results in the aspect of image recognition to the field and establish a power grid insulator overhauling system based on image processing, so that the aims of improving the working efficiency and reducing the labor intensity are fulfilled.
The traditional insulator overhauling method mainly comprises the following steps: (1) visual inspection; (2) and (6) testing an instrument. The insulator is exposed to the atmosphere and works in severe environments such as strong electric fields, strong mechanical stress, sudden cooling and heating, wind, rain, snow and fog, chemical substance corrosion and the like for a long time, so that string breaking faults occur frequently, if the insulator is not discovered and treated in time, large-area power failure can be caused, and even if the insulator is more serious, extra-large accidents such as forest fires, electric power system paralysis and the like can be caused.
Disclosure of Invention
In order to solve the technical problems, the invention provides an insulator string drop fault detection method based on image recognition, which is based on insulator images, extracts image edge features through a two-dimensional maximum entropy improved Canny operator based on an image recognition technology, combines improved Hough transformation and straight line fitting, realizes string drop fault detection, and effectively solves the problems of low efficiency and poor accuracy caused by the traditional inspection method.
The technical scheme adopted by the invention is as follows:
the insulator string drop fault detection method based on image recognition is characterized in that insulator images are taken as a basis, edge features of the insulator images are extracted by using a two-dimensional maximum entropy improved Canny operator, single insulators are detected by improving Hough transformation, and finally the number of ellipses on the insulator strings is counted by straight line fitting, so that insulator string drop fault detection is realized.
The insulator string drop fault detection method based on image recognition comprises the following steps:
the method comprises the following steps: graying the color image to obtain a gray image based on the insulator image;
step two: calculating the two-dimensional maximum entropy of the gray level image;
step three: extracting edge features of the gray level image by using the calculated two-dimensional maximum entropy as a threshold value of a Canny operator;
step four: detecting the ellipse in the edge image through improved Hough transformation, thereby realizing single-chip insulator detection;
step five: performing linear fitting on the detected center of the ellipse, thereby realizing the positioning of the insulator string;
step six: and counting the number of single insulators on the same insulator string, comparing the number of insulator strings specified under different voltage levels, and judging whether the insulator strings are broken or not.
The second step comprises the following steps:
step 2.1: expressing the obtained image by a two-dimensional gray function, setting pixel points to be NxN, and dividing the gray value of the pixel points into L levels; firstly, calculating the average value of the regional gray of an original image, selecting a target pixel and an adjacent pixel as templates, expressing the gray value of a pixel point of a corresponding coordinate and the average value of the regional gray by data (i, j), and setting ni,jThe number of pixel points with point gray of i and area gray of j, pi,jFor probability density, then:
Figure BDA0003397111340000021
the abscissa i represents a point gray value, the ordinate j represents a region gray mean value, and a two-dimensional gray distribution graph of the image is established; the two-dimensional gray distribution map comprises 4 areas, namely A, B, C, D, wherein, area A represents the target area, area B represents the background area outside the insulator, and area C and area D represent the boundary pixel point and the interference noise distribution area respectively.
Step 2.2: respectively carrying out normalization processing by using the probabilities of the area A and the area B, wherein the entropy values have additivity, and then the probabilities of the area A and the area B are as follows:
Figure BDA0003397111340000022
Figure BDA0003397111340000023
PA、PBthe abscissa i represents the point gray value, the ordinate j represents the neighborhood gray mean value, the threshold value for segmentation is represented at (s, t), and L is the maximum gray value of the image, which is the probability of the region A, B in fig. 3.
The discrete two-dimensional entropy is defined as:
Figure BDA0003397111340000024
HA、HBdiscrete two-dimensional entropy, p, of zone A and zone B, respectivelyi,jIs the probability density;
the two-dimensional entropy of region a can be obtained:
Figure BDA0003397111340000025
and the following steps:
Figure BDA0003397111340000031
like the area A, the two-dimensional entropy of the area B is:
H(B)=lg PB+HB/PB (7)
neglecting noise and edges in the threshold segmentation, let p of C region and D region i,j0, then zone C: i ═ s +1, s +2, …, L; and (3) region D: i is 1,2, …, s; j ═ t +1, t +2, …, L. The following can be obtained:
Figure BDA0003397111340000032
the discriminant function of entropy is defined as:
Figure BDA0003397111340000033
in the formula (10), HA、HBIs discrete two-dimensional entropy of an area A and an area B, the area A represents a target area, the area B represents a background area outside an insulator,
in this regard, the selected optimal threshold satisfies:
Figure BDA0003397111340000034
in the formula (11), the reaction mixture is,
Figure BDA0003397111340000035
is entropy, (s, t) represents a threshold,
Figure BDA0003397111340000036
represents an optimal threshold;
when the entropy takes the maximum value, s and t are the optimal threshold values.
The third step comprises the following steps:
step 3.1, setting an original input image as f (x, y), and firstly, performing smoothing operation by using a Gaussian function, wherein the gradient of g (x, y) after smoothing is as follows:
Figure BDA0003397111340000037
Figure BDA0003397111340000038
to be the gradient of the image after the gaussian filtering,
Figure BDA0003397111340000039
is a transverse gradient in the image,
Figure BDA00033971113400000310
Is a gradient in the image in the longitudinal direction,
Figure BDA0003397111340000041
is the gradient of the image.
The image calculation is similar to the matrix calculation, the gray value range of each pixel point is 0-255, 0 is black, 255 is white, if the image is a color image, the image contains three dimensions of RGB, and the gray value range in each dimension is 0-255, for example: a 256 × 256 image, that is, the image contains 256 (horizontal) × 256 (vertical) pixels, each pixel is a numerical value, and x and y are equivalent to a coordinate.
The convolution operation characteristics are as follows:
Figure BDA0003397111340000042
in formula (13): g (x, y) is a Gaussian function;
Figure BDA0003397111340000043
f (x, y) is an original image, and G (x, y) is a Gaussian function;
step 3.2, setting a two-dimensional Gaussian filter function as:
Figure BDA0003397111340000044
the definition of the gaussian function in equation (14) is shown, and there are many methods for filtering in the image, for example, the mean filtering is to obtain the mean value of the convolution kernel range, and the gaussian filtering is to obtain the weighted average value of the convolution kernel range, and the filtering kernel in the image is shown in fig. 6(1) and fig. 6 (2). Assuming that the coordinates of the center point are (0, 0), the values of x and y are substituted, and σ is 0.8 when the size of the gaussian filter is 3 × 3.
Decomposing the gradient vector
Figure BDA0003397111340000047
The two filter convolution templates of (a) are decomposed into two one-dimensional row and column filters:
Figure BDA0003397111340000045
convolving the x and y directions, and performing convolution calculation on the two convolution templates respectively in the image to obtain output:
Figure BDA0003397111340000046
convolution for x and y directions
Figure BDA0003397111340000051
In the formula (17), A (i, j) is the gradient magnitude of the image, α (i, j) is the angle, i.e., the gradient direction, Ex,EyThe gradient is in the x and y directions.
As shown in fig. 7, in formula (17): a (i, j) reflects the edge strength at point (i, j) on image f (x, y), i.e. the magnitude of the gradient; α (i, j) is a normal vector at the (i, j) point on the image f (x, y), which is a vector orthogonal to the edge direction, i.e., the direction of the gradient.
And 3.3, calculating the two-dimensional maximum entropy H (s, t).
As the high threshold of the dual thresholds in Canny, in the dual threshold algorithm, t1And t2Respectively a low threshold and a high threshold, and t2≈2t1Therefore, the traditional Canny operator can be improved.
In the conventional Canny, the number of the Canny,
the first step is as follows: gaussian filtering;
the second step is that: calculating gradient amplitude and direction;
the third step: carrying out non-maximum suppression on the amplitude;
the fourth step: detecting and connecting edges using a dual threshold algorithm
In the fourth step, the double thresholds in the traditional Canny operator have no specific algorithm, are obtained by experience, and have poor universality.
In the fourth step of the method, the first step of the method,
let the center of the ellipse be (x)0,y0) The point (x, y) is elliptically different from (x)1,y1) And (x)2,y2) Any point of (a). Point (x, y) to point (x)1,y1) Is d from the point (x)2,y2) Is f. Points (x, y) and (x)0,y0) The positive included angle between the connecting line of (a) and the x axis is alpha. The center coordinates of the ellipse are:
Figure BDA0003397111340000052
long axis:
Figure BDA0003397111340000053
short axis:
Figure BDA0003397111340000061
Figure BDA0003397111340000062
rotation angle:
Figure BDA0003397111340000063
the ellipse detection steps are as follows:
(1) establishing an array A, and storing pixel points in the image subjected to edge detection into the array A;
(2) sequentially assigning the edge pixel points to the point (x)1,y1) Repeating the steps (3) to (7);
(3) seekingPoint (x)2,y2) So that point (x)1,y1) And point (x)2,y2) If the threshold value is larger than the set threshold value, repeating the steps (4) to (7);
(4) passing point (x)1,y1) And point (x)2,y2) Calculating the center (x) of the ellipse0,y0) Four parameters of the major axis 2a of the ellipse and the rotation angle theta of the ellipse;
(5) finding a point (x, y) such that (x, y) is centered on the ellipse (x)0,y0) Is greater than a threshold value and is less than the ellipse center (x)0,y0) And point (x)1,y1) The distance of (c). Calculating the parameter 2b of the ellipse for all points (x, y) satisfying the condition, establishing an accumulator and incrementing the accumulator;
(6) recording the accumulated value of the accumulator, if the accumulated peak value exceeds the set threshold value, the detected ellipse is a real ellipse, and storing the ellipse parameters into an array B;
(7) and removing all edge pixel points of the detected true ellipse from the array A, and clearing the accumulator. The fifth step comprises the following steps:
s5.1, preprocessing an image to obtain edge characteristics;
s5.2, positioning the single insulator based on improved Hough ellipse detection;
s5.3, insulator string detection based on random sampling consistency (RANSAC) straight line fitting:
s5.3a, selecting the center of an ellipse as a data point, taking any two points of the data point, and determining a straight line l;
s5.3b, counting points with the distance to the straight line l smaller than a threshold t according to a set threshold t, and setting a point set as a consistent set of the straight line l;
s5.3c, traversing all points in the graph, repeating the steps to obtain all straight lines l1,l2,…,lnA consistent set of (2);
and S5.3d, taking the straight line with the maximum consistent set as a final fitting straight line, and determining the straight line as an insulator string.
And S5.4, counting the number of the single insulators, drawing a final fitting straight line on the detected insulator string and a consistent set of the straight line, counting the number of circle centers in the consistent set, and judging whether the insulator string is in a string-dropping fault according to a string number standard of the insulator string in the power system of the region.
The invention discloses an insulator string-dropping fault detection method based on image recognition, which has the following technical effects:
1) on one hand, the method can effectively reduce the interference of false edges and noise when extracting the edge characteristics of the image; on the other hand, through improving Hough transform and straight line fitting, can detect and count the cluster number on the same insulator chain, finally through the number according to insulator chain under the different voltage levels, realize falling a cluster fault detection to improve maintainer's work efficiency, reduce because of falling the economic loss that a cluster trouble brought.
2) The method can be widely applied to an intelligent line patrol system, insulator real-time monitoring is achieved, manpower and material resources can be reduced, working efficiency is improved, economic loss caused by insulator string falling faults can be greatly reduced, and safety and stability of a power grid are guaranteed.
3) The insulator string-dropping fault detection method based on the image entropy is characterized in that an insulator image is processed by utilizing an image recognition technology, a Canny operator is improved by utilizing a two-dimensional maximum image entropy method, and further insulator string-dropping fault detection is finally realized by improving Hough transformation and straight line fitting. The method can effectively improve the efficiency and accuracy of the maintenance of the insulator of the power grid, reduce the labor intensity of power grid maintenance personnel, and reduce the economic loss caused by the insulator fault in the power grid.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
Fig. 2 is a diagram of insulator image preprocessing steps.
Fig. 3 is a two-dimensional gray scale distribution diagram of an image.
Fig. 4 is a flow chart of Canny operator edge detection.
FIG. 5 is a geometric model diagram of an ellipse.
FIG. 6(1) is a graph of Gaussian filter kernels;
FIG. 6(2) is a Gaussian filter kernel;
FIG. 7 is a schematic gradient diagram of an image;
FIG. 8(1) is the original insulator map;
fig. 8(2) is an edge feature map obtained by the extraction in fig. 8 (1).
FIG. 9(1) is a gray scale diagram of the insulator;
FIG. 9(2) is an edge feature diagram of an insulator extracted by the improved canny operator;
fig. 9(3) is a diagram of a detection result of a single insulator based on improved Hough transformation;
fig. 9(4) is a diagram showing the result of insulator fault detection.
Detailed Description
The insulator string drop fault detection method based on image recognition is based on insulator images, adopts an image recognition technology, improves Canny operator extraction edges by utilizing a two-dimensional maximum entropy method, and combines improved Hough transformation and straight line fitting. As shown in fig. 1, comprises the following steps:
the method comprises the following steps: the insulator image is taken as a basis, the gray level image is obtained by graying the color image, the definition of the image is improved, the contrast of the image is expanded, and the characteristics are more obvious.
Step two: and calculating the two-dimensional maximum entropy of the gray level image.
Step three: and extracting the edge characteristics of the gray level image by using the calculated two-dimensional maximum entropy as a threshold value of a Canny operator. The two-dimensional maximum entropy is based on the information theory, the spatial characteristics of the pixels are fully considered, so that the occurrence of false edges and noise points in the edge image can be effectively reduced, and the edge of the image can be more accurately extracted.
Step four: detecting the ellipse in the edge image through improved Hough transformation, thereby realizing single-chip insulator detection;
step five: and performing linear fitting on the detected center of the ellipse, thereby realizing the positioning of the insulator string. Therefore, the situation that other non-insulator ellipses are also identified as single insulators to further cause fault misjudgment can be avoided.
Step six: and counting the number of single insulators on the same insulator string, comparing the number of insulator strings specified under different voltage levels, and judging whether the insulator strings are broken or not.
The specific method of the invention is as follows:
(I) preprocessing an insulator image:
the insulator image has the following characteristics:
(1) the background is complex: the insulator image contains other electric facilities such as wires, pole frames, transformers and the like, and other backgrounds such as sky, walls and other non-target objects;
(2) the characteristics are prominent: the insulators are obvious in characteristic, the colors of the insulators are greatly different from surrounding scenes, the appearance of the insulators is easy to recognize, and the insulators are regular objects with a plurality of arc-shaped porcelain skirts with equal intervals.
In summary, due to the above characteristics of the insulator image, the insulator image needs to be preprocessed, so as to ensure the accuracy of the final fault detection. The steps are shown in fig. 2.
1. Graying of an image:
for the insulator string-dropping fault detection, too much color information can not improve the accuracy, but can increase the calculated amount to influence the detection efficiency. Graying, namely converting RGB three channels existing in an original image into a channel with only a brightness value, thereby effectively improving the calculation speed, enhancing the contrast of the image to a certain extent and highlighting the morphological characteristics of a target object. The gray scale map is represented in a computer by quantizing and equally dividing the brightness value into 256 levels of 0-255, wherein 0 is darkest and 255 is brightest. In the RGB model, converting a (R, G, B) color into a gray scale value is called as "G" or "B", and the gray scale conversion is performed by using an empirical formula. The conversion formula is:
Gray(i,j)=0.11R(i,j)+0.59G(i,j)+0.30B(i,j) (22)
in equation (1), Gray (i, j) is the Gray value of the converted Gray image at the (i, j) point.
2. Extracting edge features based on an improved Canny operator:
the gray level transformation can improve the definition of image components, so that the image contrast is expanded, and the characteristics are more obvious. Further, edge features of the image are extracted through a two-dimensional maximum entropy improvement Canny operator, and a basis is provided for detecting the fault of the insulator string drop in the follow-up process.
Step 1: and calculating the two-dimensional maximum entropy. The maximum entropy principle not only utilizes image pixel information, but also fully considers the spatial information of the neighborhood pixels, and has better anti-noise performance. And expressing the obtained image by a two-dimensional gray function, setting pixel points to be NxN, and dividing the gray value of the pixel points into L levels. First, the regional gray scale of the original image is averaged. During actual calculation, a target pixel and adjacent pixels are selected as templates, data (i, j) represent the gray value of a pixel point corresponding to coordinates and the average value of the gray value of the area of the pixel point, and n is seti,jThe number of pixel points with point gray of i and area gray of j, pi,jFor probability density, then:
Figure BDA0003397111340000091
as shown in fig. 3, an abscissa i represents a point gray value and an ordinate j represents a region gray average value, thereby creating a two-dimensional gray distribution map of an image. In fig. 3, the threshold value of the division is shown at (s, t), and the two-dimensional gray scale distribution map can divide the divided threshold value into 4 regions, i.e., A, B, C, D. The area A represents a target area, the area B represents a background area outside the insulator, and the area C and the area D respectively represent boundary pixel points and an interference noise distribution area. In order to achieve an ideal segmentation effect of the target region and the background region, a two-dimensional maximum threshold method is adopted to obtain an optimal threshold. Respectively carrying out normalization processing by using the probabilities of the area A and the area B, wherein the entropy values have additivity, and then the probabilities of the area A and the area B are as follows:
Figure BDA0003397111340000092
Figure BDA0003397111340000093
the discrete two-dimensional entropy is defined as:
Figure BDA0003397111340000094
the two-dimensional entropy of region a can be obtained:
Figure BDA0003397111340000101
and the following steps:
Figure BDA0003397111340000102
like the area A, the two-dimensional entropy of the area B is:
H(B)=lg PB+HB/PB (29)
neglecting noise and edges in the threshold segmentation, let p of C region and D region i,j0, then zone C: i ═ s +1, s +2, …, L; and (3) region D: i is 1,2, …, s; j ═ t +1, t +2, …, L. The following can be obtained:
Figure BDA0003397111340000103
the discriminant function of entropy is defined as:
Figure BDA0003397111340000104
in this regard, the selected optimal threshold satisfies:
Figure BDA0003397111340000105
step 2: the Canny operator edge detection is improved, and the edge detection flow is shown in figure 4.
Let the original input image be f (x, y), firstly, a gaussian function is used for smoothing operation, that is, the gradient of g (x, y) after smoothing is:
Figure BDA0003397111340000106
the convolution operation characteristics are as follows:
Figure BDA0003397111340000107
in the formula: g (x, y) is a Gaussian function.
The image smoothing processing adopting the Gaussian function can lead the edge of the original image to be blurred and the width to be increased, and a non-maximum value inhibition technology is introduced to sharpen the blurred edge.
Let the two-dimensional gaussian filter function be:
Figure BDA0003397111340000111
decomposing the gradient vector
Figure BDA0003397111340000115
The two filter convolution templates of (a) are decomposed into two one-dimensional row and column filters:
Figure BDA0003397111340000112
and performing convolution calculation on the two convolution templates respectively in the image to obtain output:
Figure BDA0003397111340000113
Figure BDA0003397111340000114
in equation (17), a (i, j) reflects the edge intensity at point (i, j) on image f (x, y), i.e., the magnitude of the gradient; α (i, j) is a normal vector at the (i, j) point on the image f (x, y), which is a vector orthogonal to the edge direction, i.e., the direction of the gradient.
The size of the edge intensity a (i, j) value at the point (i, j) on the image f (x, y) cannot determine whether the point is an edge point, and it is necessary to refine the ridge zone in the amplitude image and keep the point with the largest local amplitude change, which is non-maximum suppression. Non-maxima suppression enables edge thinning, which results in thinner edges. However, the image still has many false edges caused by noise and fine texture, and a dual-threshold algorithm is required to further filter the edges and perform edge connection.
In the traditional Canny operator edge detection, the biggest defect is that no clear calculation method is adopted for selecting the threshold in the whole algorithm, the final result of the edge detection is determined by selecting the threshold, the threshold is too low, a lot of false edges and noise points can be generated in the insulator edge detection process, and the information of lines and cracks needing to be reserved in the insulator sub-image cannot be reserved if the threshold is too high.
Aiming at the defects, the two-dimensional maximum entropy H (s, t) calculated in the previous step is taken as a high threshold value in double threshold values in a Canny operator, and in a double threshold value algorithm, t is taken as a high threshold value in the double threshold value1And t2Respectively a low threshold and a high threshold, and t2≈2t1Therefore, the traditional Canny operator can be improved.
An edge feature map obtained by extracting edge features based on the modified Canny operator is shown in fig. 8 (2).
(II) insulator string-dropping fault detection:
insulator string failure detection is carried out on the basis of the edge characteristic diagram, and the method mainly comprises two steps: single-chip insulator positioning based on improved Hough transformation and insulator string drop fault detection based on linear fitting.
Monolithic insulator positioning based on modified Hough:
the single insulator is elliptical in the aerial image and has obvious morphological characteristics, so that the ellipse in the edge image is identified by improving Hough transformation, and the identification of the single insulator is further realized.
Under a rectangular coordinate system, a determined ellipse consists of four parameters, namely a long parameter, a short axis, a central point and a rotation angle. To simplify the calculation, the dimensions of the parameters are reduced using the geometric features of the ellipse. First, the center (x) of the ellipse is determined0,y0) The major axis 2a of the ellipse and the rotation angle theta of the ellipse are within approximate ranges of four parameters, so that the parameter space is reduced to one dimension, and the ellipse detection is realized by establishing a one-dimensional accumulator to count the minor axis 2b of the ellipse. The two end points of the major axis of the ellipse are respectively (x)1,y1) And (x)2,y2) The geometric model of the ellipse is shown in fig. 5.
Let the center of the ellipse be (x)0,y0) The point (x, y) is elliptically different from (x)1,y1) And (x)2,y2) Any point of (a). Point (x, y) to point (x)1,y1) Is d from the point (x)2,y2) Is f. Points (x, y) and (x)0,y0) The positive included angle between the connecting line of (a) and the x axis is alpha. The center coordinates of the ellipse are:
Figure BDA0003397111340000121
long axis:
Figure BDA0003397111340000122
short axis:
Figure BDA0003397111340000123
Figure BDA0003397111340000124
rotation angle:
Figure BDA0003397111340000131
the ellipse detection steps are as follows:
(1) establishing an array A, and storing pixel points in the image subjected to edge detection into the array A;
(2) sequentially assigning edge pixel points to the points (x)1,y1) Repeating the steps (3) to (7);
(3) find point (x)2,y2) So that point (x)1,y1) And point (x)2,y2) If the threshold value is larger than the set threshold value, repeating the steps (4) to (7);
(4) passing point (x)1,y1) And point (x)2,y2) Calculating the center (x) of the ellipse0,y0) Four parameters of the major axis 2a of the ellipse and the rotation angle theta of the ellipse;
(5) find point (x, y) such that (x, y) is centered on the ellipse (x)0,y0) Is greater than a threshold value and is less than the ellipse center (x)0,y0) And point (x)1,y1) The distance of (c). Calculating the parameter 2b of the ellipse for all points (x, y) satisfying the condition, establishing an accumulator and incrementing the accumulator;
(6) recording the accumulated value of the accumulator, if the accumulated peak value exceeds the set threshold value, the detected ellipse is a real ellipse, and the ellipse parameters are stored in an array B;
(7) and removing all edge pixel points of the detected true ellipse from the array A, and clearing the accumulator.
Insulator string-falling fault detection based on linear fitting
In the insulator image, the sizes of the insulator pieces on the same string are similar to the angles of the ellipses, and the centers of the insulators on the same string are basically located on the same straight line. In the power system located in the same area at the same voltage level, the number of insulator strings is constant.
According to the conditions, RANSAC straight line fitting is carried out on the circle center of the ellipse in the graph, and the point which is far away from the fitting straight line and exceeds the threshold value is eliminated, so that the non-insulator ellipse can be eliminated, and further, the number of the ellipses on each string of insulators is counted to judge whether the string-off fault occurs. The method mainly comprises the following steps:
(1) preprocessing an image to obtain edge features;
(2) positioning a single insulator based on improved Hough ellipse detection;
(3) insulator string detection based on random sampling consensus (RANSAC) straight line fitting:
a. selecting the center of an ellipse as a data point, taking any two points of the data point, and determining a straight line l;
b. counting points with the distance to the straight line l being smaller than a threshold t according to a set threshold t, and setting the point set as a consistent set of the straight line l;
c. traversing all points in the graph, and repeating the steps to obtain all straight lines l1,l2,…,lnA consistent set of (2);
d. and taking the straight line with the maximum consistent set as a final fitting straight line, and determining the straight line as an insulator string.
(4) And counting the number of the single insulators. Drawing a final fitting straight line on the detected insulator string and a consistent set of the straight line, counting the number of circle centers in the consistent set, and judging whether the insulator string is in a string-dropping fault or not according to a string number standard of the insulator string in the electric power system of the region.
Therefore, interference of other non-single insulator ellipses in the figure can be effectively eliminated through a straight line fitting method, and string-dropping fault detection is carried out more accurately.
And thirdly, counting the number of single insulators on the same insulator string, comparing the number of insulator strings specified under different voltage levels, and judging whether the insulator strings are broken or not.
TABLE 1 number of insulator pieces that each stage of voltage line suspension string should have
Figure BDA0003397111340000141
Table 1 shows the number of insulator pieces of each stage of the voltage line suspension string, and if there is a missing string, as shown in fig. 9(1), 9(2), 9(3), and 9(4), the number of insulator pieces on the same straight line is counted, and the number of insulator pieces required is compared, so that whether or not a failure occurs can be detected.
As shown in fig. 9(1) -9 (4), firstly, edge feature extraction is performed on a gray scale image 9(1) to obtain a graph 9(2), and then ellipses in the graph 9(2) are detected to obtain a graph 9(3), namely, a single insulator is detected, because ellipses which are not insulators may exist in an edge feature image, if the number of ellipses in the graph is simply counted, errors may be caused, and the centers of the ellipses on the same string are basically on the same straight line, so that the ellipses on the same straight line are further connected through straight line fitting, and finally, the ellipses on the same straight line are counted to obtain a graph 9(4), and the number of insulator strings specified under different voltage levels is compared to judge whether faults occur. The final result of the related program is shown in fig. 9(4), and the final result is directly displayed as failure or normal.

Claims (6)

1. The insulator string-dropping fault detection method based on image recognition is characterized by comprising the following steps of: and taking the insulator image as a basis, extracting the edge characteristics of the insulator image by using a two-dimensional maximum entropy improvement Canny operator, detecting a single insulator by improving Hough transformation, and finally counting the number of ellipses on the insulator string by straight line fitting to realize the insulator string falling fault detection.
2. The insulator string drop fault detection method based on image recognition is characterized by comprising the following steps of:
the method comprises the following steps: graying the color image to obtain a gray image based on the insulator image;
step two: calculating the two-dimensional maximum entropy of the gray level image;
step three: extracting edge features of the gray level image by using the calculated two-dimensional maximum entropy as a threshold value of a Canny operator;
step four: detecting the ellipse in the edge image through improved Hough transformation, thereby realizing single-chip insulator detection;
step five: performing linear fitting on the detected center of the ellipse, thereby realizing the positioning of the insulator string;
step six: and counting the number of single insulators on the same insulator string, comparing the number of insulator strings specified under different voltage levels, and judging whether the insulator strings are broken or not.
3. The method for detecting insulator string breakage fault based on image recognition according to claim 2, wherein the second step comprises the following steps:
step 2.1: expressing the obtained image by a two-dimensional gray function, setting pixel points to be NxN, and dividing the gray value of the pixel points into L levels; firstly, calculating the average value of the regional gray of an original image, selecting a target pixel and an adjacent pixel as templates, expressing the gray value of a pixel point of a corresponding coordinate and the average value of the regional gray by data (i, j), and setting ni,jThe number of pixel points with point gray of i and area gray of j, pi,jFor probability density, then:
Figure FDA0003397111330000011
the abscissa i represents a point gray value, the ordinate j represents a region gray mean value, and a two-dimensional gray distribution graph of the image is established; the two-dimensional gray distribution map comprises 4 areas, namely A, B, C, D, wherein an area A represents a target area, an area B represents a background area outside an insulator, and an area C and an area D respectively represent boundary pixel points and interference noise distribution areas;
step 2.2: respectively carrying out normalization processing by using the probabilities of the area A and the area B, wherein the entropy values have additivity, and then the probabilities of the area A and the area B are as follows:
Figure FDA0003397111330000012
Figure FDA0003397111330000021
PA、PBthe probability of the A, B area in fig. 3 is shown as the abscissa i represents the point gray value, the ordinate j represents the neighborhood gray mean value, the (s, t) position represents the segmentation threshold, and L is the maximum gray value of the image;
the discrete two-dimensional entropy is defined as:
Figure FDA0003397111330000022
HA、HBdiscrete two-dimensional entropy of A region and B region, pi,jIs the probability density;
the two-dimensional entropy of region a can be obtained:
Figure FDA0003397111330000023
and the following steps:
Figure FDA0003397111330000024
like the area A, the two-dimensional entropy of the area B is:
H(B)=lgPB+HB/PB (7)
neglecting noise and edges in the threshold segmentation, let p of C region and D regioni,j0, then zone C: i ═ s +1, s +2, …, L; and (3) region D: i is 1,2, …, s; j ═ t +1, t +2, …, L; the following can be obtained:
Figure FDA0003397111330000025
the discriminant function of entropy is defined as:
Figure FDA0003397111330000026
in the formula (10), HA、HBIs discrete two-dimensional entropy of an area A and an area B, the area A represents a target area, the area B represents a background area outside an insulator,
in this regard, the selected optimal threshold satisfies:
Figure FDA0003397111330000027
when the entropy takes the maximum value, s and t are the optimal threshold values.
4. The method for detecting insulator string-dropping faults based on image recognition according to claim 2, wherein the third step comprises the following steps:
step 3.1, setting an original input image as f (x, y), and firstly, performing smoothing operation by using a Gaussian function, wherein the gradient of g (x, y) after smoothing is as follows:
Figure FDA0003397111330000031
Figure FDA0003397111330000032
to be the gradient of the image after the gaussian filtering,
Figure FDA0003397111330000033
is a transverse gradient in the image,
Figure FDA0003397111330000034
Is a gradient in the image in the longitudinal direction,
Figure FDA0003397111330000035
is the gradient of the image;
the image calculation is similar to the matrix calculation, the gray value range of each pixel point is 0-255, 0 is black, 255 is white, if the image is a color image, the image contains three dimensions of RGB, and the gray value range in each dimension is 0-255, for example: a 256 × 256 image, that is, the image contains 256 (horizontal) × 256 (vertical) pixels, each pixel is a numerical value, and x and y are equivalent to a coordinate;
the convolution operation characteristics are as follows:
Figure FDA0003397111330000036
in the formula: g (x, y) is a Gaussian function;
in the formula (13), the reaction mixture is,
Figure FDA0003397111330000037
f (x, y) is an original image, and G (x, y) is a Gaussian function;
step 3.2, setting a two-dimensional Gaussian filter function as:
Figure FDA0003397111330000038
decomposing the gradient vector
Figure FDA0003397111330000039
The two filter convolution templates of (a) are decomposed into two one-dimensional row and column filters:
Figure FDA0003397111330000041
convolving the x and y directions, and performing convolution calculation on the two convolution templates respectively in the image to obtain output:
Figure FDA0003397111330000042
convolution is carried out on the x direction and the y direction,
Figure FDA0003397111330000043
in formula (17): a (i, j) reflects the edge strength at point (i, j) on image f (x, y), i.e. the magnitude of the gradient; α (i, j) is a normal vector at the (i, j) point on the image f (x, y), which is a vector orthogonal to the edge direction, i.e., the direction of the gradient;
and 3.3, calculating the two-dimensional maximum entropy H (s, t).
5. The method for detecting insulator string drop fault based on image recognition as claimed in claim 2, wherein in the fourth step, the center of the ellipse is set as (x)0,y0) The point (x, y) is elliptically different from (x)1,y1) And (x)2,y2) Any point of (a); point (x, y) to point (x)1,y1) Is d from the point (x)2,y2) Is f; points (x, y) and (x)0,y0) The positive included angle between the connecting line of the X-axis and the X-axis is alpha; the center coordinates of the ellipse are:
Figure FDA0003397111330000044
long axis:
Figure FDA0003397111330000045
short axis:
Figure FDA0003397111330000046
Figure FDA0003397111330000047
rotation angle:
Figure FDA0003397111330000051
the ellipse detection steps are as follows:
(1) establishing an array A, and storing pixel points in the image subjected to edge detection into the array A;
(2) sequentially assigning the edge pixel points to the point (x)1,y1) Repeating the steps (3) to (7);
(3) finding a point (x)2,y2) So that point (x)1,y1) And point (x)2,y2) If the threshold value is larger than the set threshold value, repeating the steps (4) to (7);
(4) passing point (x)1,y1) And point (x)2,y2) Calculating the center (x) of the ellipse0,y0) Four parameters of the major axis 2a of the ellipse and the rotation angle theta of the ellipse;
(5) finding a point (x, y) such that (x, y) is centered on the ellipse (x)0,y0) Is greater than a threshold value and is less than the ellipse center (x)0,y0) And point (x)1,y1) The distance of (d); calculating the parameter 2b of the ellipse for all points (x, y) satisfying the condition, establishing an accumulator and incrementing the accumulator;
(6) recording the accumulated value of the accumulator, if the accumulated peak value exceeds the set threshold value, the detected ellipse is a real ellipse, and storing the ellipse parameters into an array B;
(7) and removing all edge pixel points of the detected true ellipse from the array A, and clearing the accumulator.
6. The method for detecting insulator string breakage fault based on image recognition according to claim 2, wherein the fifth step comprises the following steps:
s5.1, preprocessing an image to obtain edge characteristics;
s5.2, positioning the single insulator based on improved Hough ellipse detection;
s5.3, insulator string detection based on random sampling consistency (RANSAC) straight line fitting:
s5.3a, selecting the center of an ellipse as a data point, taking any two points of the data point, and determining a straight line l;
s5.3b, counting points with the distance to the straight line l smaller than a threshold t according to a set threshold t, and setting a point set as a consistent set of the straight line l;
s5.3c, traversing all points in the graph, repeating the steps to obtain all straight lines l1,l2,…,lnA consistent set of (2);
s5.3d, taking the straight line with the maximum consistent set as a final fitting straight line, and determining the straight line as an insulator string;
and S5.4, counting the number of the single insulators, drawing a final fitting straight line on the detected insulator string and a consistent set of the straight line, counting the number of circle centers in the consistent set, and judging whether the insulator string is in a string-dropping fault according to a string number standard of the insulator string in the power system of the region.
CN202111487299.4A 2021-12-07 2021-12-07 Insulator string-dropping fault detection method based on image recognition Pending CN114359156A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111487299.4A CN114359156A (en) 2021-12-07 2021-12-07 Insulator string-dropping fault detection method based on image recognition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111487299.4A CN114359156A (en) 2021-12-07 2021-12-07 Insulator string-dropping fault detection method based on image recognition

Publications (1)

Publication Number Publication Date
CN114359156A true CN114359156A (en) 2022-04-15

Family

ID=81097517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111487299.4A Pending CN114359156A (en) 2021-12-07 2021-12-07 Insulator string-dropping fault detection method based on image recognition

Country Status (1)

Country Link
CN (1) CN114359156A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115588139A (en) * 2022-11-22 2023-01-10 东北电力大学 Power grid safety intelligent cruise detection method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115588139A (en) * 2022-11-22 2023-01-10 东北电力大学 Power grid safety intelligent cruise detection method
CN115588139B (en) * 2022-11-22 2023-02-28 东北电力大学 Power grid safety intelligent cruise detection method

Similar Documents

Publication Publication Date Title
CN111402248B (en) Power transmission line wire defect detection method based on machine vision
CN109753929B (en) High-speed rail insulator inspection image recognition method
CN111260616A (en) Insulator crack detection method based on Canny operator two-dimensional threshold segmentation optimization
CN106683075B (en) Method for detecting bolt defects at cross arm of power transmission line tower
WO2020224458A1 (en) Method for detecting corona discharge employing image processing
CN109345547B (en) Traffic lane line detection method and device based on deep learning multitask network
CN108734689B (en) Method for detecting scattered strands of conducting wires based on region growth
CN107679495B (en) Detection method for movable engineering vehicles around power transmission line
CN111814686A (en) Vision-based power transmission line identification and foreign matter invasion online detection method
CN110321933B (en) Fault identification method and device based on deep learning
CN110346699B (en) Insulator discharge information extraction method and device based on ultraviolet image processing technology
CN112149543B (en) Building dust recognition system and method based on computer vision
CN111008961A (en) Transmission line equipment defect detection method and system, equipment and medium thereof
CN108665464A (en) A kind of foreign matter detecting method based on morphologic high tension electric tower and high-tension bus-bar
CN107179479A (en) Transmission pressure broken lot defect inspection method based on visible images
CN108734704B (en) Transmission conductor strand breakage detection method based on gray variance normalization
CN112365475A (en) Power transmission line icing monitoring method and system based on image processing mode
CN115631116B (en) Aircraft power inspection system based on binocular vision
CN113065484A (en) Insulator contamination state assessment method based on ultraviolet spectrum
CN111008967B (en) Insulator RTV coating defect identification method
CN109523543A (en) A kind of wire strand breakage detection method based on Edge Distance
CN114445331A (en) Cable intermediate joint construction defect detection method, system and device based on image recognition
CN114359156A (en) Insulator string-dropping fault detection method based on image recognition
CN111667473A (en) Insulator hydrophobicity grade judging method based on improved Canny algorithm
CN111242923A (en) Canny operator-based insulator crack detection method based on maximum entropy threshold optimization

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination