User manual

8
Custom OCR Templates
You can create a custom template, or character string that defines the length
and content of OCR strings that will be read with your scanner. The templates
define the OCR font as well as the layout of the text in a row and column format.
Each row can have up to 50 characters, with up to 18 rows in a template, with a
maximum of 320 characters. Within each character position, the allowable
characters can be specified either through explicit ASCII values, groups of
ASCII values, wildcard characters, or combinations of these types. To achieve
better OCR results, limit each character position’s values to the specific
expected values in your application.
Spaces
Internal gaps longer than one space are not allowed in a template. For
example, the OCR text
ONE SPACE
is valid because there is only one space between the E and S in the text.
However, the following text is illegal given the two spaces between the O
and S:
TWO SPACES
An arbitrary number of spaces at the beginning and end of a line are
acceptable. These spaces must be included in the template with the ASCII
value of a space (32 decimal, 0x20 hex), and not be included as part of a
group or wildcard character.
Character Size
The ideal height of an OCR character after sampling is about 20 pixels, but
characters up to 50 pixels in height can be read. If OCR characters are
consistently above 40 pixels in height, downsampling the image by a factor
of 2 will achieve better results in both speed and decode rates.
Euro, Pound, and Yen Currency Characters
7 bit ASCII values are used in the OCR template strings. However, there
are no 7 bit ASCII representations for the euro, pound, or yen currency
characters. 8 bit codes for these characters are:
The hex character is output. For example, the euro output is [0xA3]. Refer
to the ASCII Conversion Chart (page -21).
Currency Decimal Hex
Euro 128 0x80
Pound 163 0xA3
Ye n 1 6 5 0 x A 5