<figure><img src="image_1.png" /></figure>

HAL
open science

# Research of SF6 Pressure Gauge Automatic Reading Methods Based on Machine Vision

Song Yao, Liu Chunhong, Deng Qiao, Wang Yixuan

► To cite this version:

Song Yao, Liu Chunhong, Deng Qiao, Wang Yixuan. Research of SF6 Pressure Gauge Automatic Reading Methods Based on Machine Vision. 8th International Conference on Computer and Computing Technologies in Agriculture (CCTA), Sep 2014, Beijing, China. pp.534-545, 10.1007/978-3-319-19620-6_60. hal-01420269

HAL Id: hal-01420269

https://inria.hal.science/hal-01420269

Submitted on 20 Dec 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Research of SF6 Pressure Gauge Automatic
Reading Methods Based on Machine Vision

Song Yao<sup>1,2</sup>, Liu Chunhong<sup>1,3</sup>, Deng Qiao<sup>1,2</sup>, Wang Yixuan<sup>4</sup>

¹ College of Information and Electrical Engineering, China Agricultural University,
Beijing, P.R.China, 100083

Tel.:+86-010-62736764,Sophia_liu@cau.edu.cn

<sup>2</sup> Modern Precision Agriculture System Integration Research Key Laboratory of Ministry of
Education, Beijing, P.R.China, 100083

³ Key Laboratory of Agricultural information acquisition technology(Beijing),Ministry of Agriculture,Beijing,P.R.China,100083

⁴State Grid Beijing Electric Power Company, Beijing, P.R.China, 100031

**Abstract:** With the rapid development of artificial intelligence and pattern recognition, digital image processing and recognition technologies become a popular research direction, especially, the using of it is quite extensive in power industry. Among various using, dashboard automatic reading is an important part of routing inspection of substation system by using robot. Automatic reading of SF6 pressure gauge pointer is based on image processing and automatic reading techniques, avoiding the influence of subjective factors of naked eye judgment. Designing and analyzing of identification algorithm of SF6 meter pointer are shown in this paper. First, pre-processing operations were operated on the instrument image by using gray level transformation equalization and binarization to improve image quality, by using Hough line detection to realize pointer line extraction; determining the number by using the straight-line in mathematics. This traditional method of using morphological and Hough line detection method to determine reading have certain bias, so the using of Hough circle detection methods and centroid detection methods were proposed. The results showed that the improved method has greatly improved the accuracy of the readings, the method has better accuracy than traditional standard line Hough detection method.

**Key words:** SF6 pressure gauges; Hough detection; centroid detection; automatic identification

# 1 Introduction

With the rapid growth of economic, electricity is in demand sharply arise, the power supply appears tight trend, reliable operation of electrical equipment is very important[1]. Detection of Power Meter becomes more and more important.

Currently, many pointer instruments are in the configuration of the power system substation, such as: pressure gauge, oil temperature gauge, lightning protector, etc. A large number of meter data depends mainly on the human eye observation, heavy
labor need to be resolved. Assuming substation encountered harsh geographical conditions, high temperature, high altitude, arctic and other artificial outdoor work is very difficult. With the development and application of intelligent substation inspection robot[2], reading of meters have been improved to be automatic, using power equipment to detect and identify electrical safety hazards and removed promptly.

In order to be able to make better use of existing substations intelligent inspection system, based on the existing inspection system, using machine vision image processing and pattern recognition techniques to identify inspection equipment for automatic analysis whether be faulty or there is a security device hidden under the circumstances, notify the staff the cause of the alarm fault location and faulty equipment immediately, while providing video data to staff to be analyzed to help determine and judge[3].

SF6 (Sulfur Hexafluoride) gas has excellent insulating property and arc performance, so SF6 is used in electrical devices extensively. Most current domestic power companies have adopted SF6 circuit breaker. Identification of SF6 pressure gauge can intuitively and accurately reflect the true state of the electrical equipment. In order to monitor and maintenance substation, gauge reading identification, monitoring, and electrical equipment of SF6 has great practical significance. Therefore, developing a suitable substation inspection robot/SF6 pointer instrument quickly and accurately is important for automatic identification systems. Using machine vision technology for image recognition instrument automatically determines the location of the meter and the reading pointer above is the core technology of the system.

## 2 Pointer Recognition Algorithm

