Filters
Filter values by
  • Global results
  • String results
  • Character results
| Customize Help
| Save Settings

MdmrGetResult



Function Map
Synopsis
Get results from a SureDotOCR result buffer.
Syntax
void MdmrGetResult(
MIL_ID ResultDmrId, //in
MIL_INT64 StringIndex, //in
MIL_INT64 CharPositionIndex, //in
MIL_INT64 ResultType, //in
void *ResultArrayPtr //out
)
Description

This function retrieves results of the specified type from a SureDotOCR result buffer. You can retrieve global results, string results, or character results. Results are available after calling MdmrRead().

If your target image (MdmrRead()) was associated with a camera calibration context, positional and dimensional results are, by default, returned with respect to the relative coordinate system of the image. Otherwise, these results are returned in pixels, relative to the center of top-left pixel in the target image.

If your target image was associated with a camera calibration context but you want to retrieve positional and dimensional results in pixel units, use MdmrControl() with the M_RESULT_OUTPUT_UNITS control type set to M_PIXEL. However, if you set M_RESULT_OUTPUT_UNITS to M_WORLD without specifying a calibrated image in which to calculate the results, MdmrGetResult() generates an error.

Positional and dimensional results take into account the angle at which the result was found. The following example shows how the result for the bottom-left corner of the string box (M_STRING_BOX_BL_X and M_STRING_BOX_BL_Y) depends on the location and angle at which the string was read.

To remove all results from a result buffer, call MdmrControl() with M_RESET. This does not delete the buffer identifier, as is the case with MdmrFree().

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
ResultDmrId

Specifies the identifier of the SureDotOCR result buffer from which to retrieve results.

StringIndex

Specifies the string (one or all) for which to get results, or specifies to get global results. Set this parameter to one of the values below.

Note that you must set this parameter to a string (one or all) when getting character results.

function map For specifying the string for which to get results, or for specifying global results
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_GENERAL.

Click to summarize M_ALL

Specifies to retrieve results for all strings in the result buffer. To retrieve the number of strings in the result buffer, use M_STRING_NUMBER.

(summarize)
Click to summarize M_GENERAL

Specifies to retrieve global results. These results are related to the result buffer itself.

(summarize)
Click to summarize 0 <= Value < M_STRING_NUMBER

Specifies the index of the string for which to retrieve results. The index must be less than the total number of strings in the result buffer (M_STRING_NUMBER).

(summarize)
CharPositionIndex

Specifies the character (one or all) for which to get results, or specifies to get global or string results. Set this parameter to one of the values below.

function map For specifying the character for which to get results, or for specifying global or string results
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_GENERAL.

Click to summarize

Specifies to retrieve a character result by indicating the character's index, according to the target string format. The StringIndex parameter must be set to a string (one or all).

If a space is read in the target string, it is indexed as a character result, even if you did not add a space to the string model as a permitted character constraint (MdmrControlStringModel() with M_SPACE). For example, if the string model definition specifies to read 4 capital letters ("LLLL"), and the target string read is "AB CD", M_INDEX_IN_FORMATTED_STRING(3) refers to 'C'. If the string model definition specifies to read 4 capital letters and 1 space ("LLSLL"), and the target string read is "AB CD", M_INDEX_IN_FORMATTED_STRING(3) also refers to 'C'.

(summarize)
Parameters

Set this parameter to one of the following:

M_ALL

Specifies to retrieve results for all characters. To retrieve the number of characters, use M_FORMATTED_STRING_CHAR_NUMBER.

0 <= Value < M_FORMATTED_STRING_CHAR_NUMBER

Specifies the index of the character for which to get results. The value must be less than the total number of characters (M_FORMATTED_STRING_CHAR_NUMBER).

Click to summarize

Specifies to retrieve a character result by indicating the character's index, according to the string model definition. The StringIndex parameter must be set to a string (one or all).

