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

： 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 ofSF6 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.


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 SF6is 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 robotSF6 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.

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

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.

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 (1)

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.

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: 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.

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.

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.

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)

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:

Simulation results
Adopting the proposed algorithm in MATLAB environment, take 220KV SF6 circuit breakers under pressure gauges for example.    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.    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.

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. 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.

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 ycoordinate 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 ( (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:   Fig.21.Hough transformation parameters used during the image circle

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.

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 6 instrument automatic identification method was improved. By HOUGH circle detection and regional centroid.