Filters
Filter values by
  • Index General
| Customize Help
| Save Settings

MdmrDraw



Function Map
Synopsis
Draw specific features of a SureDotOCR result buffer.
Syntax
void MdmrDraw(
MIL_ID ContextGraId, //in
MIL_ID ResultDmrId, //in
MIL_ID DstImageBufOrListGraId, //in
MIL_INT64 Operation, //in
MIL_INT64 Index, //in
MIL_INT64 CharIndex, //in
MIL_INT64 ControlFlag //in
)
Description

This function draws specific features of a SureDotOCR result buffer in the destination image buffer or 2D graphics list.

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
ContextGraId

Specifies the identifier of the 2D graphics context to use when drawing. Set this parameter to one of the values below.

function map For specifying the 2D graphics context
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies that the default 2D graphics context of the current MIL application is used.

Note that there is a different default 2D graphics context for each thread.

(summarize)
Click to summarize MIL 2D graphics context identifier

Specifies a valid 2D graphics context identifier, which you have allocated using MgraAlloc().

ResultDmrId

Specifies the identifier of the SureDotOCR result buffer from which to extract the features to draw. The result buffer must have been previously allocated on the system using MdmrAllocResult().

DstImageBufOrListGraId

Specifies the identifier of the destination image buffer or 2D graphics list in which to draw. The buffer can be any valid MIL image buffer allocated using MbufAlloc...(). The 2D graphics list must be previously allocated using MgraAllocList(). By drawing into a display's overlay buffer or associating the 2D graphics list with the display, you can also annotate an image non-destructively.

If specifying an image buffer, it must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

Operation

Specifies the drawing operation to perform. When applicable, MdmrDraw() draws the required information at the location that the string was read in the target, at the correct angle, scale, and aspect ratio.

The following Operation parameter values are for drawing operations related to strings. The CharIndex parameter must be set to M_DEFAULT. The values in the table below can be added together to perform multiple drawings at once (for example, M_DRAW_STRING_BOX + M_DRAW_MIL_FONT_STRING).

function map For drawing operations related to strings
Click to summarizeValue Description
Click to summarize M_DRAW_MIL_FONT_FORMATTED_STRING

Draws the names of the characters that were read, and they appear according to how the target string is formatted in the image (including non-constrained spaces). Character names are drawn under the bottom-left corner of the bounding box of the string (M_DRAW_STRING_BOX). Character names come from the SureDotOCR font that defines them. To draw the names, SureDotOCR uses the font associated with the 2D graphics context.

(summarize)
Click to summarize M_DRAW_MIL_FONT_STRING

Draws the names of the characters that were read, and they appear according to the string model definition. Character names are drawn under the bottom-left corner of the bounding box of the string (M_DRAW_STRING_BOX). Character names come from the SureDotOCR font that defines them. To draw the names, SureDotOCR uses the font associated with the 2D graphics context.

(summarize)
Click to summarize M_DRAW_STRING_BOX

Draws a bounding box around the string that was read. This bounding box encloses all of the string's characters.

(summarize)

The following Operation parameter values are for drawing operations related to characters. The CharIndex parameter must be set to one or all characters. The values in the table below can be added together to perform multiple drawings at once (for example, M_DRAW_STRING_CHAR_BOX + M_DRAW_STRING_CHAR_POSITION).

function map For drawing operations related to characters
Click to summarizeValue Description
Click to summarize M_DRAW_STRING_CHAR_BOX

Draws the character's bounding box at the location at which the character was read.

Click to summarize M_DRAW_STRING_CHAR_POSITION

Draws a circled dot at the center of each bounding box that surrounds the individual characters of a string.

Index

Specifies the string result (one or all) for which to perform the drawing operation. Set this parameter to one of the values below.

function map For specifying the string index
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_ALL.

Click to summarize M_ALL

Specifies to perform the drawing operation for all string results.

Click to summarize M_GENERAL

Specifies to perform a global drawing operation for a single bounding box that encompasses all strings. This parameter must be used with M_DRAW_STRING_BOX or it will generate an error.

(summarize)
Click to summarize Value >= 0

Specifies the index of the string result for which to perform the drawing operation.

CharIndex

Specifies the character (one or all) in the string result for which to perform the drawing operation. Set this parameter to one of the values below.

function map For specifying the character index
Click to summarizeValue Description
Click to summarize M_DEFAULT

Implements the default behavior.

For drawing operations related to strings, the default indicates that this parameter is not required. For drawing operations related to characters, the default is the same as setting the M_INDEX_IN_STRING() macro to M_ALL.

(summarize)
Click to summarize

Specifies to perform the drawing operation by indicating the character's index, relative to its position in the formatted string. The formatted string 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).

(summarize)
Parameters

Set this parameter to one of the following:

M_ALL

Specifies to perform the drawing operation for all characters in the formatted string. To retrieve the number of characters in the formatted string, call MdmrGetResult() with M_FORMATTED_STRING_CHAR_NUMBER.

0 <= Value < M_FORMATTED_STRING_CHAR_NUMBER

Specifies the index of the character in the formatted string for which to perform the drawing operation. The value must be less than the total number of characters in the formatted string (M_FORMATTED_STRING_CHAR_NUMBER).

Click to summarize

Specifies to perform the drawing operation by indicating the character's index, relative to its position in the string. The string can include spaces, but only if they correspond to a space permitted character constraint in the string model (MdmrControlStringModel() with M_SPACE).

(summarize)
Parameters

Set this parameter to one of the following:

M_ALL

Specifies to perform the drawing operation for all characters in the string. To retrieve the number of characters in the string, call MdmrGetResult() with M_STRING_CHAR_NUMBER.

0 <= Value < M_STRING_CHAR_NUMBER

Specifies the index of the character in the string for which to perform the drawing operation. The value must be less than the total number of characters in the string (M_STRING_CHAR_NUMBER).

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; mildmr.lib.
DLL Requires mil.dll; mildmr.dll.
DEFAULT PROC NONE DRAW MIL FONT FORMATTED STRING DRAW MIL FONT STRING DRAW STRING BOX DRAW STRING CHAR BOX DRAW STRING CHAR POSITION DEFAULT ALL GENERAL DEFAULT ALL FORMATTED STRING CHAR NUMBER ALL STRING CHAR NUMBER GENERAL DRAW STRING BOX