Pointer recognition algorithm is the core of the automatic identification system, including three parts: preprocessing of image, pointer recognition, reading calculation, as described below:

### 2.1 Image preprocessing

Placed in the outdoor substation instrumentation, instrument inspection robot shooting angle image acquisition is extremely important. Shaded spot light changes and other equipment shelter, uneven brightness of image acquisition, if a straight line or circle detection, it may be included among the roughly circular parts when making circle detection error detection, or by light affect the test you want to get straight is not a pointer, so we only consider the positive SF6 gauge shot. Meanwhile, the instrument will be affected by the environment, the dial may be blurred, or even the naked eye can not see the pointer, the read pointer of the instrument dial when needed for image pre-processing, post-pointer to identify efficient, accurate, and its main steps shown in Figure 1 shows, image preprocessing shown in Figure 2.
<figure><img src="image_3.png" /><figcaption>Fig.1. The overall method chart</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>Fig.2. Color image of SF6 pressure gauge</figcaption></figure>

### 2.1.1 Image Gray processing

In order to extract pointer needed for image segmentation, interference background must be removed. Transforming color image to gray-scale, using the average standard method [4], where g represents gray gradation value of formula (1) as follows:

$$g=0.30R+0.59G+0.11B \quad (1)$$

### 2.1.2 Image Enhancement

Acquisition and transmission for dash-board image are easy to be influent by noise and interference to various degrees. In the case of low SNR, this will causes decline in image quality and image blur. In order to eliminate the effects of noise, choose the appropriate method of image noise reduction processing is a reasonably important part of the reading pointer identification.

Histogram equalization[5] is acorrection of the original image by the transformation function to a uniform histogram equalization to the original image. After equalization process, the histogram of the image is flat, i.e., having the same frequency, since the uniform gray has even probability distribution, the image looks more sharp.
### 2.1.3 Binarization

In order to extract pointer from complex background after equalization, binarization[5] process will be carried on the gray image. Binary differentiate spixels into black and white in the image according to the given threshold. The Detail method: Define a template area whose size is (2w + 1) × (2w + 1), at the same time define (x, y) coordinates as the center of the template, define f(x, y) as the center of gray image, T (x, y) as the center binarization threshold, calculating threshold value for each pixel according to formula (2), binarized gray image according to equation (3) as follows:

$$T(x, y) = \frac{1}{(2w+1)^2} \sum_{k=-w}^{w} \sum_{l=-w}^{w} f(x+k)y+l \quad (2)$$

$$I(x, y) = \begin{cases} 1, & \text{if } f(x, y) \ge T \\ 0, & \text{if } f(x, y) < T \end{cases} \quad (3)$$

Where I(x,y) is the image intensity of each pixel after binarization. After adaptive thresholding algorithm was used for image binarization, some noise was filtered, but the results are not satisfactory. Considering SF6pressure gauge dial has three large regions, ie, the red area, the white area and green area, while the pointer is black, and in the actual interpretation, reading of pointer will be affected by environment, so we use manual threshold, the lower the threshold, the extraction of the black pointer will be more obvious. Here we set the threshold value as 50 in a binarization process, so that if any changes in the external environment will not affect its accuracy.

### 2.1.4 Expansion and Corrosion

Binarized pointer may appear intermittently, so we use morphological dilation and erosion [5] methods to solve it. Corrosion is a process to eliminate boundary point so that boundary points will be shrink to internal. Expansion is the dual operation to corrosive, it is the expansion process to external boundary, so it can be used for the gap filler. After the expansion and corrosion, the pointer will be more complete and clear.

### 2.1.5 Thinning

Skeleton extraction method is thinning[5], prerequisite requirements is the topological of image remains unchanged. By thinning, the rough edge line from the outside in each pixel was stripped layer by layer, to obtain a final set of linking pixels, the set of points is called a skeleton image. Ensure to get the continuity and the main framework for skeleton topology are the biggest advantage of thinning algorithm.
## 2.2 Pointer Identification

### 2.2.1 Hough line detection

The basic idea of Hough transform [6] is to use the duality of lines and points. It uses the global characteristics, therefore the less noise, the more robust. Using polar coordinates to describe the linear equation Equation (4), with the following Hough transform functions:

$$ \rho = x\cos(\theta) + y\sin(\theta) \quad (4) $$

