Filters
Filter values by
Result type
  • Depth-from-focus registration result
  • Extended depth of field registration result
  • High dynamic range registration result
  • Depth-from-focus registration result
  • Correlation-stitching registration result
| Customize Help
| Save Settings

MregDraw



Function Map
Synopsis
Draw specific features of the registration results in an image buffer or 2D graphics list.
Syntax
void MregDraw(
MIL_ID ContextGraId, //in
MIL_ID ResultRegId, //in
MIL_ID DstImageBufOrListGraId, //in
MIL_INT64 Operation, //in
MIL_INT Index, //in
MIL_INT64 ControlFlag //in
)
Description

This function draws specific features of the registration results in the destination image buffer or 2D graphics list.

To draw these results, the required information must be available in the registration result buffer.

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. This parameter must be set to one of the following values. Note that while this parameter is required for calling MregDraw(), when using an M_EXTENDED_DEPTH_OF_FIELD_RESULT result buffer, this parameter will not affect the function.

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().

ResultRegId

Specifies the identifier of the registration result buffer from which to extract the results to draw. The registration result buffer must have been previously allocated on the required system using MregAllocResult().

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 type of operation to perform. This parameter can be set to one of the following:

function map For specifying the operation
Click to summarizeValue Description
Click to summarize M_DRAW_ALBEDO_IMAGE

Draws the albedo image into the target buffer.

Note that this operation is only available for an M_PHOTOMETRIC_STEREO_RESULT registration result buffer.

(summarize)
Click to summarize M_DRAW_BOX

Draws the bounding box of the image associated with the specified registration element, at its position, angle, and scale. The position, angle, and scale are determined by the registration.

Note that this operation is only available for an M_STITCHING_RESULT registration result buffer.

(summarize)
Click to summarize M_DRAW_DEPTH_CONFIDENCE_MAP

Draws the confidence map into the target buffer.

Note that this operation is only available for an M_DEPTH_FROM_FOCUS_RESULT registration result buffer. To enable the computation of the confidence map when performing a depth-from-focus registration operation, you must use MregControl() with M_CONFIDENCE_MAP set to M_ENABLE.

(summarize)
Click to summarize M_DRAW_DEPTH_INDEX_MAP

Draws the index map into the target buffer.

Note that this operation is only available for an M_DEPTH_FROM_FOCUS_RESULT registration result buffer.

(summarize)
Click to summarize M_DRAW_DEPTH_INTENSITY_MAP

Draws the intensity map into the target buffer.

Note that this operation is only available for an M_DEPTH_FROM_FOCUS_RESULT registration result buffer. To enable the computation of the intensity map when performing a depth-from-focus registration operation, you must use MregControl() with M_INTENSITY_MAP set to M_ENABLE.

(summarize)
Click to summarize M_DRAW_EDOF_IMAGE

Draws the extended depth of field (EDoF) image into the target buffer. In this case, the DstImageBufOrListGraId parameter must be set to an image buffer.

Note that this operation is only available for an M_EXTENDED_DEPTH_OF_FIELD_RESULT registration result buffer.

(summarize)
Click to summarize M_DRAW_GAUSSIAN_CURVATURE_IMAGE

Draws the Gaussian curvature map image into the target buffer.

Note that this operation is only available for an M_PHOTOMETRIC_STEREO_RESULT registration result buffer. To enable computation of the Gaussian curvature image when performing a photometric stereo registration operation, MregControl() with M_GAUSSIAN_CURVATURE must be set to M_ENABLE.

(summarize)
Click to summarize M_DRAW_HDR_FULL_IMAGE

Draws the internal HDR image, without tone mapping, into the target buffer. In this case, the DstImageBufOrListGraId parameter must be set to an image buffer. The internal HDR image is remapped to use the full range of the target buffer, which must have a bit depth that is twice that of the source images. For example, if the source images are 8-bit, then the raw HDR image must be written to a 16-bit buffer.

