Shenyang Aerospace University, China

**Sen-yue Zhang**

Shenyang Aerospace University, China

It is feasible that the computer vision technology applied for reading mechanical meter. It solves the "human error" of power systems and achieves the smooth transition to automatic meter reading system. In order to achieve effective segmentation of showing numerals with high noise and broken strokes, the study proposes an improved Snake algorithm of double centers of gravity and uses it in numerals segmentation with high noise and broken strokes. The algorithm achieves the expected results. According to the general characteristics of Arabic numerals of mechanical Meter, the algorithm introduces external force of double centers of gravity into Snake model and regards the foreground points’ proportion of control points neighborhood as Snake model’ energy function and adopts a new zigzag algorithm to realize the smooth of detailed contour . It showed that the algorithm achieved an effective segmentation. Experimental results showed that the algorithm has overcome the traditional Snake algorithm’s deficiency of extracting the contour of Arabic numerals and achieves approximation of smoothing big depression of Snake algorithm; it has stronger inhibitory effect on the noise. The algorithm correctly completes numerals segmentation with high noise and broken strokes and has a high practical value.

PDF Abstract XML References Citation

Yi-bo Li and Sen-yue Zhang, 2011. The Number Segmentation of Watt-hour Meter Based on Improved Snake Model. *Information Technology Journal, 10: 2133-2139.*

**DOI:** 10.3923/itj.2011.2133.2139

**URL:** https://scialert.net/abstract/?doi=itj.2011.2133.2139

**INTRODUCTIONS**

At present, the electricity meter of our country is transiting from mechanical meter, semi-mechanical meter to pure electronic and multifunction meter. Because several of the electricity meters social stock is great, manual meter reading will exist for a long time. The efficiency and accuracy of manual meter reading depends entirely on the quality of meter readers. Because of meter readers’ generally low quality, in addition, meter readers intentional meter reading caused the human error; it exacerbated the difficulties of electrical management. Human error and unmeant error, wrong meter reading lead to conflicts and contradictions with customers. Leading to artificial increase the power loss is also greatly reduced the electrical system's credibility. Here, the human error is defined as the person's subjective intent generated the wrong reading, less reading, confused one thing with another etc.

In order to improve the scientific management level of electrical system reduce the labor intensity of meter reader and achieve the smooth transition of manual meter reading to remote automatic meter reading. The advanced technologies such as **computer vision** technology are introduced into meter reading operations and one of the preferred schemes is the development of multi-functional Hand-held meter reading system which is based on computer vision.

The recognition rate of dial display will directly affect the system performance based on **computer vision** of intelligent meter reading system. At present, for a simple background image, character recognition have been some of the more sophisticated methods, such as template matching method, neural networks, genetic algorithms, the algorithm based on fractal theory and specifically for the printed character recognition methods. However, the practical application of the meter is usually in a complex environment, there is often uneven background illumination, dust and noise, dial wear, character defects and other interference. To achieve automatic digital computer pattern recognition, primary task is to separate the digital. Segmentation technology directly determines the final recognition rate. The conventional character segmentation algorithm is difficult to complete the complex environment of digital segmentation task; therefore, we need to develop a technology that is suitable for character segmentation of the complex digital.

Now a days, some segmentation algorithms of characters such as segmentation algorithm (Casey and Lecolinet, 1996; Gang *et al*., 2002), projection algorithm (Hanyu *et al*., 2008), traversing algorithm (Boggs and Boggs, 2002; Wang *et al*., 2004) and structural analysis (Shou, 2002; Zhong *et al*., 2006) etc, only apply to print form or handwritten character segmentation task with simple background. For the digital segmentation of Watt-h meter that contains high noise, broken strokes, it will always appear wrong segmentation, also, they will make the strokes belong to a character segment to different image, or to produce error strokes because the effects of noise and make the noise as part of the character to be identified and incorporated into the character image.

