MIL_ID ImageBufId, | //in |
MIL_ID FontContextOcrId, | //in |
MIL_CONST_TEXT_PTR String, | //in |
MIL_ID OcrResultId | //in |
This function determines whether a known string is present in the target image, and evaluates the quality of the string. This operations can be performed more quickly with MocrVerifyString() than with MocrReadString(). After verification, the specified result buffer can be read with the MocrGetResult() function.
If string location is disabled (using MocrControl() with M_SKIP_STRING_LOCATION), use a child buffer to limit the search area for best results.
The verification can only be performed on a single string and not multiple strings. When dealing with multiple lines of text in a target image, the returned string is the first one found within the target image. Note that this is not necessarily the first string within the target image. The string is located according to its OCR font context type, constraints, and processing controls. Once located, the string can then be read and compared against the validation string provided by this function.
You can limit the operation to a region of the image buffer, using a rectangular region of interest (ROI) set using MbufSetRegion().
For a more robust search, use an M_CONSTRAINED OCR font context. You can change the type of context using MocrControl() with M_CONTEXT_CONVERT.
Blank characters cannot be verified and will be ignored.
Specifies the identifier of the target image containing the string to be verified.
This image buffer can only have a rectangular region of interest (ROI) defined using MbufSetRegion() (with or without rotation). In addition, the region must be defined in vector format from a graphics list (M_VECTOR or M_VECTOR_AND_RASTER). An error will be generated if the ROI is only in raster format (M_RASTER) or a non-rectangular shape.
Specifies the identifier of the OCR font context to use to verify the string in the target image.
Specifies the character string to be verified in the sample target image.
For specifying the ASCII
characters
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
MIL_TEXT("String") 1 |
Specifies the character string to be verified in the sample target image. (more details...) |
1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().
Header | Include mil.h. |
Library | Use mil.lib; milocr.lib. |
DLL | Requires mil.dll; milocr.dll. |