Gray Standard Deviation Based Ultraviolet Image Segmentation for Electrical Equipment

In this paper, we propose an ultraviolet image segmentation method based on gray standard deviation for electrical equipment. It aims to extract the ultraviolet spot regions which can provide evidence to assess whether there is a discharge on the equipment. We firstly smooth the image to a specific scale space to strengthen the edge we want. Then we compute the standard deviation of each pixel to form a standard deviation image which is quickly achieved by an integral image. After a two-step adaptive segmentation by finding proper threshold and the verification of spot region characteristics, the spot regions can be quickly obtained. From the experiments, it can be seen that the algorithm is of low complexity and can meet the demands of filed detection for electrical equipment.


Introduction
As a way to detect the surface discharge of high voltage electrical equipment, ultraviolet (UV) imaging detection has been widely used to detect the potential danger of equipment. It can reduce the probability of fault and ensure the safe operation of electrical equipment.
A typical UV image can be shown in Figure 1. There are several UV spot regions around an insulator which implies corona discharge. We can divide a UV image into three parts according to the pixel characteristic: 1) the bright region, including the UV spot regions, the bright part of the electrical equipment (like the grading ring in Figure 1), and the sky region; 2) the dark edge region, which is the edge of the dark equipment part, like the edge of the insulator in Figure 1; 3) the dark flat region, like the inner region of the insulator in Figure 1.
To diagnosis whether there is a discharge, we should first segment the spot regions and find the regional properties to assess the situation of electrical equipment [1][2]. Different segmentation methods based on traditional image processing ways to extract the UV spot regions have been proposed [3][4]. However, due to the sky region and the bright equipment region, it's hard to find a proper threshold to get a good performance.
In recent years, the deep learning based segmentation method is the state-of-art way to get our target [5]. As a matter of fact, the spot region in a UV image actually has distinctive characteristic even in a complex background. Meanwhile, the deep learning method needs a large number of images to get the sample and is of high compute complexity. Therefore, using this kind of method is of less effective.
Therefore, in this paper, we propose a gray standard deviation method to extract the UV spot regions, it make full use of the structure characteristic of spot regions and is of low complexity.

Characteristic scale based ultraviolet image preprocessing
In order to reduce the influence of noise and highlight the UV spot region, it is necessary to smooth the ultraviolet image at its belonging feature scale. Here, we use the isotropic two-dimensional Gaussian smooth filter to pre-process the image, which can avoid the weakening of the spot region edge relative to a bright background as shown in Figure 1.
For an input UV image I(X), X=[x,y] T , its output smooth image can be shown in equation (1): Here, ( , ) gX is the Gaussian kernel function, σ is the scale parameter.
According to the characteristic scale selection method proposed by Lindeberg [6], different feature structures have different optimal smoothing scale σ to make sure that the structure can obtain its maximum spatial response. Here, we determine a minimum window size s and compute its corresponding σ. In this scale, UV spot regions with size smaller than s will be suppressed.
According to the scale selection method in SIFT [7], the relationship between s and σ is / 2 2 s   , and we take 1.2 as the scale changing base, scale parameters of different scale space can be represented as: i=0 means there is no smooth, which is just the original image.

UV spot region extraction based on gray standard deviation 2.2.1 Gray standard deviation.
In this paper, we adopt the concept gray standard deviation proposed in [8]. A gray standard deviation image S(X) is defined as the gray standard deviation of the (2k+1)×(2K+ 1) window with central point X in L(X).
Here, N is the number of pixels within the window, N= (2k+1)×(2k+1); μ k is the mean value of pixels within the window in image L, and the value of k is related to σ, which is almost 2σ.
The gray standard deviation can edge intensity of the pixel: If X is near the edge, and its S value is large; if the window is composed by pixels with similar gray value, which means X is in a flat region, its S value is small. To connect some relative weak edge, we further compute the mean image of gray standard deviation image. The mean gray standard deviation image M(X) is defined as: Here, μ k is the mean value of the (2k+1)×(2k+1) window in S, k is the same parameter with equation (4).
In Figure 1, the left part of the biggest spot region is beside a bright equipment part, which makes the left edge of this spot is too weak to be detected as shown in Figure 2(a). However, with our method with gray standard deviation, the left edge is easy to be recognized.
Compared with the traditional edge detection operator, the gray standard deviation has following advantages:  The computational complexity is low, and can be quickly achieved by an integral image;  Due to the consideration of neighbourhood pixels, weak edge can be strengthened by its neighbouring strong edge, and non-edge noise can be suppressed and smoothed by most background points within the window.

