imaqVerifyPatterns

NI Vision for LabWindows/CVI Function

imaqVerifyPatterns

Usage

int* imaqVerifyPatterns(const Image* image, const CharSet* set, const String255* expectedPatterns, int patternCount, const ROI* roi, int* numScores);

Purpose

Verifies the accuracy of the text in the image. For each pattern, the function checks for the existence of a reference character for the expected character class and compares the character from the image to the reference character.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name

Type

Description

image const Image* The source image for this operation.
set const CharSet* The character set this function operates on. To create a character set, use imaqCreateCharSet(). This parameter is required and cannot be NULL.
expectedPatterns const String255* The array of expected patterns in the region of interest. This parameter is required and cannot be NULL.
patternCount int The number of patterns in the expectedPatterns array.
roi const ROI* The ROI that the function performs this operation on. Pass NULL to use the entire image for this operation. If the ROI has multiple contours, each contour is interpreted as a pattern location in the image. If the ROI only has one contour, the function searches the ROI for the expected patterns.
numScores int* On return, the number of scores returned by the function. Set this parameter to NULL if you do not need this information.

Return Value

Type

Description

int* On success, this function returns an array of verification scores for the first numScores elements of the expectedPatterns array. If a reference character does not exist for the character class of a character, the function sets the score corresponding to that character to 0. On failure, this function returns NULL. To get extended error information call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().