Spaces read in the target string can be indexed as a character result, but only if they correspond to a space permitted character constraint in the string model (MdmrControlStringModel() with M_SPACE). For example, if the string model definition specifies to read 4 capital letters ("LLLL"), and the target string read is "AB CD", M_INDEX_IN_STRING(3) refers to 'D'. If the string model definition specifies to read 4 capital letters and 1 space ("LLSLL"), and the target string read is "AB CD", M_INDEX_IN_STRING(3) refers to 'C'.

(summarize)
Parameters

Set this parameter to one of the following:

M_ALL

Specifies to retrieve results for all characters. To retrieve the number of characters, use M_STRING_CHAR_NUMBER.

0 <= Value < M_STRING_CHAR_NUMBER

Specifies the index of the character for which to get results. The value must be less than the total number of characters (M_STRING_CHAR_NUMBER).

Click to summarize M_GENERAL

Specifies to retrieve global results or string results.

M_GENERAL or M_DEFAULT retrieves global results when the StringIndex parameter is set to M_GENERAL or M_DEFAULT. M_GENERAL or M_DEFAULT retrieves string results when the StringIndex parameter is set to a string (one or all).

(summarize)
ResultType

Specifies the type of result to retrieve.

See the Parameter associations section for possible values that can be specified.

ResultArrayPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ]
  • array of type MIL_FLOAT [optionally, in C++: a reference to a std::vector<MIL_FLOAT> ]
  • array of type MIL_ID [optionally, in C++: a reference to a std::vector<MIL_ID> ]
  • array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ]
  • array of type MIL_INT16 [optionally, in C++: a reference to a std::vector<MIL_INT16> ]
  • array of type MIL_INT32 [optionally, in C++: a reference to a std::vector<MIL_INT32> ]
  • array of type MIL_INT64 [optionally, in C++: a reference to a std::vector<MIL_INT64> ]
  • array of type MIL_TEXT_CHAR [optionally, in C++: a reference to a MIL_STRING]
  • MIL_DOUBLE
  • MIL_FLOAT
  • MIL_ID
  • MIL_INT
  • MIL_INT16
  • MIL_INT32
  • MIL_INT64

Specifies the address in which to write results.

See the Parameter associations section for possible values that can be returned.

The tables below list possible values for the ResultType parameter and possible values returned to the ResultArrayPtr parameter.

When retrieving global results, set the ResultType parameter to the value below. In this case, set both the StringIndex and CharPositionIndex parameters to either M_GENERAL or M_DEFAULT.

function map For retrieving global results
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_STATUS +

Retrieves information regarding the state of the read operation.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE MORE
Click to summarize M_COMPLETE

Specifies that the read operation completed successfully. It is possible to read 0 strings (M_STRING_NUMBER), and have a successfully completed read operation.

(summarize)
Click to summarize M_CURRENTLY_READING

Specifies that the read operation is currently ongoing. You can only get this status if you're retrieving it from another thread.

(summarize)
Click to summarize M_INTERNAL_ERROR

Specifies that an unexpected error occurred.

Click to summarize M_NOT_ENOUGH_MEMORY

Specifies that a memory allocation error occurred while reading.

Click to summarize M_READ_NOT_PERFORMED

Specifies that the read operation has not been performed. This is the initial status.

(summarize)
Click to summarize M_STOPPED_BY_REQUEST

Specifies that the read operation was explicitly stopped (MdmrControl() with M_STOP_READ).

Click to summarize M_TIMEOUT_REACHED

Specifies that the read operation ended because the timeout limit was reached (MdmrControl() with M_TIMEOUT).

Click to summarize M_STRING_NUMBER +

Retrieves the total number of strings read. This is the total number of strings held by the result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE MORE

When retrieving string results (one or all), set the ResultType parameter to one of the values below. In this case, set the StringIndex parameter to one or all strings, and set the CharPositionIndex parameter to either M_GENERAL or M_DEFAULT.

Note that M_STRING and M_FORMATTED_STRING cannot be used when the StringIndex parameter is set to M_ALL.

function map For retrieving string results
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_FORMATTED_STRING +

