Double Image Segmentation Algorithm for Tick-Mark Recognition of Analog Instrument

Tick-mark recognition is a key step for automatic reading of analog instrument with computer vision techniques which is called for in many automatic processes among industries. As many factors result in the tick-mark distortion in the sampled image such as the generally stained surface of instrument, or/and reflection and refraction of light, the accuracy and robustness of tick-mark reading are directly or indirectly weakened. Double image segmentation algorithm (DISA) is employed to solve this problem which makes coarse segmentation with structural parameters of instruments, and makes accurate segmentation with gray difference between tick-marks and their background. Tests have been conducted with 640 * 480 pixel industry camera and 4 kinds of pointer pressure meter, and the results show that read-out rate of tick-mark in pointer meter reached 100% at sufficient illumination and 76% at insufficient illumination for air packed instrument. In addition with oil packed instrument, DISA still experienced 64% recognition in comparison with 0 success record by Hough Transformation.


Introduction
This template, created in MS Word 2007, provides authors with most of the formatting specifications needed for preparing electronic versions of their papers.
It is brought into reality with development of computer vision that analog instrument can be recognized with machine vision algorithm. This method could bring many advantages in analog instrument reading procedures including increased accuracy, shorted reading span, automatic data, remote transmission, avoiding boring repetitive working procedure and operator fatigue, and so on.
As tick-mark recognition is a key step for automatic reading of analog instrument, it is now under intensive development by many researchers.
F Corrêa Alegria and A Cruz Serra [1] employed Hough Transform to get determine tick-marks. Chao Zheng et al. [2] proposed a robust and automatic recognition algorithm which can read the indication of analog instruments automatically at various brightness levels and camera angles. It is an integrated application of Multi-Scale Retinex with color restoration at different brightness levels, using Perspective Transform to get the front view of image taken from arbitrary camera angle, and using Hough Transform to determine the starting scale mark and ending scale mark. Methodologically, tick-mark recognition can be divided two steps as follows: 1) Image Segmentation Segmentation is a classical algorithm for image recognition mainly including threshold image segmentation [3] [4], region image segmentation [5] [6], edge image segmentation [7] [8] etc. As tick-marks have several properties as followings: symmetrically distributed on the edge of instruments, fixed distance between top of tick-marks and instrument center and fixed contrast ratio of tickmarks and their background, threshold image segmentation is relatively suitable for tick-mark recognition. In 1979 Otsu, N. [9] presented the famous Otsu threshold segmentation. This algorithm has been widely developed in different directions. For instance, Muthukumaran Malarvel et al. [10] addressed an improved version of Otsu's method which automatically selects a desired threshold value for image segmentation by adapting the Weibull distribution and the least non-zero probability value of gray-levels of the whole image has been considered as a weighted parameter of the background group of Otsu's within-class criterion. Ta Yang Goh et al. [11], based on Monte Carlo statistical method, shows that the success of image segmentation depends on object-background intensity difference, object size and noise measurement, however is unaffected by location of the object on that image.
2) Line Detection As tick-mark takes on line characteristic, many algorithms could be employed to its detection including Hough transform. Kuo-Liang Chung et al. [12] presented an orientation-based DHT (ODHT) which consists of two strategies, the parameter space-selection strategy and the voting space-reduction strategy, to substantially reduce the computational complexity of the DHT. Besides its low computational merit, the proposed ODHT can also improve the detection accuracy of the DHT.
Yoshihiko Mochizuki et al. [13] introduced the N-point Hough transform for the detection of a large number of planar lines in a noisy image which guarantees the accuracy and robustness of line detection using the first and second sample points. Theoretically, tick-marks could be detected with algorithms above on condition of clear images, but many inferior images could lead to deterioration of accuracy and robustness, even to recognition failure such as extreme brightness or darkness, difference between lens focus and instruments, noise arising from inferior cameras or dust panel, non-uniform illumination, and so on. Double image segmentation algorithm is employed to solve this problem which, on the one hand, coarsely positions the tick-mark searching pitch one by one depended on some structural parameters, and on the other hand, accurately picks up tick-mark from background depended on the estimated thresholds of tick-mark and background.

