MIL_ID ContextGraId, | //in |
MIL_ID ResultEdgeId, | //in |
MIL_ID DstImageBufOrListGraId, | //in |
MIL_INT64 Operation, | //in |
MIL_INT IndexOrLabel, | //in |
MIL_INT64 ControlFlag | //in |
This function draws specific edge results in the destination image buffer or graphics list.
To draw edge results, the required information must be available for the specified edge or group of edges, in the Edge Finder result buffer. To verify availability, call MedgeGetResult() with the required edge result combined with M_AVAILABLE.
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 edge map 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.
Note that if the edges are calculated using a calibrated source image, Edge Finder takes the calibration into account; that is, drawings might be distorted, according to the calibration. For example, a straight line (in the world) might be drawn as a curve.
Specifies the identifier of the graphics context to use when drawing. 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 Edge Finder result buffer from which to extract the results to draw. The Edge Finder result buffer must have been previously allocated on the required system using MedgeAllocResult().
The Edge Finder result buffer (ResultEdgeId) must be allocated on the same system as the graphics context buffer (ContextGraId). If it is not, an error will occur.
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 using MedgeDraw() to draw results extracted from a calibrated source image, the destination drawing buffer need not be calibrated to the same world. MedgeDraw() draws all the requested results according to the calibrated source image.
Specifies the type of operation to perform. The possible Operation parameter values in the table below can be added together to draw multiple feature results at once.
The following operations can draw in a destination image buffer or graphics list.
For specifying the type of operation to
perform
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DRAW_BOX + |
Draws a bounding box around each edge. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_CENTER_OF_GRAVITY + |
Draws a cross at the center of gravity of each edge. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_CIRCLE_FIT + |
Draws the circle fit of each edge. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_EDGE + |
Draws each edge. |
||||||||||||||||||||||||||||||||||||||
M_DRAW_EDGELS + |
Draws a cross at each edgel. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_ELLIPSE_FIT + |
Draws the ellipse fit of each edge. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_FERET_MAX + |
Draws the edges' maximum Feret, using an H-type line (|-|). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_FERET_MIN + |
Draws the edges' minimum Feret, using an H-type line (|-|). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_GENERAL_FERET + |
Draws the edges' general Feret, using an H-type line (|-|). (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_INDEX + |
Draws each edge's index value. |
||||||||||||||||||||||||||||||||||||||
M_DRAW_LABEL + |
Draws each edge's label value. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_LINE_FIT + |
Draws the line fit of each edge. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_POSITION + |
Draws a cross at the center of each edge. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_SEGMENTS + |
Draws the segments of the edge approximation. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_VERTICES + |
Draws the segment intersections (or vertices) of the edge approximation. (more details...) |
You can add the following value to the above-mentioned values to specify that the operation's numeric value is drawn.
For M_DRAW_CENTER_OF_GRAVITY,
M_DRAW_POSITION, M_DRAW_FERET_MIN, M_DRAW_FERET_MAX, and
M_DRAW_GENERAL_FERET
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DRAW_VALUE + |
Specifies that the operation's numerical value is drawn. (more details...) |
You can use one of the following values on its own, or add it to the above-mentioned values, to specify an operation that cannot use a graphics list as a destination.
The following operations can only draw in an image buffer.
For specifying operations that cannot use
a graphics list as a destination
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DRAW_ANGLE |
Draws the internal angle buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_CROSS_DERIVATIVE |
Draws the internal cross-derivative buffer of the source image. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_FIRST_DERIVATIVE_X |
Draws the internal first derivative buffer of the source image, in the X-direction. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_FIRST_DERIVATIVE_Y |
Draws the internal first derivative buffer of the source image, in the Y-direction. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_IMAGE |
Draws the source image. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_MAGNITUDE |
Draws the internal magnitude buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_MASK |
Draws the mask buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_SECOND_DERIVATIVE_X |
Draws the internal second derivative buffer of the source image, in the X-direction. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_DRAW_SECOND_DERIVATIVE_Y |
Draws the internal second derivative buffer of the source image, in the Y-direction. (more details...) |
Specifies the edge(s) to draw. This parameter must be set to one of the values below.
For specifying the edge(s) to
draw
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_INCLUDED_EDGES. |
||||||||||||||||||||||||||||||||||||||
M_ALL_EDGES + |
Specifies all edges. |
||||||||||||||||||||||||||||||||||||||
M_EXCLUDED_EDGES + |
Specifies all currently excluded edges. |
||||||||||||||||||||||||||||||||||||||
M_INCLUDED_EDGES + |
Specifies all currently included edges. |
||||||||||||||||||||||||||||||||||||||
Value + |
Specifies either the edge's index or label. (more details...) |
You can add one of the following values to the above-mentioned values to specify whether you are providing an index or a label value.
For an index or a label
value
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_INDEX |
Specifies an edge using its index value. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_TYPE_LABEL |
Specifies an edge using its label value. |
Header | Include mil.h. |
Library | Use mil.lib; miledge.lib. |
DLL | Requires mil.dll; miledge.dll. |