Edge Detection of Composite Insulators Hydrophobic Image Based on Improved Canny Operator

The detection of hydrophobicity is an important way to evaluate the performance of composite insulators, which is helpful to the safe operation of composite insulators. Image processing technology is used to judge the hydrophobicity of composite insulators, which makes detection results more accurate and overcomes the subjective drawbacks of traditional detection methods. As the traditional Canny operator requires manual intervention in selecting the variance of the Gaussian filter and the threshold, the paper presents a method of edge detection based on improved Canny operator. First, the adaptive median filter replaces the Gaussian filter, which can eliminate the impact from the variance of Gaussian filter and remove noise according to the characteristics of the image itself. Then the Ostu threshold method is used to select the best threshold automatically, which makes the edge detection be more continuous and reduce the presence of fake edges. The results show that the operator is applicable to all hydrophobic images.


Introduction
Composite insulators with good anti-pollution flashover performance have been widely used in the system of electric power.The excellent performance of composite insulators is mainly benefited from their own hydrophobicity and hydrophobicity transference.In the actual operation, the hydrophobicity of the composite insulators maybe descend or even lost, due to the influence of operating years, environmental changes and their own aging factors, which may lead to pollution flashover of transmission line [1].Therefore, it is necessary to detect the hydrophobicity of the composite insulators.
There are three methods detecting the hydrophobicity of the composite insulators: static contact angle method, surface tension method and spray grading method [2].As static contact angle method and surface tension method are very strict requirements on the test environment, they are mainly used to evaluate the conditions of composite insulators in the laboratory [3].Spray grading method is simple, rapid, and has been used in electrical system widely.However, its detection results are different for different operators.At present, digital image processing technology is applied to detect the hydrophobicity of composite insulators, which overcomes the different detection results caused by human subjectivity, and makes the detection results more objective and accurate [4].So some scholars begin to study it and achieve some results.However, these results are only suitable for the composite insulators whose backgrounds are clean, not very good to detect composite insulators with complex backgrounds.Considering the contamination and light, the paper presents an edge detection method of composite insulator hydrophobicity based on improved Canny operator, which is applicable to all hydrophobic images.

The Principle of Canny Operator
The edge detection method of Canny operator is to find topical maximum value of the image gradient, the gradient is calculated by the derivative of the Gauss filter.Canny operator should satisfy the three judgment criteria: signal-to-noise ratio criterion, positioning accuracy criterion and single-edge response criterion [5].
1) Signal-to-noise ratio criterion: the probability of the non-edge points is judged to be the edge points or edge points are judged to be non-edge points is low; mathematical expression as follows: the variance of Gauss noise.The signal-to-noise ratio is larger; the quality of the edge detection is higher.
2) Positioning accuracy criterion: the detected edge is as far as possible in the actual edge center; mathematical expression as follows: Among them, and , the value of is greater, the positioning accuracy is higher.
Localization 3) Single edge criterion: single edge is responded by only one pixel response.And the false response should be controlled as much as possible; mathematical expression as follows: Among them, is the average distance between two zero cross points.

 
Canny operator is the best edge detection operator based on three criteria.The process of the Canny operator is shown in Figure 1.

Defects of Canny Operator
In order to achieve de-noising purposes, the traditional Canny operator uses Gaussian filter to smooth image.Gaussian Smooth function as follows: It can be seen that the variance (δ) has a significant impact on smoothing image.If the δ was not appropriate, it may cause edge deletion.
The threshold of Canny operator also need artificial selection.If the threshold is improper, it will also cause edge absence or presence of false edges, which can't satisfy the real-time requirements in practical engineering.

The Edge Detection Algorithm of Improved Canny Operator
Aiming at the problem of Canny operator in selecting filter and threshold, the author introduces the adaptive median filter to instead Gauss filter, and uses the method of adaptive threshold setting to instead of artificial selection.
The improvements overcome the drawbacks of traditional detection methods which need artificial selection in selection of the Gaussian filter variance and threshold.

Adaptive Median Filter
The principle of median filter is a point's value being replaced of the mean value of each point in the point field [6].The neighborhood which uses a pixel for center point needs to be determined when the median filter processes an image, which is called for window.When the window is moved in the image, the noise of image can be removed.
Adaptive median filter is based on the median filter.Although they are all using a rectangular area as a window, adaptive median filter is based on the degree of noise interference adaptively adjusting the filter window size [7].

Otsu Threshold is Used to Obtain the Threshold
Otsu threshold method is an adaptive threshold determi-nation method, which is derived from the principle of least squares method [8] .With this method, an optimal threshold ( ) of an image can be obtained.The pixels of the entire image can be divided into the foreground and background with the , the difference between the foreground and background is the biggest by now.The process of optimal threshold ( ) acquisition is as follows: Assuming the gray value of an image is 1, .The numbers of pixel with gray value is , then the total numbers of pixel: The probability of each gray value: ( 1,2,3 Using the gradation value , the image can be divided into foreground 0 W and background 1 .The 0 contains all the pixels of gray values those are less than or equal to .The 1 contains all the pixels of gray values those are greater than .The L0 and L1 is the sum of the foreground pixels and the background pixels: The and is the probability of and : The and are averages gray values of and : The class separation distance of image: Obviously, the class separation distance of image is greater, the segmentation effect is better.The optimal threshold as follows: Otsu threshold method is introduced to the Canny operator, which makes the selection of image threshold have the adaptability.They can select the most appropriate threshold to detect the image edge according to their own characteristics, and the detected edges are continuous and fewer false.

Experimental Results and Analysis
The steps of the improved Canny edge detection algo-rithm as follows: 1) The adaptive median filter is used to reduce the noise of the image; 2) Using the finite difference of the first-order partial derivatives to calculate the gradient magnitude and direction; 3) The gradient amplitude and non-maxima are suppressed, only retains local maxima; 4) Using the Otsu threshold method to determine the optimal threshold value; 5) Using the optimal threshold to detect and connect edges.
In order to verify the validity of the algorithm, a large number of hydrophobic images are used to do the experiment in the paper.The treatment effects of the algorithm on HC1 ~ HC7 hydrophobic images are shown in The experimental results show that the improved [2] anny operator solves the lack of boundary due to the transparency of water, and makes the continuity of the detected edge be better than the traditional canny operator.At the same time, the numbers of few false edges are being reduced.

Conclusions
In the paper, the tr in selecting the variance of the Gaussian filter and the threshold, which overcomes the drawbacks of manual intervention in selecting the variance of the Gaussian filter and the threshold.The test results show that the improved canny operator is suitable for detecting the water on the polluted insulator.It not only makes the continuity of detected edge be stronger, but also reduces the probability of false edge.
of a image.Defined as follows: min  Minimum gray of xy S max Z  Maximum gray of xy S m ed Z  Median gray of xy S xy Z  Gray of the point(x, y) max S  The maximum window of xy S Adaptive median filtering consists of the first layer (Level A) and the second layer (Level B).The main algorithm is shown as follows: then go to the Level B. Otherwise, increase the window size.If the window size max Adaptive median filter not only removes noise according to the characteristics of the image itself, but also retains the details of edge, which makes the fuzzy region become clearer and improves the image quality.