Retrieves the string that was read, according to the target string format. This information is returned as a regular string. It includes the name of all the characters in the string and the terminating null character. It also includes spaces, if the target string has any that are greater than the minimum spacing (MdmrControl() with M_SPACE_SIZE_MIN) and less than the maximum spacing (M_SPACE_SIZE_MAX).

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_TEXT_CHAR MORE
Click to summarize M_FORMATTED_STRING_CHAR_NUMBER +

Retrieves the total number of characters read, according to the target string format. This number includes spaces, if any were read in the target string, even if you did not add spaces to the string model as permitted character constraints (MdmrControlStringModel() with M_SPACE). M_FORMATTED_STRING_CHAR_NUMBER does not count the terminating null character.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING +

Retrieves the string that was read, according to the string model definition. This information is returned as a regular string. It includes the name of all the characters in the string and the terminating null character. It also include spaces, if they correspond to a space permitted character constraint in the string model (MdmrControlStringModel() with M_SPACE).

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_TEXT_CHAR MORE
Click to summarize M_STRING_ALLOC_SIZE_BYTE +

Retrieves the number of bytes required to retrieve an M_STRING result. This includes the terminating null character. In general, use M_STRING_ALLOC_SIZE_BYTE when retrieving all string results. This result returns an array of string size byte (1 element for each string). The size is always the number of bytes, not the number of characters.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_CHAR_NUMBER +

Retrieves the total number of characters read, according to the string model definition. This number can include spaces, but only if they correspond to a space permitted character constraint in the string model (MdmrControlStringModel() with M_SPACE). M_STRING_CHAR_NUMBER does not count the terminating null character.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_MODEL_INDEX +

Retrieves the index of the string model, in the SureDotOCR context, used to read the string.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize Value >= 0

Specifies the index of the string model used to read the string.

Click to summarize M_STRING_MODEL_LABEL +

Retrieves the label of the string model, in the SureDotOCR context, used to read the string.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize Value >= 0

Specifies the index of the string model used to read the string.

Click to summarize M_STRING_SCORE +

Retrieves the string score calculated during the read operation. The string score is the average score of the characters in the string. This score does not include the score of an M_SPACE permitted character (MdmrControlStringModel()), if any were read in the string.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE

When retrieving global or string results (one or all), set the ResultType parameter to one of the values below. In this case, set the StringIndex parameter to one or all strings, M_GENERAL or M_DEFAULT, and set the CharPositionIndex parameter to either M_GENERAL or M_DEFAULT.

Note when the StringIndex parameter is set to either M_GENERAL or M_DEFAULT, the result type will be in reference to the region that encompasses all strings, as opposed to the region of the specific string(s).

function map For retrieving global or string results
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_ITALIC_CHAR_ANGLE +

Retrieves the italic angle at which characters in the string(s) are found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_ITALIC_PITCH +

Retrieves the distance between successive dot centers in the italic angle direction.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_ANGLE +

Retrieves the angle of the string's bounding box, or the bounding box encompassing all strings, in degrees. The angle is measured at the box's base and is relative to the output coordinate system (MdmrControl() with M_RESULT_OUTPUT_UNITS).

An angle interpreted with respect to the pixel coordinate system is always measured counter-clockwise, from the positive X-axis towards the negative Y-axis of the image. For information on the angle's direction of rotation when interpreting the angle with respect to the relative coordinate system, see the Angle convention in MIL subsection of the Working with real-world units section of Chapter 26: Calibrating your camera setup.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_BOX_BL_X +

Retrieves the X-coordinate of the bottom-left corner of the bounding box of the string, or the bounding box encompassing all strings, relative to the angle at which the string was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_BOX_BL_Y +

Retrieves the Y-coordinate of the bottom-left corner of the bounding box of the string, or the bounding box encompassing all strings, relative to the angle at which the string was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_BOX_BR_X +

Retrieves the X-coordinate of the bottom-right corner of the bounding box of the string, or the bounding box encompassing all strings, relative to the angle at which the string was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_BOX_BR_Y +

Retrieves the Y-coordinate of the bottom-right corner of the bounding box of the string, or the bounding box encompassing all strings, relative to the angle at which the string was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_BOX_UL_X +

