ReadText2 Method

NI Vision for Visual Basic

ReadText2 Method

Syntax

NIOCR.ReadText2 Image, ReadString, [Regions], [CharacterReport]

Return Type

Long

Purpose

Reads the text from the image. The function indentifies all objects in the image based on the properties you set, and then compares each object with every trained character. For each object, the method selects the character that most closely matched the object. The method uses the substitution character for any object that did not match any of the trained characters.

An image can contain no more than 255 objects.

Remarks

Use this method with U8, RGB32, and HSL32 image types.

Parameters

Image as CWIMAQImage

Source image for this operation.

ReadString as String

On return, the string read by the method.

Regions as Variant

CWIMAQRegions object that specifies the region of the image on which the method performs this operation. To use the entire image for this operation, do not supply this parameter.

CharacterReport as Variant

On return, a NIOCRCharReport that contains additional information about each character that the method read from the image. Do not supply this parameter if you do not need this information.