imaqVerifyText
Usage
int* imaqVerifyText(const Image* image, const CharSet* set, const char* expectedString, const ROI* roi, int* numScores);
Purpose
Verifies the accuracy of the text in the image. For each character, 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. |
expectedString | const char* | The expected character values in the region of interest. This parameter is required and cannot be NULL. |
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 characters in the expectedString 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(). |