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 an insulator self-explosion defect detection method based on projection curve analysis.
Background
When the power transmission line operates, the insulator is a special insulating control and plays an important role in safe and stable operation of the power 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, insulator faults can be effectively found and timely replacement can be processed, and the method has important significance for safe operation of a power system.
Traditional high voltage transmission equipment patrols and examines the mode and mainly uses the manual work to patrol and examine as the main, and this kind of mode inefficiency of patrolling and examining, some field of vision blind areas can't detect to electric power workman need climb the electricity tower, 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:
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 connecting insulators with the same shape and size in series through a core rod;
performing graying processing on the original image of the insulator string to be detected in the step I to obtain a grayscale image, performing superpixel segmentation on the grayscale 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 ═ I1,I2,...,InN is the number of candidate regions;
thirdly, angle correction is carried out on the insulator string candidate regions in the second step by utilizing Hough transform to obtain corrected images, vertical projection is carried out on each candidate region to obtain a projection curve graph, and the obtained curve graph is analyzed to obtain a target region of the insulator string to be detected, wherein the method specifically comprises the following steps:
3.1) fitting a main shaft straight line of the candidate region by random consistent sampling, rotating the main shaft 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 two is a binary image, knowing that pixel values corresponding to pixel points are only {0, 255} two values, and carrying out accumulated projection on the pixel points with the pixel point value of 255 in the mask of the insulator candidate region image according to the vertical direction to obtain a projection curve, wherein the pixel accumulation 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 the pixel point coordinate on the image, I (I, x) represents the pixel value of the pixel point (I, x) of the kth candidate area image, and r is the maximum line number corresponding to the image mask two-dimensional matrix along the horizontal direction;
3.2) in order to determine that the candidate region is an insulator string, a sign determination function sgn (x) is set, and a difference quantity function Δ S (x) ═ S (x +1) -S (x) is calculated and used for searching a projection curve peak. The symbol decision function is formulated as follows:
when sgn (x +1) ≧ 0, sgn (x) is set to be 1, otherwise sgn (x) is set to be-1; at this time, the original value of sgn (x) is corrected to 0, so as to extract the peak value of the projection curve in the later period;
performing forward traversal on sgn (x), which means that when sgn (x +1) -sgn (x) -2, (x, s (x)) is a peak coordinate corresponding to the projection curve; storing the horizontal coordinates of the pixel points of all the wave crests to a set xpoint={x1,x2...xnIn (c) } the reaction solution is,wherein n is the number of wave crests; computing a set xpointAverage projected cumulative value S of all peak points in the waveX_avgsAnd finding the maximum projected cumulative value SX_max(ii) a Peak point average projected cumulative value SX_avgsAnd a maximum projected cumulative value SX_maxRespectively as follows:
setting the peak threshold th to 0.75SX_avgs+0.25*SX_maxAll the peak points of S (x) < th are dropped, and the set x is updatedpointAnd the peak mean SX_avgs(ii) a Calculating the variance D of the peak value2The formula is as follows:
in the formula, D2Representing the variance of the peak points, wherein n represents the number of the peak points;
setting variance threshold DthAs 5, the 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 II to add 1 to the k value for continuing to execute the step II;
fourthly, 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 third step, wherein the self-explosion defect fault detection 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 a sequence of peak points (x)1,x2,...xn) Setting the pixel value in the insulator mask between the peak sections as255 is g (x)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 sectionspIs 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 value of g (x), constructing an algorithm for detecting the self-explosion defect position of the insulator as follows:
4.1) calculate area ═ max (g (x)p))+min(g(xp) 2, where area is the median 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 regionkAnd finally, inversely mapping the positions of the insulators detected in the coordinate system to an input image according to the change 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 dcIs the color distance, d, of two pixels in Lab spacesIs a spatial distance, dwFor local textureThe characteristic difference distance s, m and c are constants and comprehensively represent the weight of space, color and texture characteristics in similarity measurement;
wherein d isc,ds,dwComprises 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) and 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 dg(ri,rj) Cumulative sum of shortest path edge weights, d, representing any two superpixelsc-lab(ri,rj) Is the mean color characteristic Euclidean distance, r, between two superpixelsi、rjRepresenting a superpixel node; computing superpixel boundary connectivity Bcon(r) the calculation formula is as follows:
in the formula Bcon(r) super-pixel boundary connectivity strength, E (r) is geodesic distance weight expansion area surfaceB is the number of pixels connected with the boundary in the statistics r, when the superpixel r is connected with the boundary, b is greater than 0, otherwise, b is 0;
and E (r) in the formula is as follows:
where norm is a normalization operation, exp denotes an exponential function with a natural constant e as the base, σ is an 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 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 Ct(ri) Representing the saliency of a super-pixel, Dc(ri,rj) Is a background super pixel riAnd super pixel rjThe color euclidean distance in LAB space of (a); n is a radical ofBIs the number of background superpixels; dspa(ri,rj) Is a background super pixel riAnd super pixel rjThe spatial distance of (a);
4) setting the number of super pixels as K and setting K as three different scales of 150,200 and 600 respectively, so that more local details can be reserved in significance detection while integral 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 insulator spontaneous explosion defect detection method;
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:
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 connecting insulators with the same shape and size in series through a core rod;
② opposite stepsGraying the original image of the insulator string to be detected 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 morphological operation, and storing the insulator string candidate region in a set I ═ { I ═ I { (I) }1,I2,...,InN 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 dcIs the color distance, d, of two pixels in Lab spacesIs a spatial distance, dwThe 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 isc,ds,dwComprises 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) 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:
in the formula dg(ri,rj) Cumulative sum of shortest path edge weights, d, representing any two superpixelsc-lab(ri,rj) Is the mean color characteristic Euclidean distance, r, between two superpixelsi、rjRepresenting a superpixel node; computing superpixel boundary connectivity Bcon(r) the calculation formula is as follows:
in the formula Bcon(r) the connectivity of the super-pixel boundary is strong and weak, E (r) is the area of the geodesic distance weight expansion area, b is the number of pixels connected with the boundary in the statistical r, when the super-pixel r is connected with the boundary, b is more than 0, otherwise, b is 0;
and E (r) in the formula is as follows:
where norm is a normalization operation, exp denotes an exponential function with a natural constant e as the base, σ is an equilibrium parameter and is set to 10;
2.3) distributing different weights according to the background super-pixel characteristic difference, wherein 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. Combining the weightsValue-based background prior computation of saliency C of superpixels
t(r
i):
In the formula Ct(ri) Representing the saliency of a super-pixel, Dc(ri,rj) Is a background super pixel riAnd super pixel rjThe color euclidean distance in LAB space of (a); n is a radical ofBIs the number of background superpixels; dspa(ri,rj) Is a background super pixel riAnd super pixel rjThe spatial distance of (a);
2.4) setting the number of the super pixels 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; 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;
2.5) after obtaining the saliency map of the 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.
Thirdly, angle correction is carried out on the insulator string candidate regions in the second step by using Hough transform to obtain corrected images, vertical projection is carried out on each candidate region to obtain a projection curve graph, and the obtained curve graph is analyzed to obtain a target region of the insulator string to be detected, wherein the method specifically comprises the following steps:
3.1) fitting a main shaft straight line of the candidate region by random consistent sampling, rotating the main shaft 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 two is a binary image, knowing that pixel values corresponding to pixel points are only {0, 255} two values, and carrying out accumulated projection on the pixel points with the pixel point value of 255 in the mask of the insulator candidate region image according to the vertical direction to obtain a projection curve, wherein the pixel accumulation 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 the pixel point coordinate on the image, I (I, x) represents the pixel value of the pixel point (I, x) of the kth candidate area image, and r is the maximum line number corresponding to the image mask two-dimensional matrix along the horizontal direction;
3.2) in order to determine that the candidate region is an insulator string, a sign determination function sgn (x) is set, and a difference quantity function Δ S (x) ═ S (x +1) -S (x) is calculated and used for searching a projection curve peak. The symbol decision function is formulated as follows:
when sgn (x +1) ≧ 0, sgn (x) is set to be 1, otherwise sgn (x) is set to be-1; at this time, the original value of sgn (x) is corrected to 0, so as to extract the peak value of the projection curve in the later period;
performing forward traversal on sgn (x), which means that when sgn (x +1) -sgn (x) -2, (x, s (x)) is a peak coordinate corresponding to the projection curve; storing the horizontal coordinates of the pixel points of all the wave crests to a set xpoint={x1,x2...xnIn the formula, n is the number of peaks; computing a set xpointAverage projected cumulative value S of all peak points in the waveX_avgsAnd finding the maximum projected cumulative value SX_max(ii) a Peak point average projected cumulative value SX_avgsAnd a maximum projected cumulative value SX_maxRespectively as follows:
setting the peak threshold th to 0.75SX_avgs+0.25*SX_maxAll the peak points of S (x) < th are dropped, and the set x is updatedpointAnd the peak mean SX_avgs(ii) a Calculating the variance D of the peak value2The formula is as follows:
in the formula, D2Representing the variance of the peak points, wherein n represents the number of the peak points;
setting variance threshold DthAs 5, the 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 II to add 1 to the k value for continuing to execute the step II;
fourthly, 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 third step, wherein the self-explosion defect fault detection 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,x2,...xn) Let g (x) be the pixel value of 255 in the insulator mask between the peak sectionsp) 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) Representing a pixel value of 255 in an insulator mask between peak segmentsPixel ratio, xpIs 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 value of g (x), constructing an algorithm for detecting the self-explosion defect position of the insulator as follows:
4.1) calculate area ═ max (g (x)p))+min(g(xp) 2, where area is the median 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 regionkAnd finally, inversely mapping the positions of the insulators detected in the coordinate system to an input image according to the change 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 foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.