Double Image Segmentation Algorithm (DISA)
Purpose of tick-mark recognition of analog instrument is to position the tick marks in the coordinate system centered by instrument center for automatic recognition of analog instrument.
DISA algorithm is developed in recognition of pointer pressure meters used in railway locomotives, which three steps including preparation, coarse image segmentation and accurate image segmentation. In pretreatment, two characteristic parameters are recognized such as center and radius of the instrument panel, and in the rest steps, brightness barycenter of tick marks are searched one by one as an estimation of Geometric center tick marks with double image segmentation.
Step 1. Preparation Observation of the analog instrument in Figure 1 can draw some conclusion about the tick-marks as following: 1) fixed distance between top of tick-marks and instrument center; 2) equal angle span between neighbor tick-marks centered on instrument center. These properties mean the precondition of tick-mark finding is obtainment of instrument center and the radius of the panel.
According to the observation, it is found that there is evident difference between the instrument panel and other area, especially background, and at the same time, the brightness distribution of the panel is uniform relatively. Thus the geometrical center of the instrument is estimated by the brightness barycenter of the panel as following.  In addition, the radius of the panel, panel R , can be approximately computed as Formula (2): where panel N is the summation of all pixels whose grey values are bigger than background T .
Step 2. Coarse Image Segmentation For recognition of tick-marks with iteration, coarse image segmentation is performed to obtain the 4 vertexes of the tick mark searching pitch for tick-mark described as follows: x y x y x y x y where, current,min x , current,max x , current,min y and current,max y are the border of the tick mark searching pitch which is separated from other image which include the message of the current tick-mark and its background.
If the current tick-mark is the first tick-mark, then current,min 0,center 0,tick-mark current,min 0,center 0,tick-mark current,min 0,center 0,tick-mark current,max 0,center 0,tick-mark 12 12 The physical meanings of these parameters are listed in Table 1. These parameters are estimated as: The physical meanings of these parameters, former,tick-mark l ,

( )
former,center former,center , x y , former D , former,scale θ and former θ ∆ , are listed in Table 2.  Step 3. Accurate Image Segmentation Accurate image segmentation is the process of dividing tick mark pixels from the searching pitch according to current,tick-mark T and current,background T , the brightness thresholds of the current tick mark and its background and at the same time, computing the following parameters for tick mark searching iteration in Table 3.
As brightness thresholds of tick-mark and its background, current,tick-mark T and where, β is the filtering factor for background searching.
2) Computing ( ) x y x y x x y y x y x y x x y y x GV , the difference between current,tick-mark θ and former,tick-mark θ . where, former,tick-mark θ is the angle of the center of the former tick-mark in the coordinate system centered with the instrument center. 6) Computing current D , the distance between the current tick mark and the instrument center.
Cycling between step (2) and step (3), and adaptively the parameters above for every tick-mark, till all the tick marks are found.

Results and Discussion
The test bench in this paper was designed and assembled by GBU (Guangdong Baiyun University). This test bench, as shown in Figure 2, mainly includes the analog pressure instrument, camera, and a sliding table which has a function of distance adjusting between the instrument and the camera for focal length optimization. The parameters of the camera is as follows:  Figure 3 shows that rectangular tick-marks are distributed on the edge of the instrument panel with following properties in the image.  1) Tick-mark area is uniformities in shape, size and brightness in image except for variant minority with characters which are bigger in shape.
2) Brightness value and contrast ratio of the tick-marks and their background take on stability to a certain extent.
3) Distances are almost equal between the outer border of the tick-marks and the instrument center. , the brightness average of all pixels in tick-mark, to describe the brightness of the tick-mark, and employing current,background

