Dutomatic Detection Technology of Intelligent Meter Based On Machine Vision

In view of the low detection rate of LCD appearance quality of smart meters in the current low contrast environment, this study puts forward the research of intelligent meters automation based on machine vision, and puts forward corresponding solutions and strategies according to this problem. Firstly, the image of the LCD area of the smart meter is extracted. On this basis, the image of the LCD screen of the ammeter is enhanced by the method of wavelet transform. Then, the LCD area of the smart meter is accurately divided. Then the morphological gradient is used to reconstruct the character information, and finally realize the automatic detection of intelligent electricity. The experimental results show that the method proposed in this paper has certain feasibility and effectiveness, improves the accuracy of appearance detection of smart meter, and has certain practical significance in power industry.


Introduction
In recent years, with the rapid development of Internet and computer information technology, China's power system is becoming more and more intelligent and information-based. With the improvement of national economic level, smart meters have also been widely used. However, the popularity of smart meters also brings pressure and challenges to the detection of power system. The traditional detection of smart electricity meters usually takes the way of manual detection. If the manual operation is not standardized, the detection accuracy of electricity meters will be poor, thus reducing the detection efficiency. In the detection technology of smart electricity meter, many scholars and experts have carried out in-depth research and achieved certain research results. Xiao Yong et al. Proposed an anomaly detection method of smart meter data based on deep belief network and data aggregation model, which improved the accuracy of smart meter data detection [1]. Liu Ziyi et al. Proposed a longitudinal analysis model based on smart meter operation fault data, and comprehensively analyzed the faults of meter operation through the constructed model, The corresponding solutions are put forward, which provides a reference for the research of smart meter [2].
The wide application of image processing technology makes machine vision penetrate into many fields such as medicine, education and industry. It is found that machine vision technology can improve the level of automation equipment intelligence. Therefore, combined with the experience of the above scholars and according to the current automation requirements of smart meters, this study puts forward the research on the automatic detection technology of smart meters based on machine vision, focuses on the in-depth exploration of the appearance detection of smart meter LCD screen, and puts forward the corresponding solutions and strategies for its existing problems. Firstly, the image of the LCD area of the smart meter is extracted. On this basis, the image character information of LCD screen is enhanced by wavelet transform. Then the LCD area of the smart meter is accurately divided. The character information was reconstructed by morphological gradient, and finally the appearance quality detection of LCD screen of smart meter was completed. Through experimental verification, the method proposed in this study can further improve the automation level of smart meter detection, which is conducive to the long-term development of smart meter automation technology in China.

Character area segmentation of smart meter LCD
To detect the LCD screen of smart ammeter, the character area of ammeter should be divided first. As shown in Figure 1, the character area of the LCD screen of smart electricity meter is composed of symbols, numbers and Chinese characters [3]. Due to the influence of external environment, the regional image acquisition of smart meter LCD screen will have the phenomenon of high contrast and low contrast, which is very unfavorable to the character detection of watt hour meter, and the detection accuracy can not be effectively guaranteed. Based on this, in order to accurately segment the image, the first condition is to extract and enhance the LCD image of the meter.
The character region segmentation of smart meter LCD is mainly divided into three steps. The first step is to extract the region image of smart meter LCD, the second step is to enhance the region image of smart meter LCD, and the third step is to accurately segment the characters in the region image of smart meter LCD [4].

LCD area image extraction
The LCD area graphics of smart electricity meters are mostly extracted by the RGB channel image analysis method, but the information extracted by this method has a large gray level and is easily affected by external factors such as direct sunlight. Therefore, in this study, the image extraction of the LCD area of smart ammeter is realized by means of mean bi-narization. The specific process is as follows: Firstly, the gray value of is solved to obtain the initial gray threshold value, which is divided into two parts.
Then the gray mean of the two parts is solved. Reset the gray value and group it with the previous gray value [5]. Go back to the second step to solve until the gray threshold no longer changes. After the mean bi-narization of the gray threshold, the image of the LCD screen area of the smart electric meter is extracted, and the specific location of the character information in the image is obtained.

