MIL_ID ContextGraId, | //in |
MIL_ID ContextOrResultBeadId, | //in |
MIL_ID DstImageBufOrListGraId, | //in |
MIL_INT64 DrawOperation, | //in |
MIL_INT64 DrawOption, | //in |
MIL_INT LabelOrIndex, | //in |
MIL_INT Index, | //in |
MIL_INT64 ControlFlag | //in |
This function draws specific features of a selected bead context or bead result, in the specified destination image buffer or graphics list. Drawings are typically performed using either the template's vertices or trained points (when specifying a bead context), or using the trained points' corresponding measured point (when specifying a bead result). Drawing operations for trained points are only available after calling MbeadTrain(), while drawing operations for bead results are only available after calling MbeadVerify().
You can draw results and settings, obtained relative to an offset, at the top-left corner of the destination image, using MgraControl() with M_DRAW_OFFSET_X and M_DRAW_OFFSET_Y and zoom them using MgraControl() with M_DRAW_ZOOM_X and M_DRAW_ZOOM_Y. For example, you can draw a zoomed section of the bead found in the target image at the top-left corner of the destination image. For more information, see the Drawing graphics with offset and zoom subsection of the Drawing graphics section of Chapter 22: Generating graphics.
All operations are available for drawing in either the specified destination image buffer or graphics list, unless otherwise specified.
Specifies the identifier of the graphics context to use. This parameter must be set to one of the following values:
For specifying the graphics
context
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that the default graphics context of the current MIL application is used. (more details...) |
||||||||||||||||||||||||||||||||||||||
MIL graphics context identifier |
Specifies a valid graphics context identifier, which you have allocated using MgraAlloc(). |
Specifies the identifier of the bead context or bead result buffer that this function will use to perform the drawing operation. The context or result buffer must have been previously allocated on the system using MbeadAlloc() or MbeadAllocResult(), respectively.
Specifies the identifier of the destination image buffer or graphics list in which to draw. The buffer can be any valid MIL image buffer allocated using MbufAlloc...(). The graphics list must be previously allocated using MgraAllocList(). By drawing into a display's overlay buffer or associating the 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.
When calling MbeadDraw() with a bead context (and using a calibrated training image) or with a bead result (and using a calibrated target image), the destination drawing buffer need not be calibrated to the same world. MIL draws according to the calibration context associated to either the training or verification image.
Specifies the drawing operation to perform.
To perform drawing operations for a bead context or a bead result, this parameter can be set to one of the following values. These drawing operations are performed according to the points specified with the DrawOption parameter.
Drawing operations for a context or
result
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DRAW_INDEX |
Draws the index of the templates containing the points that fulfill the conditions of the DrawOption parameter. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_LABEL |
Draws the label of the templates containing the points that fulfill the conditions of the DrawOption parameter. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_POSITION |
Draws a cross at the position of the point. |
||||||||||||||||||||||||||||||||||||||
M_DRAW_POSITION_INDEX |
Draws the index value of the point. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_POSITION_POLYLINE |
Draws the polyline that connects the points. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_SEARCH_BOX |
Draws the search box of the point. |
||||||||||||||||||||||||||||||||||||||
M_DRAW_WIDTH |
Draws an H-type line (|-|) indicating the width of the bead at that point. (more details...) |
To draw the training image, this parameter must be set to the following value. To draw the training image, you must set the ContextOrResultBeadId parameter to a bead context, the DstImageBufOrListGraId parameter to a destination image, the DrawOption parameter to M_DEFAULT, the LabelOrIndex parameter to M_GENERAL, and the Index parameter to M_GENERAL.
Drawing the training image
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DRAW_TRAINING_IMAGE |
Draws the training image. (more details...) |
Specifies the type of points that this function will use to perform the drawing operation. If this information is not required for the specified drawing operation, set this parameter to M_DEFAULT.
When performing a drawing operation for a bead context or bead result, this parameter can be set to the following value.
For performing a drawing operation with a
context or a result
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value. (more details...) |
When performing a drawing operation for a bead context, this parameter can be set to one of the following values.
For performing a drawing operation with a
context
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_TRAINED |
Specifies that MIL performs the drawing operation using the trained points indicated by both M_TRAINED_FAIL and M_TRAINED_PASS. |
||||||||||||||||||||||||||||||||||||||
M_TRAINED_FAIL |
Specifies that MIL performs the drawing operation using all the trained points that were expected but not found, during the training phase (MbeadTrain()). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TRAINED_PASS |
Specifies that MIL performs the drawing operation using all the trained points that were established (found), during the training phase MbeadTrain(). |
||||||||||||||||||||||||||||||||||||||
M_USER |
Specifies that MIL performs the drawing operation using the vertices of the template. (more details...) |
When performing a drawing operation for a bead result, this parameter can be set to one of the following values.
For performing a drawing operation with a
result
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies that the drawing operation will be performed using all measured points, regardless of whether they have passed (M_PASS) or failed (M_FAIL). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FAIL |
Specifies that the drawing operation will be performed using all measured points that were expected but did not pass verification. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FAIL_GAP_MAX |
Specifies that the drawing operation will be performed using all measured points that have failed verification, and whose expected position falls within the maximum gap in the bead, as specified using MbeadControl() with M_GAP_MAX_LENGTH. |
||||||||||||||||||||||||||||||||||||||
M_FAIL_INTENSITY_MAX |
Specifies that the drawing operation will be performed using all measured points that have failed verification because their intensity is greater than the highest intensity allowed, as specified using MbeadControl() with M_INTENSITY_NOMINAL + M_INTENSITY_DELTA_POS. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FAIL_INTENSITY_MIN |
Specifies that the drawing operation will be performed using all measured points that have failed verification because their intensity is less than the lowest intensity allowed, as specified using MbeadControl() with M_INTENSITY_NOMINAL - M_INTENSITY_DELTA_NEG. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FAIL_NOT_FOUND |
Specifies that the drawing operation will be performed using all measured points that have failed verification because they were not found in the target image. |
||||||||||||||||||||||||||||||||||||||
M_FAIL_OFFSET |
Specifies that the drawing operation will be performed using all measured points that have failed verification because their position has surpassed the offset criterion, as specified using MbeadControl() with M_OFFSET_MAX. |
||||||||||||||||||||||||||||||||||||||
M_FAIL_WIDTH_MAX |
Specifies that the drawing operation will be performed using all measured points that have failed verification because the width of the measured bead at their position is greater than the maximum width criterion, as specified using MbeadControl() with M_TRAINING_WIDTH_NOMINAL + M_WIDTH_DELTA_POS. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_FAIL_WIDTH_MIN |
Specifies that the drawing operation will be performed using all measured points that have failed verification because the width of the measured bead at their position is less than the minimum width criterion, as specified using MbeadControl() with M_TRAINING_WIDTH_NOMINAL - M_WIDTH_DELTA_NEG. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_PASS |
Specifies that the drawing operation will be performed using all the measured points that have passed verification. |
Specifies the templates (one or all) that this function will use to perform the drawing operation, or specifies that you are performing a general type of drawing operation. The specified template is either in a bead context or result buffer, depending on the ContextOrResultBeadId parameter setting. All LabelOrIndex parameter values can be used for any draw operation, unless otherwise specified.
This parameter can be set to one of the following values:
For specifying the template
|
|||||||||||||||||||||||||||||||||||||||
Value |
Description
|
||||||||||||||||||||||||||||||||||||||
Specifies the index of a template for which to perform the drawing operation. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the index. The index is from 0 (inclusive) to the number of templates minus 1. |
|||||||||||||||||||||||||||||||||||||||
Specifies the label of a template, for which to perform the drawing operation. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
Specifies the label. The label must be greater than 0. |
|||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies to perform the drawing operation for all templates. |
||||||||||||||||||||||||||||||||||||||
M_GENERAL |
Specifies that you are performing a general type of drawing operation. (more details...) |
Specifies the set of template points (one or all) for which to perform the drawing operation, or specifies that you are performing a general type of drawing operation. All Index parameter values can be used for any draw operation (except M_DRAW_TRAINING_IMAGE).
This parameter should be set to one of the following values:
For specifying the index of the trained
point
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_ALL |
Specifies to perform the drawing operation for all points in the specified templates. |
||||||||||||||||||||||||||||||||||||||
M_GENERAL |
Specifies that you are performing a general type of drawing operation. (more details...) |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the index of the point in the specified templates for which to perform the drawing operation. (more details...) |
Specifies whether MIL performs drawings with fail-type points differently than drawings with other types of points.
For specifying whether MIL
performs drawings with fail-type points differently
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies that MIL does not perform drawings with fail-type points differently. |
||||||||||||||||||||||||||||||||||||||
M_ENHANCED |
Specifies that MIL performs drawings with fail-type points differently than drawings with other types of points. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milbead.lib. |
DLL | Requires mil.dll; milbead.dll. |