Insulator self-explosion defect detection method based on projection curve analysis
Technical Field
The invention relates to the field of fault diagnosis of high-voltage wire insulator defects, in particular to a projection curve analysis-based insulator spontaneous explosion defect detection method.
Background
When the transmission line operates, the insulator is a special insulating control part and plays an important role in safe and stable operation of the transmission line. However, since the insulator is exposed to the open air for a long time, the insulator is very likely to have a failure such as spontaneous explosion and breakage due to the influence of the natural environment and heavy mechanical load. Once the insulator breaks down, hidden danger can be produced to transmission line's operation safety, can reduce transmission line's operating cycle when serious, can cause the power supply to break off even, the accident that takes place to have a power failure on a large scale causes huge loss of property. Therefore, the insulator condition is regularly monitored, the insulator fault can be effectively found and timely treated and replaced, and the method has important significance for the safe operation of a power system.
Traditional high voltage transmission equipment mode of patrolling and examining mainly uses the manual work to patrol and examine as the owner, and this kind of mode of patrolling and examining is inefficient, and some field of vision blind areas can't detect to power workman need climb the electricity tower, and intensity of labour is too big, and the security is low. At present, the technology for carrying out routing inspection and maintenance on high-voltage line equipment by utilizing an Unmanned Aerial Vehicle (UAV) is relatively mature in developed countries, the technology greatly reduces the labor cost and the labor intensity of workers, and the working efficiency is improved. Compare in traditional artifical pole-climbing mode of patrolling and examining, utilize unmanned aerial vehicle to patrol and examine the line and shoot, carry out analysis processes to the insulator according to image processing technique, and then realize the automated inspection insulator defect, can effectively reduce staff's burden, patrol and examine to transmission line is automatic to have realistic meaning. However, the existing detection technology has the problems of low precision and inaccurate defect positioning.
Disclosure of Invention
Aiming at the problems in the prior art, the invention creatively utilizes a super-pixel segmentation method of local texture characteristics to carry out super-pixel segmentation on a gray image and determine an insulator string candidate area; carrying out angle correction on the insulator string candidate region by using Hough transform to obtain a target region of the insulator string to be detected; and calculating the pixel proportion of pixel values in the insulator mask between the wave peak sections, carrying out self-explosion defect fault detection on the insulator string region, and positioning and identifying through a vertical projection method to accurately identify the fault point of the insulator string, thereby improving the identification rate and accuracy of the fault point of the insulator.
The technical scheme adopted for realizing the invention is as follows: a projection curve analysis-based insulator spontaneous explosion defect detection method is characterized by comprising the following steps:
(1) shooting an insulator string to be detected on an overhead tower power transmission line by an unmanned aerial vehicle to obtain an original image of the insulator string to be detected, wherein the original image of the insulator string to be detected comprises the insulator string and background information thereof, and the insulator string is an insulator assembly formed by serially connecting insulators with the same shape and size together through a core rod;
(2) graying the original image of the insulator string to be detected in the step (1) to obtain a gray image, performing superpixel segmentation on the gray image by using a superpixel segmentation method of local texture characteristics, determining an insulator string candidate region by combining an adaptive threshold method and image morphological operation, and storing the insulator string candidate region in a set I = { I = 1 ,I 2 ,...,I n N is the number of candidate regions;
(3) carrying out angle correction on the insulator string candidate regions in the step (2) by using Hough transform to obtain corrected images, carrying out vertical projection on each candidate region to obtain a projection curve graph, and analyzing the obtained curve graph to obtain a target region of the insulator string to be detected, wherein the method specifically comprises the following steps:
3.1 Using random consistent sampling to fit a main axis straight line of the candidate region, rotating the main axis of the candidate region to the horizontal direction, and starting traversing the insulator string candidate region set I, knowing that the insulator string candidate region image obtained in the step (2) is a binary image, knowing that pixel values corresponding to pixel points are only {0, 255} two values, and performing cumulative projection on pixel points with the pixel point value of 255 in the mask of the insulator candidate region image in the vertical direction to obtain a projection curve, wherein the pixel cumulative formula is as follows:
wherein S (x) represents a cumulative function of non-0 pixel values of the candidate area image mask of the insulator string in each column direction, (I, x) is a pixel point coordinate on the image, I (I, x) represents a pixel value of a pixel point (I, x) of a kth candidate area image, and r is a maximum line number corresponding to a two-dimensional matrix of the image mask along the horizontal direction;
3.2 To determine the candidate region as an insulator string, a sign determination function sgn (x) is set, and a difference component function Δ S (x) = S (x + 1) -S (x) is calculated to find a projection curve peak. The symbol decision function is formulated as follows:
when sgn (x) =0, a small part of straight line segments exist in a partial projection curve, so that the peak value of the projection curve cannot be conveniently extracted, the sgn (x) is traversed reversely, if the sgn (x + 1) ≧ 0, the sgn (x) =1 is set, otherwise, the sgn (x) = -1 is set; at this time, the original value of sgn (x) =0 is corrected, so as to extract the wave peak value of the projection curve at the later stage;
performing forward traversal on sgn (x), and knowing that when sgn (x + 1) -sgn (x) = -2, (x, S (x)) is a wave peak coordinate corresponding to the projection curve; storing the abscissa of the pixel points of all wave crests into a set x point ={x 1 ,x 2 ...x n In the formula, n is the number of peaks; computing a set x point Average projected cumulative value S of all peak points in the wave X_avgs And finding the maximum projected cumulative value S X_max (ii) a Peak point average projected cumulative value S X_avgs And a maximum projected cumulative value S X_max Respectively as follows:
setting peak threshold th =0.75 × s X_avgs +0.25*S X_max All the peak points of S (x) < th are dropped, and the set x is updated point And the peak mean value S X_avgs (ii) a Calculating the variance D of the peak value 2 The formula is as follows:
in the formula D 2 Representing the variance of the peak points, wherein n represents the number of the peak points;
setting variance threshold D th =5, candidate area decision formula is:
if the candidate area is an insulator string area, continuing to execute the next step, and if the candidate area is a non-insulator string area, returning to the step (2) to add 1 to the k value to continue to execute the next step;
(4) calculating the pixel proportion of pixel values in the insulator mask between the wave peak sections, and carrying out self-explosion defect fault detection on the insulator string region obtained in the step (3), wherein the method specifically comprises the following steps: considering from the insulator form wave structure, when the candidate area is an insulator string, after the image is vertically projected, the sudden change between two wave peak sections is found out according to a certain criterion as the position of the insulator with the self-explosion defect; from the sequence of peak points (x) 1 ,x 2 ,...x n ) Let g (x) be the pixel value of 255 in the insulator mask between peak segments p ) The pixel proportion is used as a characteristic for searching the self-explosion defect interval, and the pixel proportion formula is as follows:
in the formula, g (x) p ) Represents the pixel ratio, x, of 255 in the insulator mask between the peak sections p Is the p-th peak point in the sequence of peak points, row (I) k ) The width of the candidate region image of the ith insulator string in the set I is taken as the width of the candidate region image of the ith insulator string in the set I;
further, based on the fact that the self-explosion defect of the insulator has a small g (x) value, an insulator self-explosion defect position detection algorithm is constructed as follows:
4.1 Calculate area = (max (g (x)) p ))+min(g(x p ) )/2, wherein area is the number of intermediate ranges of g (x);
4.2 If)
Then the peak band [ x ] is indicated
p ,x
p+1 ]The self-explosion defect exists;
image mask I for insulator string in candidate region k And finally, inversely mapping the positions of the insulators detected under the coordinate system to an input image according to the variation relation between the image coordinates, and finishing the final positioning of the defects of the insulators of the image when the insulator string candidate region set I is traversed.
The super-pixel segmentation method of the local texture features comprises the following steps:
1) After converting an image from an RGB image into an LAB color space, initializing a clustering center, and calculating the similarity measurement D of two pixel points by combining texture features:
in the formula d c The color distance of two pixel points in Lab space, d s Is a spatial distance, d w The difference distance of the local texture features is obtained, s, m and c are constants, and the weights of the space, the color and the texture features in the similarity measurement are comprehensively represented;
wherein d is c ,d s ,d w Comprises the following steps:
in the formula, (l, a, b) represents pixel color characteristics, (x, y) is pixel space coordinates, and w is pixel texture characteristics;
2) Setting an undirected weighted graph G = { V, E } according to the obtained superpixel image, wherein V is a superpixel node set, E is an edge set formed by connecting edges of adjacent superpixels, and the shortest path edge weight value accumulation and calculation formula of any two superpixels comprises the following steps:
in the formula d g (r i ,r j ) Cumulative sum of edge weights representing the shortest path between any two superpixels, d c-lab (r i ,r j ) Is the mean color characteristic Euclidean distance, r, between two superpixels i 、r j Representing a super pixel node; computing superpixel boundary connectivity B con (r) the calculation formula is as follows:
in the formula B con (r) the connectivity of the super-pixel boundary is strong and weak, E (r) is the area of the geodesic distance weight expansion region, b is the number of pixels connected with the boundary in the statistical r, and when the super-pixel r is connected with the boundary, b is more than 0, otherwise, b =0;
and E (r) in the formula is as follows:
where norm is the normalization operation, exp represents an exponential function with the natural constant e as the base, σ is the equilibrium parameter and is set to σ =10;
3) Different weights are distributed according to the difference of the background super pixel characteristics, and the calculation formula is as follows:
in the formula B
p (r) is the weight of the background super pixel, which represents the strength of the background attribute.Calculating the saliency C of the superpixel based on the background prior in combination with the weight value
t (r
i ):
In the formula C t (r i ) Representing the saliency of a super-pixel, D c (r i ,r j ) Is a background super pixel r i And super pixel r j The color euclidean distance in LAB space of (a); n is a radical of hydrogen B Is the number of background superpixels; d spa (r i ,r j ) Is a background super pixel r i And super pixel r j The spatial distance of (a);
4) Setting the number of the super pixels as K, and respectively setting the K as 150,200 and 600 different scales, so that more local details can be reserved in significance detection while the overall structure information is reserved; performing multi-scale fusion on the significance of the three superpixels under different scales, determining a superpixel significance map through normalization, and finally denoising by utilizing bilateral filtering to obtain a final significance map;
5) And after obtaining the saliency map of the insulator image, performing binary segmentation on the image by using a self-adaptive threshold method, removing noise points in the image by combining morphological operation, calculating a connected domain in the map as a candidate region, marking the candidate region, and preparing for next insulator fault detection.
Drawings
FIG. 1 is a flow chart of a method for detecting self-explosion defects of insulators based on projection curve analysis;
FIG. 2 is a result image after super-pixel segmentation processing of local texture features in an embodiment of a projection curve analysis-based method for detecting self-explosion defects of insulators;
FIG. 3 is a result image obtained by binary morphological processing in an embodiment of a projection curve analysis-based method for detecting self-explosion defects of insulators;
FIG. 4 is a schematic diagram of a vertical projection of an insulator/non-insulator candidate region in an embodiment of a projection curve analysis-based insulator spontaneous explosion defect detection method;
fig. 5 is an image of the recognition result of the self-explosion defect position of the insulator in the embodiment of the method for detecting the self-explosion defect of the insulator based on projection curve analysis.
Detailed Description
The present invention will be described in further detail with reference to the accompanying fig. 1 to 5 and the embodiments, which are described herein for illustrative purposes only and are not intended to limit the present invention.
Referring to a flow chart of a projection curve analysis-based insulator spontaneous explosion defect detection method shown in fig. 1, the projection curve analysis-based insulator spontaneous explosion defect detection method comprises the following steps:
(1) shooting an insulator string to be detected on an overhead tower power transmission line by an unmanned aerial vehicle to obtain an original image of the insulator string to be detected, wherein the original image of the insulator string to be detected comprises the insulator string and background information thereof, and the insulator string is an insulator assembly formed by serially connecting insulators with the same shape and size through a core rod;
(2) graying the original image of the insulator string to be detected in the step (1) to obtain a gray image, performing superpixel segmentation on the gray image by using a superpixel segmentation method of local texture characteristics, as shown in fig. 2, determining an insulator string candidate region by combining an adaptive threshold method and image morphology operation, and storing the insulator string candidate region in a set I = { I = 1 ,I 2 ,...,I n N is the number of candidate regions;
the super-pixel segmentation method of the local texture features comprises the following steps:
2.1 After the image is converted into an LAB color space from an RGB image, initializing a clustering center, and calculating the similarity measurement D of two pixel points by combining texture features:
in the formula d c Is the color distance, d, of two pixels in Lab space s Is a spatial distance, d w The difference distance of the local texture features is obtained, s, m and c are constants, and the weights of the space, the color and the texture features in the similarity measurement are comprehensively represented;
wherein, d c ,d s ,d w Comprises the following steps:
in the formula, (l, a, b) represents pixel color characteristics, (x, y) is pixel space coordinates, and w is pixel point texture characteristics;
2.2 According to the obtained superpixel image, setting an undirected weighted graph G = { V, E }, wherein V is a superpixel node set, E is an edge set formed by connecting edges of adjacent superpixels, and the shortest path edge weight value accumulation and calculation formulas of any two superpixels have the following formulas:
in the formula d g (r i ,r j ) Cumulative sum of shortest path edge weights, d, representing any two superpixels c-lab (r i ,r j ) Is the mean color characteristic Euclidean distance, r, between two superpixels i 、r j Representing a superpixel node; computing superpixel boundary connectivity B con (r) the calculation formula is as follows:
in the formula B con (r) the connectivity of the super-pixel boundary is strong and weak, E (r) is the area of the geodesic distance weight expansion region, b is the number of pixels connected with the boundary in the statistical r, and when the super-pixel r is connected with the boundary, b is more than 0, otherwise, b =0;
and E (r) in the formula is as follows:
where norm is the normalization operation, exp denotes an exponential function with a natural constant e as the base, σ is the equilibrium parameter and is set to σ =10;
2.3 Different weights are assigned according to the difference of background super-pixel characteristics, and the calculation formula is as follows:
in the formula B
p (r) is the weight of the background superpixel, which represents the strength of the background attribute. Calculating the saliency C of the superpixel based on the background prior in combination with the weight value
t (r
i ):
In the formula C t (r i ) Representing the saliency of a super-pixel, D c (r i ,r j ) Is a background super pixel r i And a super pixel r j The color euclidean distance in LAB space of (a); n is a radical of hydrogen B Is the number of background superpixels; d spa (r i ,r j ) Is a background super pixel r i And super pixel r j The spatial distance of (a);
2.4 Setting the number of superpixels as K and setting the K as three different scales of 150,200 and 600 respectively, so that more local details can be reserved in significance detection while the overall structure information is reserved; carrying out multi-scale fusion on the significance of the three super-pixels under different scales, determining a super-pixel significance map through normalization, and finally denoising by utilizing bilateral filtering to obtain a final significance map;
2.5 After obtaining a saliency map of an insulator image, performing binary segmentation on the image by using an adaptive threshold method, removing noise points in the image by combining morphological operation, and calculating a connected domain in the map as a candidate region and marking the candidate region as shown in fig. 3 to prepare for next insulator fault detection.
(3) Performing angle correction on the insulator string candidate regions in the step (2) by using hough transform to obtain corrected images, performing vertical projection on each candidate region to obtain a projection curve graph, and analyzing the obtained curve graph to obtain a target region of the insulator string to be detected, as shown in fig. 4, specifically comprising:
3.1 Using random consistent sampling to fit a main axis straight line of the candidate region, rotating the main axis of the candidate region to the horizontal direction, and starting traversing the insulator string candidate region set I, knowing that the insulator string candidate region image obtained in the step (2) is a binary image, knowing that pixel values corresponding to pixel points are only {0, 255} two values, and performing cumulative projection on pixel points with the pixel point value of 255 in the mask of the insulator candidate region image in the vertical direction to obtain a projection curve, wherein the pixel cumulative formula is as follows:
wherein S (x) represents a cumulative function of non-0 pixel values of the candidate area image mask of the insulator string in each column direction, (I, x) is a pixel point coordinate on the image, I (I, x) represents a pixel value of a pixel point (I, x) of a kth candidate area image, and r is a maximum line number corresponding to a two-dimensional matrix of the image mask along the horizontal direction;
3.2 For determining the candidate region as the insulator string, a sign determination function sgn (x) is set, and a difference function Δ S (x) = S (x + 1) -S (x) is calculated for finding the peak of the projection curve. The sign decision function is formulated as follows:
when sgn (x) =0, a small part of straight line segments exist in a partial projection curve, so that the peak value of the projection curve cannot be conveniently extracted, the sgn (x) is traversed reversely, if the sgn (x + 1) ≧ 0, the sgn (x) =1 is set, otherwise, the sgn (x) = -1 is set; at this time, the original value of sgn (x) =0 is corrected, so as to extract the wave peak value of the projection curve at the later stage;
performing forward traversal on sgn (x), and knowing that when sgn (x + 1) -sgn (x) = -2, (x, S (x)) is a wave peak coordinate corresponding to the projection curve; storing the horizontal coordinates of the pixel points of all the wave crests to a set x point ={x 1 ,x 2 ...x n In which n is the number of peaks; computing a set x point Average projected cumulative value S of all peak points in the wave X_avgs And finding the maximum projected cumulative value S X_max (ii) a Peak point average projected cumulative value S X_avgs And a maximum projected cumulative value S X_max Respectively as follows:
setting peak threshold th =0.75 × s X_avgs +0.25*S X_max Deleting all the wave peak points with S (x) < th, and updating the set x point And the peak mean S X_avgs (ii) a Calculating the variance D of the peak value 2 The formula is as follows:
in the formula D 2 Representing the variance of the peak points, wherein n represents the number of the peak points;
setting a variance threshold D th =5, candidate region decision formula is:
if the candidate area is an insulator string area, continuing to execute the next step, and if the candidate area is a non-insulator string area, returning to the step (2) to add 1 to the k value to continue to execute the next step;
(4) calculating the pixel proportion of pixel values in the insulator mask between the wave peak sections, and carrying out self-explosion defect fault detection on the insulator string region obtained in the step (3), wherein the method specifically comprises the following steps: considering from the insulator form wave structure, when the candidate area is an insulator string, after the image is vertically projected, the sudden change between two wave peak sections is found out according to a certain criterion as the position of the insulator with the self-explosion defect; as shown in fig. 5, from a sequence of peak points (x) 1 ,x 2 ,...x n ) Let g (x) be the pixel value of 255 in the insulator mask between the peak sections p ) The pixel proportion is used as a characteristic for searching the spontaneous explosion defect interval, and the pixel proportion formula is as follows:
in the formula g (x) p ) Represents the pixel ratio, x, of 255 in the insulator mask between the peak sections p Is the p-th peak point in the sequence of peak points, row (I) k ) The width of the candidate region image of the ith insulator string in the set I is taken as the width of the candidate region image of the ith insulator string in the set I;
further, based on the fact that the self-explosion defect of the insulator has a small g (x) value, a self-explosion defect position detection algorithm of the insulator is constructed as follows:
4.1 Calculate area = (max (g (x)) p ))+min(g(x p ) ))/2, where area is the median of g (x);
4.2 If)
Then the peak band [ x ] is illustrated
p ,x
p+1 ]The self-explosion defect exists;
image mask I for insulator string in candidate region k The insulator position detected in the coordinate system can be finally mapped to the input image in an inverse manner according to the variation relation among the image coordinates, and when the insulator string candidate region set I is traversed, the image is completedAnd finally positioning the insulator defect.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, many modifications and adaptations can be made without departing from the principle of the present invention, and should be considered as the protection scope of the present invention.