Advanced System for Consumption Meters with Recognition of Video Camera Signal

Developed advanced system for consumption meters is designed for searching sections containing detectable data that is analyzed, stored and transmitted as recognized numerical values. The advanced recognition system is based on the input signal from the camera chip, which scans the monitored consumption meter. The basic parameters of the system are particularly the minimum cost of the used functional components with minimum power consumption. These limitations determine a design of hardware and algorithms structure for identifying the scanned image signal. Today there are common the power meters, which contain additional elements for detecting the state by electronic means, for example they are equipped with the pulse output, the magnetic sensors. However, the consumption meters with analog numerical display are currently more widespread compare to the expensive digital meters with peripheries. The developed advanced system is based on an innovative method of using video signal for the autonomous data collection in comparison with the expensive and less efficient collection by staff. The system is designed with the need to protect against unauthorized manipulation of the advanced device by protective casing fixed to the monitored consumption meter.


Introduction
Developed advanced system for consumption meters is designed for searching sections containing detectable data that is analyzed, stored and transmitted as recognized numerical values. The advanced recognition system is based on the input signal from the camera chip, which scans the monitored consumption meter. The basic parameters of the system are particularly the minimum cost of the used functional components with minimum power consumption. These limitations determine a design of hardware and algorithms structure for identifying the scanned image signal.
Today there are common the power meters, which contain additional elements for detecting the state by electronic means, for example they are equipped with the pulse output, the magnetic sensors. However, the consumption meters with analog numerical display are currently more widespread compare to the expensive digital meters with peripheries. The developed advanced system is based on an innovative method of using video signal for the autonomous data collection in comparison with the expensive and less efficient collection by staff. The system is designed with the need to protect against unauthorized manipulation of the advanced device by protective casing fixed to the monitored consumption meter.

Structure of advanced recognition system
Advanced recognition system structure ( Fig. 1) consists of low-power microprocessor with control and recognition algorithms, the external FLASH memory for saving parameter settings and processed data, the camera module for scanning video signal, the communication module for connection to a service device with a measured consumption database and user interface.
There is used microcontroller ATmega 1284p as control module with regard to the requirements of the processed application focused to recognition system. Basically, this low-power microprocessor is not suitable for image processing with respect to frequency and internal memory size, but with specific modifications of the video signal scanning and its non-standard processing, it can be applied to the developing advanced system. The scanned and processed video signal parts are sequentially saved and conversely loaded via SPI interface to FLASH memory AT45DB. The basic parameter is 4Mbit data capacity organized in 8192 pages of 512 bytes with two input SRAM buffers with 512 bytes capacity enable simultaneously reading and writing from different parts of the FLASH memory. Selection of memory has focused on the minimum requirements of consumption, sufficient size and frequency of data rate, because of minimal time delay between the microprocessor and camera sensor cooperation. There are sequentially in functional blocks saved and used the data of particular results, the scanned image in a luminance form, the image patterns of possible objects respectively digits from consumption meter, the final results of the recognition algorithm, the position data of the detected area, the recognition system parameters. , thus there is necessary to set the divider register div r , which is given by the oscillator frequency and presented functional realtion: Power supply of developed system is implemented using batteries. There is expected battery lifetime same as meters calibration lifetime with respect to minimum consumption of functional components.

Algorithms for process and detection of actual consumption meter state
Scanned data sensed by the image sensor must be saved for next usage within the limited capacity in the external FLASH memory. The proposed compression algorithm allows storing the entire one pattern of the digit only to a one memory page. In implementing process the algorithm was designed based on the lossless compression method, RLE (Run Length Encoding), which is a simple compression technique, which is based on reduce repeated sequence of pixel values. The principles of this method ( Fig. 2) are implemented using a single byte, where the first part of the 7 bits indicates the number of repetitions and the second part of the 1 bit indicates the current white or black color.
The compression method may be ineffective for inadequate data, because the current pixel values size from the RLE encoder can have up to twice the size compared to the input. The modified method RLE is effective in the case of digits compression, because the images with a small number of color changes in the line have the minimum of bytes after compression.

