ReadTextOptions

NI Vision for LabWindows/CVI Function

ReadTextOptions

NI Vision configuration settings you want to use during the reading process.

Refer to the NI OCR Training Interface Help for more information.

Elements

Name

Type

Description

validChars[255] String255

An array of strings that specifies the valid characters. The string at each index in the array specifies the valid characters for the corresponding character position in the ROI. You can specify a string of valid characters for each element of the array, or you can use one of the predefined strings of characters from the following table.

Identifier String of Valid Characters
IMAQ_OCR_UPPERCASE ABCDEFGHIJKLMNOPQRSTUVWXYZ
IMAQ_OCR_LOWERCASE abcdefghijklmnopqrstuvwxyz
IMAQ_OCR_ALPHABETIC ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
IMAQ_OCR_DECIMAL_DIGITS 0123456789
IMAQ_OCR_ALPHANUMERIC ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
IMAQ_OCR_HEXADECIMAL_DIGITS 0123456789ABCDEF
IMAQ_OCR_PATTERN Matches any pattern at the corresponding character position.
IMAQ_OCR_FORCE_SPACE Ignores the character at the corresponding character position and replaces it with a space in the read string.
numValidChars int The number of strings in the validChars array that you have initialized. Acceptable values range from 0 to 255. Set this element to 0 to specify that all characters are valid for all positions.
substitutionChar char The character to substitute for objects that the function cannot match with any of the trained characters.
readStrategy ReadStrategy The read strategy, which determines how closely the function analyzes images in the reading process to match objects with trained characters.
acceptanceLevel int The minimum acceptance level at which an object is considered a trained character. Acceptable values range from 0 to 1000.
aspectRatio int The maximum aspect ratio variance percentage for valid characters. The minimum value for this element is 100, which specifies that identified objects are valid only if they match the trained character exactly in size and height/width ratio. Set this element to IMAQ_ASPECT_RATIO_INDEPENDENT to specify that aspect ratio does not affect character validity.
readResolution ReadResolution The read resolution, which determines how much of the trained character data the function uses to match objects to trained characters.