The Study on the Power Transmission Line Icing Image Edge Detection based on DTW Measure Cluster Analysis

As a variety of different types of icing on power lines bring different degrees of harm to the power transmission lines, it is necessary to distinguish between them depending on ice cover feature, in order to adopt different strategies. Edge features are an important feature of power transmission line icing, in this paper for is discussed the image edge feature extraction difficult problem, according to the principles of image segmentation clustering analysis on the image of the sample for the Minkowski metric defects, with dynamic time warping (DTW) as the measure of inter-cluster analysis of samples similarity measure, this paper proposes a method of power transmission line based on DTW measure cluster analysis icing image edge feature extraction, clustering center of all clusters formed as the edge features of the a power transmission line icing image. Finally, experimental results show that this method can extract the power transmission line icing image edge features.


Introduction
Transmission Line Icing is a natural phenomenon, usually in the performance characteristics of icing into sleet, mixing rime, snow and frost and other types of ice, they have different causes.As the presentation of the state of different icing the power system has different level of hazards and the hazard range is not the same, it is necessary to cover the various types of ice out from the image feature extraction, to distinguish between different types of icing, icing for further processing foundation.Image features generally have a color feature, a texture feature, and shape and spatial relations characteristics in different research or applications, a selection of these images is not the same characteristics, and some use a particular feature, and some will use a variety of features, forming a large number of image feature extraction method [1][2][3][4].Since the transmission line icing single color information compares different types of icing in the texture feature, shape and spatial relationship between features exhibits its own unique characteristics, features integrated edge shape and spatial relationship between the two aspects characteristic, therefore transmission Line ice edge features of the image can be used as a basis for the classification icing process.In this paper, this feature is difficult to extract from the image edge according to the principles of image segmentation clustering analysis using DTW measure as an inter-cluster analysis of samples similarity measure on a proposed power transmission line based on DTW measure cluster analysis icing Edge feature extraction method, the center of all clusters formed as a clustering feature edge power transmission line icing image.

Image DTW measure
Minkowski distance, which is used to measure the difference between objects is expressed as: Where ,the formula (1) represent Euclidean distance, Manhattan distance and Chebyshev distance.On the basis of the Euclidean distance, cosine distance is defined as: Where ⋅ represents vector inner-product, represents the vector mode, the formula (2) represents the cosine of the angle between vectors X two vectors Y in the geometric space.The cosine distance extended to the Pearson correlation coefficient, expressed as: Where , x y are the means of vector X and vector Y.
Usually similarity is defined as the reciprocal of the distance, the greater the distance, the lower the similarity; conversely, the smaller the distance, the higher the similarity.Namely ( ) ( ) Y, X .Since Minkowski theory and calculations are very simple, it has a lot of applications in the similarity measure, but the image similarity use of Minkowski is mainly two questions: (1) The image translated, the image itself is not changed, but the change of the distance before and after its translation is very large, namely the Minkowski metric cannot be performed on image transforming.
(2) The image is scaled or rotated, but the image itself does not change, namely the Minkowski metric cannot be performed on image scaled or rotation.It will be described using four images, as shown: Where Figure 1a shows an image of 32x32 pixel size, the white part is the pattern, the pixel value of 255, the other part is black background, the pixel value is 0; Figure 1b is that Figure 1a   With Minkowski distance as similarity measure, which p = 2, Formula as follows: ( ) ( ) Where i mg u and i mg v are data matrixes of image u and v, i mg u [i,j] and i mg v [i,j] are the pixel values of the image u and v in i-th row and j-th column.According to the formula, we calculated the results, as shown in Table 1.From the table, it shows that: a, b between Figure 1a, 1b, 1c and 1d, namely Figure 1a is the most similar to Figure 1d than others.However, we observe that they should not be the most similar, the conclusion is unreasonable; a, b , the similarity would be a, b , that Figure 1d is more similar to Figure 1b than Since described above defects of Minkowski distance as the image similarity measure, paper introduce DTW measure, which was originally used for audio signal identification and now has been applied in many fields [5][6][7][8][9].If there are two vectors , , , , , , , , , , , which length with m and n , it can construct Where i j d( x , y ) is the distance between the i-th and j-th component of x and y ,which usually been named base distance.It defines a set of contiguous matrix elements in the matrix M collection: , , , , , If the elements meet the boundary, continuity and monotonicity requirement, it can be called a path.There are many path met the conditions, commonly used dynamic programming to find a path, it can be calculated by the following formula: Where ( ) is the distance between i-th and j-th component of x and y , the  2. From the table, it shows that: As it can be seen from the above analysis, the DTW distance measure can be resolved image similarity problem of image translation, image scaling and image rotation in Minkowski distance measure.

