Summary of the invention
The technical problem to be solved in the present invention is, exist not enough at prior art, a kind of electric transmission line isolator On-line Discharge monitoring Fault Locating Method is proposed, it can carry out localization of fault fast to on-line monitoring institute images acquired, algorithm is easy, checking by experiment can present the insulator breakdown position in simple mode directly perceived on picture.
Technical scheme of the present invention is that described electric transmission line isolator On-line Discharge monitoring Fault Locating Method comprises:
(1) acquisition of image: obtain electric transmission line isolator RGB rgb image with existing infrared imaging, ultraviolet imagery or the technology of taking photo by plane;
(2) image pre-service: it is littler and do not lose the gray-scale map of effective information that described RGB rgb image is converted to the storage area; Utilize filtering algorithm to get rid of environmental interference information, i.e. denoising in the picture then;
(3) determine abort situation, step is:
A. utilize threshold method to extract an image: with the pixel definition of gray-scale map is gray-scale value, and gray-scale value size is 0-255, and wherein 0 is white, from 0 to 255 gradually from vain to ash, become black at last; Go out the number of times that each gray-scale value occurs among the 0-255 by statistics with histogram, obtain the histogram of the distribution of gray scale in the image, utilize the differentiation gray-scale value of the distribution failure judgement and the background of gray scale, should distinguish gray-scale value and be defined as threshold value; Find out this threshold value,
When the gray-scale value of image during greater than described threshold value pictorial element keep or be changed to 1; Pictorial element is lost and is changed to 0 when the gray-scale value of image is less than or equal to described threshold value, obtains the bianry image after threshold method is handled; Be expressed as follows with mathematical relation:
In the formula, (u is v) for handling back bianry image mid point (u, gray-scale value v) for H; (u v) is (u, gray-scale value v) before handling to D; D
0Be the threshold value of selecting, (u v) is the coordinate of image mid point;
B. detected image edge: gray-scale map is carried out marginalisation handles, the back bianry image is handled in marginalisation;
C. back bianry image negate (mirror image figure) is handled in bianry image and marginalisation after respectively threshold method being handled, gets the negate image of the bianry image after threshold method is handled and the negate image that the back bianry image is handled in marginalisation;
D. two width of cloth negate image overlay that will be obtained by step c obtain the fault target image.
Below the present invention made further specify.
In described step (2) the image pre-service, the wavelet analysis tool box of the filtering algorithm MATLAB of prior art provides the gang's algorithm that signal is carried out denoising, this paper adopts medfilt2 function (medium filtering) simple process, because emphasis of the present invention is in the trouble spot analytically, related Flame Image Process is mainly at fault and edge extracting, add suitable denoising function and can obtain more clearly handling the back image, can consult conventional images treatment technology data the detail knowledge of denoising.
Among described step (3) a, the principle of the selected foundation of threshold value is the sudden change of trouble spot pixel on the picture, for the fault picture, the trouble spot generally shows as the form of bright spot or hot spot, and tangible separation is arranged with respect to black background on every side, after we are gray-scale value with the pixel transitions of separation, the point of separation correspondence is left threshold value, utilize MATLAB to obtain the image size and make up once dual circulation, everyly be defined as white, all be defined as black, like this so that the human visual custom greater than threshold value less than setting threshold, algorithm has two kinds, one is that this is more accurate, is exactly in addition to select parameter by threshold function table automatic setting threshold value among the MATLAB by the artificial given threshold value of histogram, the effect that can not do well for some picture of the threshold value of Xuan Zeing by this method, the present invention preferentially adopts the former.
For passing through the artificial given threshold value of histogram, for example (referring to Fig. 2), because the trouble spot mostly is bright spot or hot spot greatly, there is black-ash-Bai continually varying gray-scale value to be quantified as 256 gray levels as handle, the scope of gray-scale value is 0-255, to shallow, the color in the correspondence image be from deceiving in vain from deeply in expression brightness.So the pixel near 255 gray scales shows as bright more on image more, as seen from Figure 2, reduce gradually after the gray-scale value 200 (hot spot accounts for the image scaled fraction on the correspondence image), and the gray-scale value still more saturated (background colour is in the great majority on the correspondence image) before 200, so can judge that greater than 200 later gray-scale values be the fault correspondence position, bring proof of algorithm by artificial observation into the 220-230 threshold value then, find that 230 can obtain spot size more clearly.
Among described step (3) b, for the fault picture, different with the handled emphasis of threshold method, threshold method is at the trouble spot, and rim detection is the profile at whole faulty equipment, and we need extract the edge of whole faulty equipment by rim detection, such as the joint number of insulator, the trouble spot that so comprehensive threshold method extracts just can know very clearly fault occurs on which joint of insulator actually.Because noise and fuzzy existence, the border at detected edge may broaden or be interrupted at certain some place, therefore rim detection comprises two substances, the marginal point of abstraction reaction grey scale change at first, reject some frontier point then or fill up the border and cut short a little, and these edges are connected into complete line.
The edge function that MATLAB Flame Image Process tool box provides can realize detecting the function at edge, and its syntax format is:
BW=edge (J, ' canny '), wherein J is a target image file, and canny is the canny operator of edge function)
Among the present invention,, the most important thing is in great amount of images information, to extract effective information, how to utilize these information interpretation images, see through the essence of phenomenon analysis fault for image detecting system.In order to analyze effectively and to understand image, often need given image and the image-region cut apart are removed garbage, and adopt more simple clear and definite numerical value, symbol or diagrammatic representation to come out useful information.The image information that electric system obtained because must there be influence in the complicacy of noise to image, for obtaining better monitoring effect, is carried out fault analysis more accurately, identification and location during actual monitoring, must carry out pre-service to gathering the image that comes.Usually adopt specific filtering method elimination picture noise, promptly image denoising is analyzed to judge the particular location of corona generation the pretreated image of process again.Existing image that imaging technique obtains is the rgb image of RGB mostly, the picture quality height, and this proposes very high request to Computer Processing.Be better analysis image, it is littler and do not lose image---the gray-scale map of effective information to need to change image into a kind of storage.With respect to the RGB image, the storage space that gray level image needs is little, and the position of corona discharge is determined not influence.
Among the present invention, threshold method has been adopted in the establishment of electric transmission line isolator abort situation.Threshold method is to select appropriate threshold that image is handled according to the intensity profile in the histogram.The RGB image becomes gray-scale map after treatment, the image size does not change, but originally position is become by a numerical value by pixel R (Red), G (Green), the B (Blue) of three numerical value decisions and determines that we are defined as gray-scale value with this numerical value, and size is 0-255.Wherein 0 be white, from 0 to 255 gradually from vain to ash, become black at last.Go out the number of times that each gray-scale value occurs among the 0-255 by statistics with histogram.Can see the distribution of gray scale in the image very intuitively by histogram, utilize the differentiation gray-scale value of the distribution failure judgement and the background of gray scale, we are called threshold value to it.Threshold method is found out this exactly and is distinguished gray-scale value, when the gray-scale value of image during greater than the threshold value selected pictorial element keep or be changed to 1; When the gray-scale value of image during less than the threshold value selected pictorial element lose and be changed to 0.
Among the present invention, the edge of image detection technique is extremely important for processing digital images, because the edge is the separatrix of target device to be extracted and background, extracting the edge could make a distinction target and background.In image, the border shows the termination of a characteristic area and the beginning of another characteristic area, the internal feature or the attribute of border institute separation region are consistent, and the feature of zones of different inside or attribute are different, the detection at edge confirms to utilize object and the difference of background on certain picture characteristics to realize that these differences comprise gray scale, color or unity and coherence in writing feature.In fact rim detection is exactly the position that the detected image characteristic changes.Its major advantage is to extract the exterior insulator feature more intuitively, detect under the little situation of images acquired noise the edge weak, may take place corona than the zonule, its shortcoming is that the fault position is not obvious, for the image background complexity abort situation that is not easily distinguishable.
The present invention with existing infrared imaging, ultraviolet imagery or the image that technology was obtained of taking photo by plane serve as research and process object, equipment under test is carried out multi-facetedly and long-time taking and adopting the zone technology of taking photo by plane to obtain the great amount of images data, according to existing threshold method and two kinds of mathematical image detection methods of Image Edge-Detection method, utilize that bit arithmetic is ingenious to overcome that both are not enough separately, proposed a kind of image-recognizing method after making improvements.
The present invention is directed to monitoring photo information, earlier true coloured picture sheet is converted into gray-scale map, can reduce deal with data like this and don't lose useful information, utilize filtering algorithm to get rid of environmental interference information in the picture (get rid of rapidly to disturb and show fault position in picture, the saving plenty of time) then as far as possible.Picture through denoising is the useful information picture, utilizing threshold method to extract an image earlier preserves, obtain an other image once more at the information picture then, utilize bit arithmetic to realize stack at last, the picture stack is only stayed the two-value picture of the clear position of failure message.By the relative merits of two kinds of methods of threshold method and Image Edge-Detection method are complementary comprehensive, it is not clear both to have overcome the threshold method abort situation, solve the unconspicuous problem of rim detection fault signature again, obtain a bianry image at last, image is simple, intuitive not only, and image storage space is little, and computing is also very fast, and is not high to hardware requirement.Can lay the foundation as setting up database, express-analysis discharge position, automatic digital assay failure cause etc. for follow-up work.
As known from the above, the present invention is a kind of electric transmission line isolator On-line Discharge monitoring Fault Locating Method, it can carry out localization of fault fast to on-line monitoring institute images acquired, and algorithm is easy, handles the acquisition localization of fault for the quick application image of electric system a kind of image recognition technology is provided.
Embodiment
Now detecting insulator joint fault with Fig. 1 infrared imagery technique is example:
Fig. 1 compute histograms is obtained image pattern 2, can find out from histogram, threshold value is generally greater than 200, and this paper is 230 for the threshold setting of Fig. 1, adopts the dual loop statement of MATLAB to remove threshold value and obtains after less than 230 pixel.
Find out that by Fig. 3 though algorithm has extracted fault-signal, region of discharge is obvious, can't obtain its particular location on electrical equipment, be not easy to maintenance and the maintenance of people electrical equipment.
Fig. 4 major advantage is to extract the exterior insulator feature more intuitively, detect under the little situation of images acquired noise the edge weak, may take place corona than the zonule, its shortcoming is that the fault position is not obvious, for the image background complexity abort situation that is not easily distinguishable.
Obtaining two width of cloth bianry images by above two kinds of methods all can not well react abort situation and obtain useful information, consider that its gained image slices vegetarian refreshments is 0 or 1, present technique adopts the MATLAB bit arithmetic, with threshold method gained image graph 3 and 4 negates of edge detection method gained image, obtain Fig. 5 and Fig. 6 earlier.
At last Fig. 5 and Fig. 6 two width of cloth bianry images are done and computing, be about to get targeted graphical shown in Figure 7 after this two width of cloth doubling of the image.
The realization of algorithm on MATLAB for the present invention relates to below:
% Flame Image Process original program
Clear; Close; % releasing memory capacity
I=imread (' E: STUDY MATLAB71 work tuxiangchuli TestD ', ' tif '); % opens image file, is example with the TestD fault
G=rgb2gray (I); % becomes gray level image with image by true coloured silk
G1=medfilt2(G);
Subplot (221); Imshow (G1); Title (' fault gray-scale map A '); Grid on; Gray level image after the % demonstration conversion
[x, y]=size (G1); % obtains the gray level image size
Subplot (222); Imhist (G); % shows histogram
G2=repmat (logical (uint8 (0)), x, y); % make up one with the big or small identical null matrix of source images, be used for depositing bianry image 0,1 data
For fanzhii=1:1:x% selects in the fault graph picture less than the gray-scale value of threshold value with a dual circulation, is set at 170 according to histogram thresholding in this example
for?fanzhij=1:1:y
IfG (fanzhii, fanzhij)>the 170%TestD threshold value is chosen as 170
G2(fanzhii,fanzhij)=1;
end
end
end
Subplot (222), imshow (~G2); Title (' handles A->B ' through threshold method); Grid on; The %G2 image is the bianry image after selecting through threshold method
%[BW, thresh]=edge (G, ' canny '); % carries out marginalisation by MATLAB acquiescence mode selected threshold to be handled
G3=edge (G1, ' canny ', 0.18); The % marginalisation is handled, and takes the canny operator, and the TestD value is 0.181
Subplot (223); Imshow (G3); Title (' is A->C ' after marginalisation is handled); Grid on; BWl=(~G2) ﹠amp; (~G3); % is by merging on the piece image two width of cloth images and display result subplot (224) with computing; Imshow (BW1); Title (' merges the back image '); Grid on; Imwrite (BW1, ' result2 ', ' gif '); % is saved to memory device with the result with the GIF form.