Note that this operation is only available for an M_HIGH_DYNAMIC_RANGE_RESULT registration result buffer.

(summarize)
Click to summarize M_DRAW_HDR_IMAGE

Draws the tone mapped HDR image into the target buffer, which should have the same bit depth and data type as the source image buffers. The image will be remapped if the provided target buffer is different. For this operation, the DstImageBufOrListGraId parameter must be set to an image buffer.

Note that, if tone mapping was not enabled (M_TONE_MAPPING_MODE set to M_DISABLE), the image drawn with M_DRAW_HDR_IMAGE is the raw HDR image where the image's lowest pixel value has been subtracted from all pixel values. This ensures that the image has a true black value (minimum pixel value of 0).

Note that this operation is only available for an M_HIGH_DYNAMIC_RANGE_RESULT registration result buffer.

(summarize)
Click to summarize M_DRAW_LOCAL_CONTRAST_IMAGE

Draws the local contrast image into the target buffer.

Note that this operation is only available for an M_PHOTOMETRIC_STEREO_RESULT registration result buffer. To enable computation of the local contrast image when performing a photometric stereo registration operation, MregControl() with M_LOCAL_CONTRAST must be set to M_ENABLE.

(summarize)
Click to summarize M_DRAW_LOCAL_SHAPE_IMAGE

Draws the local shape image into the target buffer.

Note that this operation is only available for an M_PHOTOMETRIC_STEREO_RESULT registration result buffer. To enable computation of the local shape image when performing a photometric stereo registration operation, MregControl() with M_LOCAL_SHAPE must be set to M_ENABLE.

(summarize)
Click to summarize M_DRAW_MEAN_CURVATURE_IMAGE

Draws the mean curvature map image into the target buffer.

Note that this operation is only available for an M_PHOTOMETRIC_STEREO_RESULT registration result buffer. To enable computation of the mean curvature image when performing a photometric stereo registration operation, MregControl() with M_MEAN_CURVATURE must be set to M_ENABLE.

(summarize)
Click to summarize M_DRAW_TEXTURE_IMAGE

Draws the texture image into the target buffer.

Note that this operation is only available for an M_PHOTOMETRIC_STEREO_RESULT registration result buffer. To enable computation of the texture image when performing a photometric stereo registration operation, MregControl() with M_TEXTURE_IMAGE must be set to M_ENABLE.

(summarize)
Index

Specifies the registration element that is associated with the image whose features you want to draw when drawing results of an M_STITCHING_RESULT registration result buffer. This parameter must be set to one of the values below.

function map For specifying the registration element
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies the default value.

For an M_STITCHING_RESULT result buffer, same as M_ALL.

For an M_EXTENDED_DEPTH_OF_FIELD_RESULT, M_DEPTH_FROM_FOCUS_RESULT, M_HIGH_DYNAMIC_RANGE_RESULT, or M_PHOTOMETRIC_STEREO_RESULT result buffer, this is the only possible value.

(summarize)
Click to summarize M_ALL

Specifies all registration elements.

Click to summarize 0 <= Value <
M_NUMBER_OF_REGISTRATION_ELEMENTS

Specifies the registration element's index.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; milreg.lib.
DLL Requires mil.dll; milreg.dll.
DEFAULT NONE DRAW ALBEDO IMAGE DRAW BOX DRAW DEPTH CONFIDENCE MAP DRAW DEPTH INDEX MAP DRAW DEPTH INTENSITY MAP DRAW EDOF IMAGE DRAW GAUSSIAN CURVATURE IMAGE DRAW HDR FULL IMAGE DRAW HDR IMAGE DRAW LOCAL CONTRAST IMAGE DRAW LOCAL SHAPE IMAGE DRAW MEAN CURVATURE IMAGE DRAW TEXTURE IMAGE DEFAULT ALL NUMBER OF REGISTRATION ELEMENTS DEFAULT DEFAULT DEFAULT DEFAULT DEFAULT ENABLE DEFAULT ENABLE