Image enhancement in the LCD area
The character information in the energy meter image under low contrast is not obvious, so it is difficult to distinguish the specific information. The image can be segmented only after the character information of the image is enhanced. At present, there are three widely used image enhancement methods, namely, image local enhancement method, histogram equalization method and wavelet transform image enhancement method [6].
According to the actual situation of the electricity meter image, this paper selects the way of Xu Aobo transform to enhance the image. The specific process of this method is as follows: The image of the electric energy meter is transformed to obtain the specific arrangement k j u and represents the corresponding frequency band. In this study, it is solved by two-dimensional fast dyadic wavelet algorithm, which has good reconstruction ability and can achieve the effect of image enhancement.
The wavelet coefficient of the low-frequency sub-band is expressed as 1 3 u , and the mean value ) (u med , maximum value ) max(u and minimum value ) min(u of the coefficient are solved respectively. The traditional linear piecewise function is used to enhance the wavelet coefficient, and the calculation formula is shown in Formula (1) : Where K is a constant higher than 1, The high frequency sub-band coefficient is expressed as This coefficient mainly includes high-frequency detail information, a small amount of noise and low-frequency coefficient, and the numerical distribution is quite different [8].
After successful adjustment, the wavelet coefficient value is obtained, and then the value is subjected to inverse wavelet transform three times. Finally, the transformed value is normalized to the interval range of [0,255].

LCD area Character segmentation
In order to realize the appearance inspection of smart meter LCD screen, the key lies in the quality inspection of character information in LCD screen. At present, there is no more effective method to detect the quality of character information, so it is necessary to segment the character area in the LCD. In this study, morphological gradient method is selected to enhance the image character information of electricity meter.
When character information is enhanced, noise and small details do not disappear. Therefore, in order to completely eliminate the influence of external factors such as noise, the image will be reconstructed and the text information will be gradually restored.

Smart meter LCD character information detection
When testing the smart meter, characters and numbers usually appear on the LCD screen of the smart meter. If there is a problem with the characters, the screen will not display any information indicating that the meter is in a condition. However, due to the different internal structure of digital display, the digital display and character display are also different [9]. Therefore, the detection of smart meter LCD must be divided into two ways: Chinese character and symbol information detection and digital symbol information detection.

Detection of Chinese characters and symbols
The detection of character information in smart meter LCD screen is mainly realized by statistical model. The screen is scanned with a n m × rectangular box. If the screen normally displays Chinese character or symbol information, the information will occupy the proportion of the corresponding size in the screen. If the scale size range is the threshold m, when the proportion of character information is greater than the threshold m, it indicates that there is text or symbol information in the screen, and if it is less than the threshold m, it indicates that no information is displayed [10]. It can be seen that this method is simple and accurate to detect the information of Chinese characters and symbols.

Detection of symbol information
The standard of digital symbol information detection is to check whether the number in the LCD screen is 8. The basic principle of the traditional digital symbol detection method is to collect the Nixie tube information in the LCD screen of the meter during normal operation, and use the learning characteristics of neural network to control the LCD screen of the intelligent meter to realize the digital symbol detection at one time. However, the detection accuracy of this method is low, the speed is slow, and it is not suitable for the current digital detection needs. Therefore, the monitoring method of connected domain algorithm based on rectangle fitting proposed in this study is very effective, easy to operate, convenient and fast to monitor, and high accuracy. The algorithm steps are divided into two steps.
After dividing the Nixie tube, search the parameter with pixel value of 0, and the approximate

Experimental results and analysis
In order to verify the effectiveness of the monitoring method proposed in this paper, the experiment will analyze the enhanced and reconstructed images of the meter LCD and the appearance detection of the lossy LCD.

Experimental analysis of image enhancement and reconstruction in LCD area
As shown in Figure 2, the experiment chooses to detect the meter in a low contrast environment, mainly judging the appearance of the LCD screen after the character image in the LCD screen is enhanced and reconstructed.

FIG 2. Image enhancement and reconstruction effect of LCD area of smart meter
It is found that the character information of the original image is enhanced, but there is still some fuzzy character information; In the character information of histogram equalization image, the character information of the background is clearer, but it will bring more noise; Compared with the image of histogram equalization and the image of gray level stretching transformation, the image of LCD area partition proposed in this paper has better enhancement effect, clearer character information and better noise control.

Experimental analysis on appearance inspection of lossy LCD
The quality of the LCD screen of the electricity meter is judged mainly from the character information of the image. In order to obtain more obvious comparison effect, the original image of lossy LCD, local enhancement detection results, wavelet transform detection results and the detection results of  Figure 3. Figure 3. The method proposed in this paper for lossy LCD screen detection Fig. 3 shows the detection effect of the lossy LCD screen of the method proposed in this paper. In the original image of the lossy LCD screen, most of the character information of other detection methods are not displayed correctly. The appearance detection of the locally enhanced image will cause the false detection of the non-destructive LCD screen. The image enhanced by histogram equalization and wavelet transform has noise pollution, which is easy to cause the false detection of the LCD screen after appearance detection. The image processing results of the LCD appearance detection method proposed in this study completely show the character information of the image, which shows that the method proposed in this study can find out the position of character information in the LCD, and further improve the accuracy of LCD appearance detection.

Conclusion
To sum up, in the low contrast environment, compared with other smart meter LCD appearance detection methods, the automatic LCD appearance detection method of smart meter based on machine vision proposed in this study can accurately find the position of character information in the LCD and display the character information completely. The final results show that the method proposed in this study has a high level of automation, information and intelligence, which can solve the non-standard problems existing in manual detection, and further improve the accuracy of the appearance detection of smart meters, and has certain feasibility and effectiveness.