Another common character segmentation algorithm is contour extraction which based on edge detection or region segmentation algorithm (threshold, region growing, the differential operator method, etc.), more new **neural network** (Yanling and Zhang, 2006; Eckhorn *et al*., 1990; Tan *et al*., 2008) and wavelet transform algorithms (Mallat and Hwang, 1992; Mallat and Zhong, 1992; Shuling and Xiaohua, 2000; Ye * et al*., 2004; Jianzhong *et al*., 2004; Yang *et al*., 2004; Shan and Baoqing, 2007; Wanpeng *et al*., 2007). They are "bottom up" approach (Marr and Hildreth, 1980) and only use the visible information of the image but can not automatically remove noise and correctly combine the broken strokes and weak anti-interference ability. But the Snake model (Kass *et al*., 1987) is different from the traditional methods that detect the edge point and then link into the line. It combines the upper knowledge and the bottom information, uses an interactive method which is using the upper knowledge to minimize the function energy and ultimately get a smooth and continuous edge curve. To this end, the study proposes an improved algorithm that the algorithm introduces external force of double centers of gravity into Snake model and regards the foreground points’ proportion of control points neighborhood as Snake model’ energy function and adopts a new zigzag algorithm to realize the smooth of detailed contour . It showed that the algorithm achieved an effective segmentation. Experimental results showed that the algorithm has overcome the traditional Snake algorithm’s deficiency of extracting the contour of Arabic numerals and achieves approximation of smoothing big depression of Snake algorithm; it also realizes a complete extraction of the meter reading character outlines and it has stronger inhibitory effect on the noise. Especially compared to other segmentation algorithms, this algorithm correctly completes numerals segmentation with high noise and broken strokes and has a high practical value.

**THE TRADITIONAL SNAKE ALGORITHM MODEL**

Snake algorithm is also known as active contour method, it is a minimum energy function model which is used for extracting the main contour of image (including edge, line segments and subjective contours), achieve the movement tracking of these contour and match stereo image. Since the function always minimizes its effective energy, then make the contour show the dynamic behavior like a snake slide; and effectively maintain the continuity of the edge. This function is constructed as follows:

(1) |

where, the internal force E_{int} keeps the snake shape and avoids shrinking a point; and external force E_{ext} guides the snake movement; Image force E_{image} makes the snake rest on around the expectation contour.

Internal force energy formula is as follows:

(2) |

The internal force energy formula consists of two parts. The simple differential terms |v_{s} (s)|^{2} represents the continuity of contours or be known as tension and be used to drive snake move like a snake to maintain the continuity of the edge. Second differential term |v_{ss} (s)|^{2} refers to the smoothness or curvature of the contour and gives a minimum to β(s) at a point of the location and can show the greater curvature of the contour, such as in the corner point of the image.

