| Customize Help
| Save Settings

MstrExpert



Function Map
Synopsis
Makes a diagnosis of the String Reader context and reports configuration problems.
Syntax
void MstrExpert(
MIL_ID ContextId, //in
const MIL_ID *ImageArrayPtr, //in
const void *TargetStringArrayPtr, //in
MIL_INT NbImages, //in
MIL_ID ResultId, //in
MIL_INT64 ControlFlag //in
)
Description

This function analyzes the consistency of a String Reader context using a specified image and a target string. Retrieve results using MstrGetResult(); this function returns error and/or warning codes for problems found. Use MstrInquire() to retrieve the meaning associated with these codes.

When the diagnosis of the String Reader context does not cause a general error (see MstrGetResult() with M_GENERAL), the context is ready to be used to read the image provided to MstrExpert(). You can call MstrExpert() multiple times to find and correct problems in the context.

You can limit the verify operation to a region of the image buffer, using a rectangular ROI set with MbufSetRegion().

Note that this function is only available for a font-based context.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
ContextId

Specifies the identifier of the String Reader context. The String Reader context must have been previously allocated on the required system using MstrAlloc().

ImageArrayPtr
Accepts the address of one of the following:
  • array of type MIL_ID [optionally, in C++: a reference to a constant std::vector<MIL_ID> ] (and a maximum array rank for C# of 1)
    Required array size:(NbImages)

Specifies the identifier of the image to analyze. Note that you cannot provide more than one image.

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 2D 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.

TargetStringArrayPtr
Accepts the following address:

Specifies the identifier of the string to locate. This string represents the expected strings to locate in each image analyzed using MstrRead(). The string array must be of the right type for the encoding scheme selected (MstrControl() with M_ENCODING). Only one string is supported.

NbImages

Specifies the number of images to analyze. This parameter must be set to 1.

When using a standard vector (std::vector) overload function in C++, you can pass M_DEFAULT to this parameter and MIL will automatically determine the size based on the number of items in the vector passed to the ImageArrayPtr parameter.

ResultId

Specifies the identifier of the String Reader result buffer in which to save the results of MstrExpert().

ControlFlag

Specifies the type of analysis to perform with MstrExpert().

To specify the type of analysis to perform, set this parameter to one of the following values. Except for M_DEFAULT, the following values can be added together.

function map For specifying the type of analysis to perform
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies to report errors and warnings.

Click to summarize M_ERRORS

Specifies to report errors.

Click to summarize M_WARNINGS

Specifies to report warnings.

Compilation information
Header Include mil.h.
Library Use mil.lib; milstr.lib.
DLL Requires mil.dll; milstr.dll.
FONT BASED PROC RASTER DEFAULT ERRORS WARNINGS ASCII UNICODE