Information Technology Reference
In-Depth Information
Fig. 7.13. Sketch of the combined meter value recognition system. Digit recognition is only
necessary if the block classifier rejects an example.
The digit needs to be segmented from the other digits, and it is normalized to a fixed
size.
Segmentation. The goal of the segmentation step is to determine a minimal rectan-
gular region of the 32 × 16 meter value image that contains the digit to be recognized
and nothing else. This is illustrated in Figure 7.14(a) for some examples.
The vertical extension of this rectangle is determined as follows. Starting from
the topmost row and the bottom row, the rectangle's borders are moved towards the
center, until the row sum of foreground intensity exceeds a threshold. The thresh-
old used is the maximal row sum, divided by 16. Thus, all rows that contain non-
negligible foreground pixels are contained between the upper and the lower border,
as can be seen in the figure.
Horizontal segmentation is done using an occupancy index that is computed
similarly to the one used to center the digits of interest horizontally in the 32 × 16
window (see Section 7.3.2). Here, analysis is done only within the segmented rows.
The occupancy index is smoothed with a smaller binomial kernel of length five
to keep more local extrema. The smoothed occupancy index is shown above the
examples in Fig. 7.14(a).
To locate a digit horizontally, a local maximum is searched for in the occupancy
index array, starting with an offset of four pixels from the center of the digit block.
The maximum indicates the digit's center. It is marked by a short vertical line in
the figure. The left and the right borders of the digit are searched for, starting with
an offset of two pixels from the digit center. The borders are moved away from
the center, until a local minimum is found, or the occupancy index falls below a
threshold. The threshold used is the sum of the occupancy indices at the digit centers
divided by 16. If there are no foreground pixels in that row and the distance to the
center exceeds two, the border is moved one column back towards the center. Hence,
the segmented digit has a width of at least five pixels. In Figure 7.14(a) the horizontal
digit segmentation is indicated by vertical lines.
Size Normalization. The segmented rectangular region of a digit has a variable
size, but the digit classifier expects an input image of fixed size. Hence, the digit
needs to be scaled to normalize its size. This discards the digit's size variance. An
array of 8 × 15 pixels is used to represent the normalized digit.
Search WWH ::




Custom Search