The external force energy formula can be simply showed as E_{ext} (δ (s)(v(s)-v(c))^{2}. Where c is the estimated center of the selected target as usual. The plus-minus of δ(s) is determined according to the control point in the outside or inside profile of expectations contour, to guide the snake toward the expected direction to shrink or expand.

The image force attract snake to approximate the line, edges and the virtual boundary of image. The image force energy function formula is as follows:

(3) |

where, line energy formula is E_{line} = I (x,y) which is used to detect image with the lines features. Besides, the plus-minus selection of γ_{line} make snake tends to bright line or dark line. Since the energy effect of other forces, finally, the line energy will drive snake stays at the brightest or the darkest place around expectation contours.

Edge energy formula make snake tend to the obvious characteristics of image, such as a greater change in image grey-scale value or edge. Usually, in order to make snake stay at the big gradient. Contour place of Image, it uses E_{edge} = -|ΔI (x,y)|^{2}.

The end point functional formula:

(4) |

where, gradient angle is θ = tan^{-1} (C_{y}/C_{x}), vector unit is n = (cosθ, sinθ), the orthogonal vector of gradient directions is n_{⊥} = (-sinθ, cosθ). Through the end point functional formula and the curve smooth character of external constraints force and internal force can detect virtual boundary which does not actually exist in the image and can be used for the extraction of subjective contours.

**THE NUMBER SEGMENTATION OF WATT-HOUR METER BASED ON IMPROVED SNAKE MODEL**

**The selection of the initial contour points:** After doing some pre-procession of digital regional positioning, noise reduction and binary conversion to noise image which contains Arabic numerals, it is often through the character segmentation algorithm, such as the projection method, to conduct a simple segmentation of character region and get a region for a single number. In addition to the digital part, the region may have a variety of noise which can not be removed in pre-processing. However, because of all or most single digit contain in region, the boundary of the region can selected as the initial contour of the snake algorithm.

**Internal force energy function:** The first order part of internal force energy function shows the contour continuity and keeps the contour control points spacing demanded through dynamically inserting or deleting control points in right spacing threshold. Spacing threshold can be fixed values or the average value of all control points, the energy function is:

(5) |

(6) |

In order to facilitate the choice of the weight, we need to normalize by dividing the maximum energy point value E_{max} (s) in the neighborhood.

Fig. 1(a-b): | The curvature calculation of discrete points |

The second order part of internal force energy function shows the contour smoothness. It is usually controlled by the curvature energy. Because of Arabic numerals containing in both the acute corners and the smooth protrusions and sunk park, so, in order to decrease computation and highlight the corner feature, the improved algorithm does not introduce curvature energy function. However, under the circumstances of existed broken strokes, in order to extract more smoothly broken strokes, the smooth control of curvature need to be introduced, so the appropriate weights needs to be set and according to the characteristics of snake control points, then adjust the curvature of discrete points of the use of approximate function.

Curvature calculation of discrete points in common is described by the following curvature approximate formula:

(7) |

The above formula only is applied in the condition with equally distribution discrete points. Take for two examples showed in Fig. 1.

According to the curvature formula, in Fig. 1a, the curvature of i point is 0 and in (Fig. 1b) is 1. In fact they are all in the line and with a 0 curvature. But between the control points of snake, the distance is often uneven loose.

Therefore, when using the formula to calculate curvature, the normalization for the coordinate difference of horizontal and vertical of two points needs to be done. The specific methods is: If the coordinate difference’s absolute of i and i-1 (i + 1) are all greater than 1, then to divide the smaller one and to make the absolute at least one is 1; if the absolute are not more than 1, nothing to be done and directly do curvature operations.

**External force energy function of double centre:** For the smooth large protuberance and depression of Arabic numbers such as 2, 3, 5, 6 and so on. The external force energy function of the traditional snake algorithm can not be convergences to depression accurately, or produce an over-convergence in the part of protuberance. Then, the external force energy function of double heart is proposed.

The smooth large protuberance and depression which Arabic numbers have are all appeared on the upper half or lower half of the number, rather than middle part. Then, the image is separated to up-down parts from the gray center of the whole word images. To get the gray center of the two parts separately and use them to construct the external force energy function for themselves’ control points.

The coordinate formula of gray center G(X, Y):

where, G_{i} is gray value of the point of i, mxn is the size of the requirement region.

Using the reciprocal of the distance from the semi-local control point to the gravity center point as external force energy and the formula is:

and δ is negative.

**The ratio energy function of the foreground point:** Big noise pixels in binary image have a big effect to image gradient force. In order to reduce them, according to the actual structure of Arabic numbers, also, the proportion of the foreground point in the neighborhood of contour point are all close to 0.5, the proportion of foreground point in the neighborhood replacing the traditional image gradient force is used as the image force energy. The function is:

(8) |

where, P(s) is the proportion of foreground point in the control point neighborhood.

**Local zigzag algorithm:** In order to guarantee the accuracy of detail smooth of final contours, a zigzag algorithm in the finalize design period of snake is adopted. This algorithm uses the continuity of snake point and guarantees that the angles constituted by every contour point and front-back contour point are all bigger than 45°. The formula is:

**The extraction of broken stroke:** For the active contours has the unique feature of continuity, in the process of extracting the external contour of characters, they can automatically complete the extraction of broken strokes by setting control points spacing of the internal force energy and curvature weights.

**The extraction of internal contour:** After using a double heart energy function extract the external contour of digital, some numbers still have internal contour and need to extract, like 8, the low-half part of 6, the upper half of 9 and so on. We can cut the redundant part around digital according to the external contour extracted previously and get the accurate positioning of the number. Then according to the method of double centers that is described in to do inflation guide to every control point. And finally it makes the control point stay at the place nearby the internal contour.

During the snake movement of internal contour, the superposition between the control point coincidence and the external contour is tested. If yes, that explains there is no necessary to extract internal contour in this part and exit the internal contour extraction.

**EXPERIMENTAL RESULTS AND ANALYSIS**

In this study, the binary digit images with the large noise and the broken strokes are done with contours extraction experiments by using MATLAB. The following shows the convergence results with the same running number.

**The depression convergence effect:** Figure 2 shows the extraction effect of characters after smoothed big depression.

Figure 2a shows the contour extraction effects of the traditional snake algorithm of the single centers of gravity external forces, we can see that with the impact of the single centers of gravity attraction, the convergence effects of the smooth large depression parts is not good.

Fig. 2(a-c): | The extraction effect of characters after smoothed big depression |

Figure 2b shows the traditional snake algorithm of the external energy function with double centers of gravity. It can be seen that snake converges to the large smooth depression part; however, with the impact of the centers of gravity force energy, some contours still outstrip the impact of gradient force energy. If the weight coefficient of the gradient force energy is increased, the operating times will be greatly increased without accurate convergence.

Figure 2c shows the improved snake algorithm of the external force energy with double centers of gravity has the better approximation contour effect.

**Anti-noise effects:** Figure 3 shows the extraction results of binary image with snowflake noise. Figure 3a shows the digital images with noise.

Figure 3b shows the traditional snake algorithm with the double centers of gravity energy and the gradient energy. It can be seen that the impact of noise points on the large gradient force energy is large but it can’t be accurately converged. The anti-noise ability of the algorithm is strong.

Figure 3c shows the improved snake algorithm of the double centers of gravity energy and the neighborhood gray ratio energy. It can be seen that noise points have no influence on the energy convergence which has strong resistance to noise.

**The extraction effect of broken strokes by improving curvature:** Figure 4 shows the extraction effects of the characters with noise and broken strokes.

Figure 4a shows the curvature function with the weight of 1.5 and not adjusted which has been able to successfully extract the broken strokes.

Figure 4b shows the curvature function with the weight of 1.5 and adjusted, it can be seen that the impacts of curvature function has become very obvious.

Fig. 3(a-c): | The extraction results of characters with snowflake noise |

Figure 4c shows the curvature function with the weight of 0.5 and adjusted, it can be seen that it has been able to successfully extract the broken strokes and the approximation of the contour is better than Fig. 4a.

**The extraction effects of internal contour:** Figure 5 shows the extraction effects of internal contour.

It can be seen that the extraction effects of internal contour can fully meet the actual needs.

**The effects of zigzag:** Figure 6 shows the comparative effects of zigzag algorithm.

Fig. 4(a-c): | The extraction effects of characters of noise and broken strokes |

Fig. 5: | The extraction effects of internal contour |

Fig. 6: | The comparative effects of zigzag algorithm |

Fig. 7(a-d): | The local amplification of results with zigzag algorithm |

Figure 7 shows the local amplification comparison of the results with zigzag algorithm. Where Fig. 7a-c are the effects without zigzag algorithm, besides, Fig. 7b-d are the effects with zigzag algorithm, it can be seen that the better local smoothing effect.

Present study discusses the digital segmentation done by the use of contour extraction approach to satisfy the requirements of higher de-noising of the number of Watt-hour Meter dial used in the automatic meter reading system based on **computer vision** and broken strokes segmentation. According to the characteristic of the Arabic numbers of Watt-hour Meter dial, based on snake model, the double centers of gravity force and the control point neighborhood foreground point proportion are introduced as the energy function in order to achieve the approximation of contour depression and enhance the capability of anti-noise. For the characteristics of snake control points, the approximate function of the curvature is adjusted to achieve the correct segmentation of broken strokes. Finally, a new zigzag algorithm is added to implement the smooth of the detail part of the contour. Experimental results show that the algorithm overcomes the lack of contour extraction on Arabic numbers of the traditional snake algorithm, achieves the approximation of the smooth big depression, has the strong ability of restraining the noise, can complete the segmentation with high noise and the number of broken stroke points and there is a strong practical value. This method has been successfully applied in the certain type of meter reading system based on computer vision.

- Casey, R.G. and E. Lecolinet, 1996. A survev of methods and strategies in character segmentation. IEEE Trans. Pattern Anal. Machine Intell., 18: 123-127.

CrossRef - Gang, L., D. Xiaoqing, P. Liangrui and L. Changsong, 2002. A character segmentation algorithm based on synthetic decision. Comput. Eng. Appli., 17: 59-62.

Direct Link - Wang, L.W., Y. Yang, B. Xie and Y. Yang, 2004. Segmentation of handwritten chinese characters based on connected components amalgamation and penetration times algorithm. Inform. Technol., 28: 30-35.

Direct Link - Zhong, H., H. Liu and X.S. Jiang, 2006. A method for character segmentation based on data analysis. J. Shenyang Jianzhu Univ., 22: 158-162.

Direct Link - Eckhorn, R., H.J. Reitboeck, M. Arndt and P. Dicke, 1990. Feature linking via synchronization among distributed assemblies: Simulations of results from cat visual cortex. Neural Comput., 2: 293-307.

CrossRefDirect Link - Tan, Y.F., R.C. Nie, D.M. Zhou and D.F. Zhao, 2008. Gray image edge detection based on Unit-Linking PCNN. J. Yunnan Univ., 30: 465-471.

Direct Link - Mallat, S. and W.L. Hwang, 1992. Singularity detection and processing with wavelets. IEEE. Trans. Inform. Theor., 38: 617-643.

CrossRef - Mallat, S. and S. Zhong, 1992. Characterization of signal from Mulliscale Edge. IEEE Trans. PAMI., 7: 710-732.

CrossRefDirect Link - Ye, S., Q. Sun and E. Chang, 2004. Edge directed filter based error concealment for wavelet-based images. Proceedings of the International Conference on Image Processing, Oct. 24-27, Singapore, pp: 809-812.

CrossRef - Wanpeng, C., C. Rensheng and Y. Dong, 2007. Illumination-independent wavelet scale multiplication edge detection method. Acta. Optica. Sinica., 27: 1751-1757.

Direct Link - Marr, D. and E. Hildreth, 1980. Theory of edge detection. Proc. R. Soc. Lond., 207: 187-217.

CrossRefDirect Link