Retrieves the X-coordinate of the top-left corner of the bounding box of the string, or the bounding box encompassing all strings, relative to the angle at which the string was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_BOX_UL_Y +

Retrieves the Y-coordinate of the top-left corner of the bounding box of the string, or the bounding box encompassing all strings, relative to the angle at which the string was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_BOX_UR_X +

Retrieves the X-coordinate of the top-right corner of the bounding box of the string, or the bounding box encompassing all strings, relative to the angle at which the string was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_BOX_UR_Y +

Retrieves the Y-coordinate of the top-right corner of the bounding box of the string, or the bounding box encompassing all strings, relative to the angle at which the string was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_CHAR_ANGLE +

Retrieves the angle at which characters in the string(s) are found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_HEIGHT +

Retrieves the height of the string's bounding box, or the bounding box encompassing all strings.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_PITCH +

Retrieves the distance between successive dot centers in the string angle direction.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_POSITION_X +

Retrieves the X-coordinate of the center of the bounding box of the string, or the bounding box encompassing all strings; this position is considered the position of the string, or bounding box of all strings.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_POSITION_Y +

Retrieves the Y-coordinate of the center of the bounding box of the string, or the bounding box encompassing all strings; this position is considered the position of the string, or bounding box of all strings.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_STRING_WIDTH +

Retrieves the width of the string's bounding box, or the bounding box encompassing all strings.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE

When retrieving results for characters in a string, set the ResultType parameter to one of the values below. In this case, set the StringIndex parameter to a string (one or all), and set the CharPositionIndex parameter to a character (one or all). Characters are ordered by their index position in their string.

Note that M_CHAR_NAME cannot be used when the StringIndex parameter is set to M_ALL.

function map For retrieving character results
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_CHAR_BOX_BL_X +

Retrieves the X-coordinate of the bottom-left corner of the character's bounding box, relative to the angle at which the character was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_BOX_BL_Y +

Retrieves the Y-coordinate of the bottom-left corner of the character's bounding box, relative to the angle at which the character was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_BOX_BR_X +

Retrieves the X-coordinate of the bottom-right corner of the character's bounding box, relative to the angle at which the character was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_BOX_BR_Y +

Retrieves the Y-coordinate of the bottom-right corner of the character's bounding box, relative to the angle at which the character was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_BOX_UL_X +

Retrieves the X-coordinate of the top-left corner of the character's bounding box, relative to the angle at which the character was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_BOX_UL_Y +

Retrieves the Y-coordinate of the top-left corner of the character's bounding box, relative to the angle at which the character was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_BOX_UR_X +

Retrieves the X-coordinate of the top-right corner of the character's bounding box, relative to the angle at which the character was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_BOX_UR_Y +

Retrieves the Y-coordinate of the top-right corner of the character's bounding box, relative to the angle at which the character was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_FONT_INDEX +

Retrieves the index of the font, in the SureDotOCR context, that contains the representation of the character that was read in the string.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_FONT_LABEL +

Retrieves the label of the font, in the SureDotOCR context, that contains the representation of the character that was read in the string.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_HEIGHT +

Retrieves the height of the character's bounding box.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_NAME +

Retrieves the name of the character in the string that was read. The name is returned as a regular string. It consists of the character name and the terminating null character. If a space was read, the name returned is an actual space (and the terminating null character).

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_TEXT_CHAR MORE
Click to summarize M_CHAR_POSITION_X +

Retrieves the X-coordinate of the center of the bounding box of the character; this position is considered the position of the character.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_POSITION_Y +

Retrieves the Y-coordinate of the center of the bounding box of the character; this position is considered the position of the character.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_SCORE +

Retrieves the character's score. This quantifies the similarity between the character in the target and the character in the font.

If SureDotOCR reads an M_SPACE permitted character (MdmrControlStringModel()), its character score is always 100%. This score does not influence the string score (M_STRING_SCORE).

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAR_WIDTH +

