Energy and Power Engineering, 2013, 5, 593-596
doi:10.4236/epe.2013.54B114 Published Online July 2013 (http://www.scirp.org/journal/epe)
Edge Detection of Composite Insulators Hydrophobic
Image Based on Improved Canny Operator
Kang Yan, Fochi Wang , Zhongyuan Zhang, Ningcai Li, Fangcheng Lv
Hebei Provincial Key Laboratory of Power Transmission Equipment Security Defense,
North China Electric Power University, Baoding, China
Received April, 2013
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 tradi-
tional 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 Gaus-
sian 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.
Keywords: Composite Insulators; Hydrophobicity; Canny Operator; Edge Detection; Adaptive Median Filter; Ostu
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 hydropho-
bicity and hydrophobicity transference. In the actual op-
eration, the hydrophobicity of the composite insulators
maybe descend or even lost, due to the influence of oper-
ating years, environmental changes and their own aging
factors, which may lead to pollution flashover of trans-
mission line . 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 . 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 . 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 de-
tection results caused by human subjectivity, and makes
the detection results more objective and accurate. So
some scholars begin to study it and achieve some results.
However, these results are only suitable for the compos-
ite insulators whose backgrounds are clean, not very
good to detect composite insulators with complex back-
grounds. Considering the contamination and light, the
paper presents an edge detection method of composite
insulator hydrophobicity based on improved Canny op-
erator, which is applicable to all hydrophobic images.
2. The Principle of Canny Operator
The edge detection method of Canny operator is to find
topical maximum value of the image gradient, the gradi-
ent is calculated by the derivative of the Gauss filter.
Canny operator should satisfy the three judgment criteria:
signal-to-noise ratio criterion, positioning accuracy crite-
rion and single-edge response criterion .
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; mathe-
matical expression as follows:
Copyright © 2013 SciRes. EPE
K. YAN ET AL.
x is the impulse response of filter
; is edge function;
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
xare the first deriva-
tives of and
x, the value of
is greater, the positioning accuracy is higher.
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 expres-
sion as follows:
Among them, is the average distance be-
tween two zero cross points.
Canny operator is the best edge detection operator
based on three criteria. The process of the Canny opera-
tor is shown in Figure 1.
3. 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.
Figure 1. Canny operator flow chart.
4. 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 selec-
The improvements overcome the drawbacks of tradi-
tional detection methods which need artificial selection
in selection of the Gaussian filter variance and threshold.
4.1. 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 . 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 win-
dow, adaptive median filter is based on the degree of
noise interference adaptively adjusting the filter window
is a window of a image. Defined as follows:
Minimum gray of
Maximum gray of
Median gray of
Gray of the point(x, y)
The maximum window of
Adaptive median filtering consists of the first layer
(Level A) and the second layer (Level B). The main al-
gorithm is shown as follows:
Level A: 1mmed in
If 1 and 2
, then go to the Level B. Oth-
erwise, increase the window size.
If the window sizemax
, the Level A is repeated.
Level B: 1mxy
, then output
Adaptive median filter not only removes noise ac-
cording 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.
4.2. Otsu Threshold is Used to Obtain the Thre-
Otsu threshold method is an adaptive threshold determi-
Copyright © 2013 SciRes. EPE
K. YAN ET AL. 595
nation method, which is derived from the principle of
least squares method  .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:
Using the gradation value , the image can be di-
vided 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:
2, 3)kk m
The and is the probability of and :
The and are averages gray values of
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 op-
erator, which makes the selection of image threshold
have the adaptability. They can select the most appropri-
ate threshold to detect the image edge according to their
own characteristics, and the detected edges are continu-
ous and fewer false.
5. 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 direc-
3) The gradient amplitude and non-maxima are sup-
pressed, 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
In order to verify the validity of the algorithm, a large
number of hydrophobic images are used to do the ex-
periment in the paper. The treatment effects of the algo-
rithm on HC1 ~ HC7 hydrophobic images are shown in
Original image Canny Improved Canny
Figure 2. The results of HC1-HC7 image edge detection.
Copyright © 2013 SciRes. EPE
K. YAN ET AL.
Copyright © 2013 SciRes. EPE
aditional canny operator is improved
 Z. C. Guan, et r Transmissio
The experimental results show that the improved 
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 opera-
tor. At the same time, the numbers of few false edges are
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 the detected edge be stronger, but also re-
duces the probability of false edge.
al, “Insulator and Powen and
Transformation Equipment External Insulation,” 1th Edi-
tion, Tsinghua University Press, Beijing, 2006, pp. 11-20.
W. Song, et al,“On-line Detection Methods of Composite
Insulator,” High Voltage Engineering, Vol. 3, No. 5,
 R. Barsch, H. Jahn and J. Lambrecht, “Methods for Poly-
meric Insulating Materials for Outdoor HV Insulation,”
IEEE Transactions on Dielectrics and Electrical Insula-
tion, Vol. 6, No. 5, 1999, pp. 668-675.
 S. W. Wang, “Study on Insulation Characteristics of Or-
ganic Contamination Area Outside,” Ph. D. Thesis,
Tsinghua University, Beijing, 2001.
 Z. C. Wang, X. D. Liu and L. X. Xue, “Improved Method
of Canny Operator Edge Detection,” Computer engineer-
ing and Application, Vol. 46, No. 34, 2010, pp. 202-205
 N. C. Gallagher and G. L. Wise, “A Theoretical Analysis
of Properties of the Median Filters,” IEEE Transactions
on Acoustics Speech, Signal Processing, Vol. 29, No.1,
1981, pp. 1136-1141. doi:10.1109/TASSP.1981.1163708
 R. C. Gonzalez and R. E. Woods, “Digital Image Proc-
essing,” 2th Edition, Prentice-Hall, New Jersey, 2001, pp.
 S. J. Alex, “Adaptive Image Contrast Enhancement using
Generalizations of Histogram Equalization,” IEEE Trans-
actions on Image Processing, Vol. 9, No .5, 2000, pp.