The image cluster analysis based on DTW measure
In various clustering algorithms, the k-means clustering algorithm has been widely used, which is simple in principle and able to solve most clustering tasks.It uses Euclidean distance to measure the similarity between objects, whose cluster center is the average value of each cluster.It should make changes in k-means clustering algorithm that the DTW distance been done the similarity between objects, as shown: With a set of images are the vectors of images expanded row by row or column by column.Given the definition: ( ) Where j i v is the j-th object of i-th cluster, i v is the center of i-th cluster, k is the number of clusters, i c is the number of objects of i-th cluster, obviously . . .k c c c n + + + = .The cluster analysis task is to find a cluster partition, so that the formula (10) to obtain the minimum.The steps as follows: 1) Initialization, according to the number of clusters, it randomly selects k elements in set V, as the initial center of k clusters{ , ， , ， ， , , the element j v and the center with minimum distance belong to the same cluster.A cluster partition would be , where such that the ( ) is not changed so far.The similar is high within the same cluster, otherwise is low.

The Icing Image Edge Detection
With the size of image beingw h × , the width of image is w and the height of image is h , so the image can be as a matrix with .With the size of feature image being m n × , it can build a sliding 2D-window with the size of m n × .The image is divided into ( ) ( ) − + overlapping images with the size of m n × ,so the image defined in the i-th row and j-th column of matrix A as shown: ( ) , : , : Where was constituted by elements of i-th to i+m-th rows and j-th to j+n-th columns in the matrix A,abbreviated as ( ) These images with size of m n × can be expand into a vector with length of m n × row by row or column by column, abbreviated as ( ) , i j V .The vectors are order marked ( ) With the elements of V as cluster analysis objects and the cluster analysis algorithm determined according to the formula (10), the images' similarity is high within the same cluster, otherwise is low.When the center of each cluster is extracted, these centers can be used as image feature.
In most cases, the size of the image is generally higher, compared to the size of the sliding window is generally small, so the number of sub-images formed by division is large; especially the use of DTW distance as the similarity measure, the calculation improves accuracy, but also an enormous amount of calculation, to ensure accuracy to reduce the number of objects involved in cluster analysis it is the most direct and effective way of reducing the amount of computation.In one image, not all pixels are feature, most of them are redundant, the paper builds a collection of images using the image corner feature, to greatly reduce the amount of computing cluster analysis.The image corner is generally defined as the intersection of two sides, the local neighborhood with two boundaries and direction of the different regions, which and the nature of the image edge features a close to nature, there are a lot of corner extraction methods, which reduce the number of objects involved in the calculation of clustering methods for many applications [10][11][12][13], the paper also use this method to reduce calculation.

Experiment
There are two transmission line icing images, having different edge features, as shown: Where the size of images being 542x358, Figure 2a and b, respectively, using ORB [14] to find their corners, respectively 81 and 189 corners, their position in the Figure 3, as shown below.It can be seen from the Figure 3 that the ORB corner are at the edge of covered ice part and background part, getting 81 and 189 images respectively with these corners as the center which width and height are 32 pixels.When the number of clusters is set to 16, after the DTW measure cluster analysis were obtained 16 cluster centers, as shown: The Figure 4a images can be seen are smooth, may represent the edge feature of the Figure 2a; the dramatic changes of the Figure 4b images in shape can be observed, can represent the edge feature of the Figure 2b.

Conclusion
In this paper, the image edge feature extraction difficult problem is discussed, according to the principles of image segmentation clustering analysis using DTW measure as an inter-cluster analysis of samples similarity measure is proposed a method of power transmission line based on DTW measure cluster analysis icing image edge detection, the clusters center be formed as the edge feature of the power transmission line icing image.Finally, through experiment that the transmission line icing images having different edge features show that this method can effectively extract power transmission line icing image edge features.
moved the white pattern down and right by 5 units of pixels; white pattern in Figure1cis that Figure1azoom out by 0.8 and rotated 45 degrees; Figure1dis white pattern of rectangle.According to common sense, we can observe in Figure1a, b and c have the same shape, it should have a high similarity, but in Figure1dshould be low similarity.

Figure 1 .
Figure 1.The images of illustrating the similarity measure

Figure 1a .
Figure 1a.The conclusion is unreasonable too.3) With ( ) ( ) di st di st < d, c a, c , y ) x y , this paper calculate the distances of image a, b, c and d by DTW distance measure, where the image matrix of 32x32 expanded to a vector with 1024 length row by row, as shown in Table , Figure 1 (c) would be similar to (a) and (b) than (d).

Figure 2 .
Figure 2. The Transmission Line Icing images

Figure 3 .
Figure 3.The ORB corner of the transmission line icing images

Figure 4 .
Figure 4. the cluster centers of the transmission line icing images

Table 1 .
The Euclidean distance of image a, b, c and d

Table 2 .
The DTW distance of image a, b, c and d