Retrieves the width of the character's bounding box.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Combination value for M_CHAR_NAME; M_FORMATTED_STRING; M_STRING.

You can add the following value to the above-mentioned values to get the size of a string.

function map For retrieving the size of a string
Click to summarizeResultType combination value Description
ResultArrayPtr
- Possible values returned
Click to summarize M_STRING_SIZE +

Retrieves the number of characters in the string, including the terminating null character. When specifying M_FORMATTED_STRING + M_STRING_SIZE, the number returned also include spaces, if any were read in the target string. When specifying M_STRING + M_STRING_SIZE, the number returned can also include spaces, but only if they correspond to a space permitted character constraint in the string model. When specifying M_CHAR_NAME + M_STRING_SIZE, the number returned can include a space, if that was the character read.

For M_CHAR_NAME, the name of each letter at each position is itself a string, with its own terminating null character. You must sum them all to get the required array size for a string.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE MORE

You can add one of the following values to the above-mentioned values to determine the UTF-16 (Unicode) character name information, which can be useful when working in an ASCII environment.

If you are in an ASCII environment and you are getting results about character names (for example, with M_CHAR_NAME) that are within the Basic Latin range, SureDotOCR does not consider the Unicode name, by default. For example, if SureDotOCR reads the character 'A', which is a Basic Latin character, and you use M_CHAR_NAME to get the name of that character, SureDotOCR returns 'A', even if you explicitly named it "\x0041" in the font. To return information about the character's UTF-16 (Unicode) name (that is, "\x0041"), use the combination value M_HEX_UTF16_FOR_ALL.

If you are in an ASCII environment and you are getting results about character names beyond the Basic Latin range, you can only retrieve information about the character name in hexadecimal format. For example, Basic Latin does not include the smiley face character; it must be named in hexadecimal format ("\x263A") in the font.

Note how the string size is affected. For example, the string "abc☺" nominally consists of four characters plus the null-terminating character. However, in an ASCII environment, getting a string size result (retrieved with, for example, M_STRING + M_STRING_SIZE) will return 10 as the string size, because the string is read as "abc\x263A".

For the same string mentioned above ("abc☺"), when M_HEX_UTF16_FOR_ALL is specified, you will obtain "\x0061\x0062\x0063\x263A" and a string size of 25.

In a Unicode environment, the character representations are returned (for example, the smiley face), unless you explicitly specify a combination value (for example, to obtain "\x263A" instead of the actual smiley face).

function map For explicitly retrieving Unicode character name information (can be useful when working in ASCII)
Click to summarizeCombination value Description
Click to summarize M_HEX_UTF16_FOR_ALL

Retrieves results with the name of all characters in hexadecimal 16-bit Unicode (UTF-16) format.

Click to summarize M_HEX_UTF16_FOR_NON_BASIC_LATIN

Retrieves results with the names of characters that fall out of the Basic Latin range, in hexadecimal 16-bit Unicode (UTF-16) format. SureDotOCR returns information about Basic Latin characters according to their ASCII character representation even if they were added to the font in Unicode in hexadecimal format.

(summarize)

You can add the following value to the above-mentioned values to determine whether a result is available.

function map For determining whether results are available
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_AVAILABLE

Retrieves whether a result is available to be returned.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ]  |  address of a MIL_DOUBLE MORE
Click to summarize M_NULL

Specifies that the result is not available to be retrieved.

Click to summarize Value != 0

Specifies that the result is available to be retrieved.

You can add the following value to the above-mentioned values to determine the required array size (number of elements) to store the returned values.

function map For determining the required array size (number of elements) to store the returned values
Click to summarizeResultType combination value Description
ResultArrayPtr
- Possible values returned
Click to summarize M_NB_ELEMENTS

Retrieves the required array size (number of elements) to store the returned values.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE MORE

You can add one of the following values to the above-mentioned values to cast the requested results to a required data type.

Note: In C++, when using a standard vector (std::vector) instead of an array, the values listed in this combination table must not be used. If you need to use a specific data type, instantiate the vector with the necessary data type.