GA
, the brightness average of all pixels in tick-mark's background, to describe the brightness of tick-mark's background.
3) Employing now θ ∆ , the angle difference between the angle of the current tick-mark and its former tick-mark with reference to the instrument center, to describe the symmetry of the tick-marks.
In the procedure of the tick-mark searching with double image segmentation algorithm, if the adaptively changed parameters defined above including sway sharply, the tick-mark searching algorithm will be susceptible to disturbance.
In addition, comparative tests were performed to verified the robustness of the tick-mark readout rate of DISA with Hough transformation, the classical line detection algorithm.      As shown in Figure 4, horizontal ordinate is the index of each tick-mark, and longitudinal coordinate is current,tick-mark n , the number of the pixels in each tickmark in current,tick-mark CLASS .
From the data in Figure 4, it is observed that current,tick-mark n retains stable to some extent in searching procedure with periodic fluctuation ranging from 46 to 65 in every 5 tick-marks and the indexes of the peak points are 1, 5, 10, 15, 20, 25, 30, 35, 40, 45 and 50. Furthermore, observation of tested instrument panel in Figure 3 shows that there are as many as 11 big tick-marks whose indexes, same as the peak points in Figure 4, are 1, 5, 10, 15, 20, 25, 30, 35, 40, 45 and 50 too.
With data comparison in Figure 3 and Figure 4, conclusion can be easily drawn that the big tick-marks have more tick-mark pixels than the others, and the other small tick marks, though smaller in number, retain stable in number of pixels and distinguishable.
As shown in Figure  From the data in Figure 6, it is observed that the values of current θ ∆ , lie in the range from 0.89 rad -0.1 rad stably, and the variance of current θ ∆ , is no more than 0.005 rad. These data add weight to the evidence with accuracy and robustness of the algorithm.
As shown in Table 5, the ratios of variance and average for    Test 2: Comparison tests with Hough Line Detection Hough Transformation, a classical algorithm for line detection, has been employed to search tick marks in analog instrument recognition in [14]. In order to evaluate DISA, test conditions are designed to examine the tick-mark recognizing capacity of DISA in comparison with Hough Line Detection as shown in Table 6 and Table 7  Test is repeated 5 times for each panel and each illumination intensity, and 100 times tests are run totally with two algorithms above and results are shown in Table 9 with DISA and Table 8 with Hough Line Detection.
As shown in Table 8 and Table 9, for air packed instruments, type 0, type 1 and type 3, the tick-marks were 100% successfully recognized with the two algorithms above on condition of illumination intensity ranging from 2000 lx to 2500 lx with 30 times of reading, however, if the illumination intensity attenuate to no brighter than 1500 lx, there happened to be 7 times and 11 times of failure World Journal of Engineering and Technology        Panel image of type 1 instrument is under deep investigation to find the reason for failure recognition. As shown in Figure 12, type 3 instrument is packed with oil and there is a clear air-oil boundary in upper half of the instrument panel, and there exists evident grey difference between air zone and the oil zone.
This brings difficulty to tick-mark recognition because of the uneven grey in the bright air zone and in the gray oil zone, and what's worse, there are many significant similarities between the air-oil boundary and the tick marks such as linear structure, brightness contrast with their backgrounds, dimension in width which lead to confusion in recognizing. Data in Table 9 show 100% recognition of type 3 instrument on illumination intensity from 2000 lx to2500 lx, and 73% recognition when illumination intensity is lower than 1500 lx. On the contrary, data in Table 9 show total recognition failure for type 1 with Hough Line Detection due to the air-oil boundary.
Summary: Batch tests are run at 5 kinds of illumination intensity with 4 kinds of analog pressure instruments. As shown in test data, for the air packed instruments, DISA and Hough Line Detection experience 91% and 85% successful tick mark recognition in total respectively. In contrast with the oil packed instrument, influenced by an air-oil boundary, DISA only retains 64% successful recognition records, and Hough Line Detection had none.

Conclusions
Many factors such as the generally stained surface of pointer meter, and/or ref- 2) Blur image leading to small grey difference between tick marks and their background.
3) Heavily stained surface leading to shade of part tick marks.