oemSetupOCR

This function is used to set the Optical Character Recognition (OCR) decoding options. OCR character recognition is less secure than reading bar codes. Misreads may occur if a check character is not used.

Result_t oemSetupOCR (

OCRMode_t nFont, TCHAR *pszTemplate, TCHAR *pszGroupG, TCHAR *pszGroupH, TCHAR *pszCheckChar OCRDirection_t nDirection

)

Return Values

RESULT_SUCCESS

RESULT_ERR_PARAMETER

Parameters

nFont

This determines which OCR fonts (if any) are selected for decoding. The following values are used:

OCR_DISABLED OCR_A OCR_B OCR_MONEY

OCR_MICR (currently unsupported)

pszTemplate

A null-terminated string that indicates one or more template patterns for the OCR decode. All characters in the font are matched as is, except for the following:

a - alphanumeric character c - check character

d - a digit from 0 - 9 e - any character

g - any character specified in group G h - any character specified in group H

l- alphabetic letter r - delimits a row

t - delimits multiple templates

pszGroupG

A null-terminated string that defines the set of characters matching group "g" in a template.

pszGroupH

A null-terminated string that defines the set of characters matching group "h" in a template.

pszCheckChar

A null-terminated string that defines the legal characters for checksum computation in a decoded message. Use the string constant "0123456789" for modulo 10 checksums, and the string constant "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" for modulo 36 checksums.

nDirection

Tells the OCR decoder which way the characters are usually oriented with respect to the image. The decoder still decodes any orientation, but use of this parameter can increase decoding speed. It also makes decoding more reliable for numbers that contain only the digits "0, 6, 8," and "9." The constant specifies the direction taken when the operator reads the message from start to finish. The following values are used:

LeftToRight

TopToBottom

RightToLeft

BottomToTop

IMAGETEAM™ 4X00 Series Software Development Kit (SDK) User’s Guide

2 - 59

Page 73
Image 73
Hand Held Products 4X00 manual OemSetupOCR, Resultt oemSetupOCR, NFont, PszTemplate, NDirection