function map For casting the result to a required data type
Click to summarizeResultType Description
ResultArrayPtr
- Possible values returned
Click to summarize M_TYPE_MIL_DOUBLE

Casts the requested results to a MIL_DOUBLE.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_TYPE_MIL_FLOAT

Casts the requested results to a MIL_FLOAT.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_FLOAT  |  array of type MIL_FLOAT [optionally, in C++: a reference to a std::vector<MIL_FLOAT> ] MORE
Click to summarize M_TYPE_MIL_ID

Casts the requested results to a MIL_ID.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_ID  |  array of type MIL_ID [optionally, in C++: a reference to a std::vector<MIL_ID> ] MORE
Click to summarize M_TYPE_MIL_INT

Casts the requested results to a MIL_INT.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_INT  |  array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ] MORE
Click to summarize M_TYPE_MIL_INT16

Casts the requested results to a MIL_INT16.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_INT16  |  array of type MIL_INT16 [optionally, in C++: a reference to a std::vector<MIL_INT16> ] MORE
Click to summarize M_TYPE_MIL_INT32

Casts the requested results to a MIL_INT32.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_INT32  |  array of type MIL_INT32 [optionally, in C++: a reference to a std::vector<MIL_INT32> ] MORE
Click to summarize M_TYPE_MIL_INT64

Casts the requested results to a MIL_INT64.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_INT64  |  array of type MIL_INT64 [optionally, in C++: a reference to a std::vector<MIL_INT64> ] MORE
Compilation information
Header Include mil.h.
Library Use mil.lib; mildmr.lib.
DLL Requires mil.dll; mildmr.dll.
DEFAULT ALL GENERAL STRING NUMBER DEFAULT ALL FORMATTED STRING CHAR NUMBER ALL STRING CHAR NUMBER GENERAL STATUS COMPLETE CURRENTLY READING INTERNAL ERROR NOT ENOUGH MEMORY READ NOT PERFORMED STOPPED BY REQUEST TIMEOUT REACHED STRING NUMBER FORMATTED STRING FORMATTED STRING CHAR NUMBER STRING STRING ALLOC SIZE BYTE STRING CHAR NUMBER STRING MODEL INDEX STRING MODEL LABEL STRING SCORE ITALIC CHAR ANGLE ITALIC PITCH STRING ANGLE STRING BOX BL X STRING BOX BL Y STRING BOX BR X STRING BOX BR Y STRING BOX UL X STRING BOX UL Y STRING BOX UR X STRING BOX UR Y STRING CHAR ANGLE STRING HEIGHT STRING PITCH STRING POSITION X STRING POSITION Y STRING WIDTH CHAR BOX BL X CHAR BOX BL Y CHAR BOX BR X CHAR BOX BR Y CHAR BOX UL X CHAR BOX UL Y CHAR BOX UR X CHAR BOX UR Y CHAR FONT INDEX CHAR FONT LABEL CHAR HEIGHT CHAR NAME CHAR POSITION X CHAR POSITION Y CHAR SCORE CHAR WIDTH STRING SIZE HEX UTF16 FOR ALL HEX UTF16 FOR NON BASIC LATIN AVAILABLE NULL NB ELEMENTS TYPE MIL DOUBLE TYPE MIL FLOAT TYPE MIL ID TYPE MIL INT TYPE MIL INT16 TYPE MIL INT32 TYPE MIL INT64 GENERAL DEFAULT GENERAL DEFAULT GENERAL DEFAULT GENERAL DEFAULT GENERAL DEFAULT GENERAL DEFAULT ALL GENERAL DEFAULT GENERAL DEFAULT ALL GENERAL DEFAULT GENERAL DEFAULT GENERAL DEFAULT GENERAL DEFAULT ALL GENERAL DEFAULT GENERAL DEFAULT ALL GENERAL DEFAULT GENERAL DEFAULT GENERAL DEFAULT GENERAL DEFAULT ALL GENERAL DEFAULT GENERAL DEFAULT ALL GENERAL DEFAULT GENERAL DEFAULT ALL ALL ALL DEFAULT GENERAL