Fig. 2. Structure compression algorithm reset structure
Detection method of consumption measurement consists of the following sequential steps, where first step is loading of the input image and its transforming into binary matrix.
These operations are performed only on a limited user-defined work area, where are placed the consumption state digits. The solution procedure is shown graphically in Fig. 3. Because of different lighting of each digit, there is processed a separation of digits areas in manually or automatically manner in the service mode. This is necessary for the correct threshold detection in various conditions. In standard operating mode, there are detected threshold levels of the scanned images accurately in such defined separated digits areas, which can be set by the user or automatically selected according to the method based on bits 6 0

SERVICE MODE OPERATING MODE
separation of background and objects called the Otsu method. Optimum threshold detection algorithm is evaluated from the histogram (Fig. 4), where the result of external variances N S r , for the background and objects must be maximal [2], [3].
here H is the number of pixels and brightness component rate, which are contained in the parameter   x P . At the same time there is given equation for all brightness component levels There is necessary to calculate the mean value of the background occurrence    gives the optimal threshold. There is presented relation equal to (7) Automatic digit sections detection is processed identically in service mode as described above in the text, but threshold algorithms are applied to the entire area. After the threshold detection, there are searching all continuous areas representing individual separated digits. The searching method of continuous areas is designed to sufficiently simple and fast evaluation of the matrix pixel elements inherent to the given area. There was chosen method based on the principle of Two-pass, where the pixels assignment to objects is made in two cycles. In the first cycle, there is assigned to pixels the temporary class and in the following cycle, these temporary classes are replacing to the final marks, which are representing the object.
In operation mode, each work area with the separated continuous areas is compared with the digit patterns stored in the database using a method based on the correlation function. There is obtained the compliance rate of the digit pattern and scanned object with digit by the final evaluation of the correlation function.

Properties of the user interface for service purposes and verification of recognition system
The user interface is developed in C# for the Microsoft Windows operating system. The intuitive user interface is connected with recognition system by serial communication standard. The user interface is primarily intended for service purposes (Fig. 5), thus it is to set the basic parameters of the recognition system [4].

Fig. 5. User interface window for parameters setting
The basic parameters and possibility of the developed service user application are the automatic identification of areas coordinates for the consumption state detection, setting of the section coordinates for recognition system, setting of the digits patterns for recognition system, setting of the size and the number of patterns, setting of the digits number representing the sections, manual setting of threshold limits and additional parameters, reading of the scanned image from the recognition system, reading of the actual detected sections with detectable data from the recognition system, reading of the basic parameters form the recognition system There is graphically presented the original scanned image and processed image in microprocessor with detected separated sections and the threshold distribution of objects and background as the example of application user interface shown in Fig. 6.
The various already presented computational methods were verified and the basic results are presented in the following table 1. There was applied detection in three different luminaires. On the left side, there are given examples and the average of detected threshold levels N for dividing objects and backgrounds. On the right side, there are presented examples and the averages of the calculated coincidence level R of objects and digit patterns, where the red marked fields are faulty detected. In the right column, there is list of the detected digits percentage success rate, which represents actual measured consumption. There were performed 20 measurements in each type of lighting for verification.

Conclusions
The purpose of the paper was to verify the possibility of recognition parameters in the developed advanced autonomous recognition system for consumption meters. The specific realization is usable for measurement and other applications with using video signal recognition methods. The structure and used sequence of algoritmhs were developed in theoretical knowledge base. The main goal of this paper is to show development of autonomous advanced system for actual state recognition. The basic system architecture and algorithms are presented here. The servise application as the user interface for parameters setting and verification was explained.
The results in Table 1 show the increasing treshold object level with increasing illumination. The marked cells in Table 1 represent individual non-correctly recognized digits because of low illumination and protective glass scratch above the digit 6. The recognition advanced system was verified in 20 samples for each illumination and there was measured succesfull recognition from 82-92% depending on the illumination confirming usable aplication for practice usage. The system realization has been developed for the industrial partner for domestic water flow, gas, electricity meters.