Target region extraction.
Similarly, there are mainly two kinds of pixels in M(X): the target region, which consists of the edge of the device with strong edges, the edge of the UV spot region and the holes wrapped inside them; the non-target region, which is away from the strong edges. Therefore, multiple target regions can be extracted by using otsu [9] to segment M. The holes with non-target pixels inside the target region are filled as target pixels. The binarized image are shown in Figure 3(a), and the filled image is shown in Figure 3 is the image with holed filled.

Multiple thresholds segmentation.
As mentioned in the introduction, a UV image can be divided into three parts. Still, each target region in F(X) still contains three kinds of regions. Each kind of part is corresponding to a concentrated gray range in the histogram, we can use an adaptive segmentation method to get the proper thresholds. The segmentation steps are as follows:  Compute the histogram of the whole region and get the threshold t, and get the mean value t m of pixels whose gray value is larger than t;  Then, take t m as a dividing point, pixels with value larger or smaller than it is segmented separately. Therefore, we can obtain two thresholds t 1 , t 2 .
The segmentation is processed on the original image I. The segmentation result of the first region of Figure 3(b) is shown in Figure 4.

Spot region verification.
After the multiple threshold segmentation, the bright parts are depart from the other two kinds of parts. However, the bright part of equipment and the sky region still remains. We can find the structure characteristics of spot regions from thousands of UV images, which is:  Gray values of pixels inside the spot region are extremely uniform, and almost equal to 255;  The shape the spot region is relative regular, which is close to a circle or an ellipse. Therefore, we choose the mean gray value, the rate of minor axis and major axis and the solidity of the region to verify the remaining regions. The final verification result is shown in Figure 5. We can see that the biggest spot region is perfectly extracted. Several small regions are neglected which we will discuss in the experimental section.

Evaluate criterion
The precision P and recall R can be used to evaluate the performance of the algorithm as shown in Figure 6. The red ellipse A indicates the marked region, and the green ellipse B indicates the extracted region. P and R are defined as: As there is usually no overlap between each spot area, the criterion is the same for each region and the whole image. Because the focus of the UV spot region segmentation is the big region around center of the image, the evaluation value of a UV image is the same with the biggest spot region.

Experimental results
From the whole procedure of this paper, we can find that the algorithm is of low complexity, the UV images can be processed in a computer with low-performance hardware.
We have collected 1000 UV images with resolution 640×480 for experiments, and the groundtruth images are labelled by hand. The evaluation results are shown in Table 1 1000-10000-∞] are set by taking the number of pixels as measurement. 'Global' means it is the mean value of all the images, 'Area Interval' implies the index of our defined four area intervals.
The global P and R show that our algorithm can meet the demands of reliable assessment of the UV image. For different area intervals, we can find P and R is relative low when the region area is small. It is because that we set a specific smooth scale, in that case, a tiny spot region would be likely to be suspended and not be detected. So, the value of R is quite low in the first area interval. Still, our main aim of the spot region extraction is the relative big region which means a larger photon counts. Therefore, the performance of our algorithm can meet the demands of the filed detection using UV imaging method.

Conclusion
In this paper, we have proposed a UV image spot region segmentation method for electrical equipment.
The gray standard deviation is adopted to find form an new gradient image which can strengthen the weak edge of the spot region. With the two-step segmentation and verification, sky region and bright equipment region in complex background can be removed. We have evaluated the algorithm with 1000 images, and the experimental results show its good performance. Furthermore, we aim to find a flexible and reliable way to assess the condition of the UV image.