If was limited to [0, $\pi$] range, then the corresponding parameter of the line is unique. Each line in x-y plane corresponds to a point in $\theta - \rho$ plane. If point $(x_i, y_i)$ is transformed to $\theta - \rho$ plane which defined in formula (4), then the problem of searching line in x-y plane is converted into the problem of finding the intersection of the curve in the $\theta - \rho$ plane, refer to equation (5) and Fig.3.

$$ \rho = x_i \cos(\theta) + y_i \sin(\theta) \quad (5) $$

<figure><img src="image_5.png" /><figcaption>Fig.3. Point (x, y) was transformed to $\theta - \rho$ parameter space</figcaption></figure>

### 2.3 Readings calculation

After a straight line was obtained, we get the coordinates of the two endpoints of the line, then angle can be got as follows:

Pointer is 270 degree between -0.1 to 0.9, calculating the angle from -1 to the straight line where you can get a pointer readings recorded as A, the formula is as follows:

$$ 1/270=(X+0.1)/A \quad (6) $$

## 3 Simulation results

Adopting the proposed algorithm in MATLAB environment, take 220KV SF6 circuit breakers under pressure gauges for example.
<figure><img src="image_6.png" /><figcaption>Fig. 4. Grayscale</figcaption></figure>

Analysis: After histogram equalization was taken on gray image, the image was significantly enhanced the brightness and sharpness.

<figure><img src="image_7.png" /><figcaption>Fig. 5. Equalization figure</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>Fig. 6. Automatic threshold segmentation</figcaption></figure>

Analysis: After performing binarization, the segmented pointer is better by manual threshold at 50 than the value which got automatically, because image got by defining threshold manually screens reading seffectively and removed most noise.

<figure><img src="image_9.png" /><figcaption>Fig. 7. Binarized figure with threshold set at 50</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>Fig. 8. Binarization figure with threshold at 50</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Fig. 9. Expansion figure</figcaption></figure>
<figure><img src="image_12.png" /><figcaption>Fig.10. Corrosion figure</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>Fig.11. Bone thinning</figcaption></figure>

Analysis: The pointer in the binarized figure with conversion threshold at 50 is more obvious, in order for the pointer to be continuous, expansion and corrosion transformation are used, thinning method was used. The effect of thinning is not good, the skeleton position is inaccurate.

<figure><img src="image_14.png" /><figcaption>Fig.12. lines are detected by Hough</figcaption></figure>

<figure><img src="image_15.png" /><figcaption>Fig.13. Extracted pointer by Hough</figcaption></figure>

Analysis: Initially, two straight lines are detected by Hough transform, the first line is inevitable, because in order to read SF6meter manually, the top part of shell SF6is bulge, a tangential line always exists. So we neglect the first line, only calculate the second detected line.

<figure><img src="image_16.png" /><figcaption>Fig.14. A straight line obtained by Hough method</figcaption></figure>

pointer =

0.6519
<caption>**Fig.15.** Pointer reading</caption>

**Summary:** After using traditional method of instrument readings, such as image gray, image enhancement, binary, morphological transformation, thinning and Hough detection, the resulting reading is erroneous, reading of 0.641 by naked eye. Thinning process produces a large deviation. Therefore, a new method is proposed to obtain meter readings. There must be a straight line when you use Hough circle detection, so detecting the image circle to get the coordinates of the center, another point can be obtained from centroid detection. Even dial projection is exists, there is a line after image processing, we determine a point through determining a round, another point is determined by centroid detection, which solved the above problem, no longer restricted by the dial, so meter reading can be more accurate, stable and reliable.

# 4 Improved method

## 4.1 Hough circle detection

### 4.1.1 Edge Detection

Conducting round detection and edge detection at the same time. Edge is the junction between object and object or objects and background image, an edge exists in places where grayscale, color or texture changing rapidly. We can use Roberts operator, Sobel operator, Prewitt operator, Log operator and Canny operator to detect edge [5]. Various types of edge detection results are shown in Fig.16 to Fig.20.

<figure><img src="image_17.png" /><figcaption>**Fig.16.** Roberts edge detection result</figcaption></figure>

<figure><img src="image_18.png" /><figcaption>**Fig.17.** Sobel edge detection result</figcaption></figure>
<figure><img src="image_19.png" /><figcaption>Fig.18. Prewitt edge detection result</figcaption></figure>

