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
Email: yankanglove@126.com
Received April, 2013
ABSTRACT
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
Threshold Method
1. 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 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 [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 de-
tection 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 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 [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; mathe-
matical expression as follows:


2
Gxfxdx
SNR
f
xdx
(1)
Copyright © 2013 SciRes. EPE
K. YAN ET AL.
594
Among them,

f
x is the impulse response of filter
in boundary
 ; is edge function;

Gx
is
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:


''
'2
Gxfxdx
Localization
f
xdx
(2)
Among them, and
'
Gx

'
f
xare the first deriva-
tives of and
Gx

f
x, 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 expres-
sion as follows:
 

12
'2
'
fxdx
Df fxdx







(3)
Among them, is the average distance be-
tween two zero cross points.

'
Df
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:
22
2
1
(, )exp[]
2
2
x
y
Gxy


(4)
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-
tion.
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 [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 win-
dow, adaptive median filter is based on the degree of
noise interference adaptively adjusting the filter window
size [7].
y
S
Z
is a window of a image. Defined as follows:
min
Minimum gray of
y
S
max
Z
Maximum gray of
y
S
med
Z
Median gray of
y
S
xy
Z
Gray of the point(x, y)
max
S
The maximum window of
y
S
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
A
ZZ
2mmed ax
A
ZZ
If 1 and 2
0A0A
, then go to the Level B. Oth-
erwise, increase the window size.
If the window sizemax
S
, the Level A is repeated.
Otherwise, output
x
y
Z
.
Level B: 1mxy
BZ in
Z
2mxyax
BZ Z
If and
10B20B
, then output
x
y
Z
, Otherwise,
output .
med
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.
Z
4.2. Otsu Threshold is Used to Obtain the Thre-
shold
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 [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:
K
K
K
Assuming the gray value of an image is 1, .
The numbers of pixel with gray value is , then the
total numbers of pixel:
2,3m
i
ni
1
m
i
i
N
n
(5)
The probability of each gray value:
(1,2,3
i
n
Ni
N
)m
m
,
(6)
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
kW
Wk
(1,2, 3)W
kk (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
k
01
11
;
km
i
iik
LnL



i
n
i
p
(7)
The and is the probability of and :
0
w1
w0
W1
W
01
11
;
km
i
iik
wpw



(8)
The and are averages gray values of
and :
0
u
1
1
u0
W
W
0
1
k
ii
i
unp
0
w (9)
1
1
m
ii
ik
unp
1
w
2
(10)
The class separation distance of image:
2
01 01
()( )kwwuu
 (11)
Obviously, the class separation distance of image is
greater, the segmentation effect is better. The optimal
threshold as follows:
2
1
max( )
km
K
k

(12)
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-
tion;
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
edges.
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
Figure 2.
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
596
C
aditional canny operator is improved
[1] Z. C. Guan, et r Transmissio
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 opera-
tor. At the same time, the numbers of few false edges are
being reduced.
6. 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 the detected edge be stronger, but also re-
duces the probability of false edge.
REFERENCES
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,
2005,pp. 28-30.
[3] 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.
doi:10.1109/94.798123
[4] S. W. Wang, “Study on Insulation Characteristics of Or-
ganic Contamination Area Outside,” Ph. D. Thesis,
Tsinghua University, Beijing, 2001.
[5] 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
[6] 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
[7] R. C. Gonzalez and R. E. Woods, “Digital Image Proc-
essing,” 2th Edition, Prentice-Hall, New Jersey, 2001, pp.
103-113.
[8] S. J. Alex, “Adaptive Image Contrast Enhancement using
Generalizations of Histogram Equalization,” IEEE Trans-
actions on Image Processing, Vol. 9, No .5, 2000, pp.
889-896.