<figure><img src="image_20.png" /><figcaption>Fig.19. Log edge detection result</figcaption></figure>

<figure><img src="image_21.png" /><figcaption>Fig.20. Canny edge detection map</figcaption></figure>

From the results of Fig.16 to Fig.20, different operators have significant difference, a significant portion of the edge is effectively extracted. Canny operator is more efficient to extract the weak edge, so we use Canny edge detection operator to detect circle.

### 4.1.2 Hough circle detection

Linear Hough transform parameter space is a two-parameter space, so other common curve shave corresponding parameter space. Three parameters defining a circle on the coordinate plane - the radius of the circle, the center of the x-coordinate and y-coordinate axis, so Hough transform [6] for a circle is a three-dimensional parameter space which use radius and center coordinates as parameter.

In an edge of the image which got by removing the background from a grayscale image, if a circle was described in equation (7), any point $(x_i, y_i)$ in the image can be converted into the a-b-r parameter space 21 as shown in Fig.21 and by Equation (8).

$$ (x-a)^2 + (y-b)^2 = r^2 \qquad (7) $$

$$ (x_i-a)^2 + (y_i-b)^2 = r^2 \qquad (8) $$

Each point in the edge of the image can be converted into a straight cone in the three-dimensional image as shown in Fig.21. If the cones in parameter space which
corresponds to the points in an edge image are intersect at one point, For example, all of these points is at the same circle which defined by the three parameters of the edge image. Results got by edge detection and round detection are shown in Fig. 22:

<figure><img src="image_22.png" /><figcaption>Fig.21. Hough transformation parameters used during the image circle</figcaption></figure>

<figure><img src="image_23.png" /><figcaption>Fig.22. circle detection</figcaption></figure>

## 4.2 Improved methods - centroid detection

Centroid is the center of mass which means a material system is considered an imaginary point of the mass concentrating here. By Using centroid detection[7], which uses the centroid of a region to determine another point.

After circle detection on the original image, set a region of interest, which contains pointer. In this design, set (maximum radius -30) and (smallest circle +5) region, set other regions as 1which is white, refer to Fig. 23. Then binarized it, which is shown in Fig.24. Select the largest area and get its centroid. Refer to Fig. 25. Connect the center of mass and the average centroid, then draw a straight line in the original image, which was shown in Fig. 26.
<figure><img src="image_24.png" /><figcaption>Fig.23. Get interest area from ring region</figcaption></figure>

<figure><img src="image_25.png" /><figcaption>Fig.25. Select the maximum area</figcaption></figure>

<figure><img src="image_26.png" /><figcaption>Fig.24. Binarize the ring area</figcaption></figure>

<figure><img src="image_27.png" /><figcaption>Fig.26. Draw a straight line in the original image</figcaption></figure>

pointer1 =

0.6423

<caption>Fig.27. Computer reading result</caption>

## 5 Conclusion

In order to solve the problem of the low reliability and poor reading accuracy in traditional instrument test process, based on machine vision theory and combined with image processing techniques, SF₆ instrument automatic identification method was improved. By HOUGH circle detection and regional centroid.

## Acknowledgment

This paper was financially supported by the National International Cooperation Special Program(Grant No. 2013DFA11320).

## References

1. Liu Zhenya Reader for Smart Grid: Beijing, China Electric Power Press, 2010.3
2. Zhou Lihui, Zhang Yongsheng, Sun Yong, etc. intelligent substation inspection robot research and application [J] Automation of Electric Power Systems, 2011,35 (19):85-88, 96.

3. Fanjie Qing switch position of image recognition and its application in power systems: [Master thesis] Beijing: China Electric Power University, 2005.

4. ZHU Xiu-chang digital image processing and image communication Beijing: Beijing University of Posts and Telecommunications Publishing, 2002.

5. William K. Pratt with, Denglu Hua, Zhang Yanheng translated Digital Image Processing [M]. Machinery Industry Press, 2005

6. Hough PVC Method and means of recognizing complex patterns. [P].US:Patent3069654,1962.

7. Chen Jiechun, DING Zhen-liang, YUAN Feng centroid detection method estimates of uncertainty [J] Optics, 2008,28 (7):1318-1322 DOI: 10.3321/j.issn:0253-2239.2008.07.019.