| Customize Help
| Save Settings

M3dmapDraw



Function Map
Synopsis
Generate an image from a 3D reconstruction context or result buffer.
Syntax
void M3dmapDraw(
MIL_ID ContextGraId, //in
MIL_ID ContextOrResult3dmapId, //in
MIL_ID DstImageBufOrListGraId, //in
MIL_INT64 Operation, //in
MIL_INT LabelOrIndex, //in
MIL_INT64 ControlFlag //in
)
Description

This function draws specific features of a 3D reconstruction context, or result buffer.

Unlike most other functions that modify a MIL object, you can call this function concurrently from multiple threads on the same M_POINT_CLOUD_RESULT result buffer (ContextOrResult3dmapId) without using a M_MUTEX object. This is valid as long as the LabelOrIndex parameter of the concurrent calls is set to a different index.

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. This parameter must be set to one of the following values:

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

ContextOrResult3dmapId

Specifies the identifier of a 3D reconstruction context or result buffer.

If you specify a 3D reconstruction context, it must have been previously allocated on the required system using M3dmapAlloc() and must have been successfully calibrated using M3dmapCalibrate().

If you specify a 3D reconstruction result buffer, it must have been previously allocated on the required system using M3dmapAllocResult(), and M3dmapAddScan() must have been called at least once on the result buffer.

[Matrox Radient eCL; Matrox Radient eV-CL (introduced U27); Matrox Radient eV-CXP (introduced M10); Matrox RadientPro-CL (Update 7); Matrox Rapixo CL Pro (Update 96); Matrox Rapixo CXP (introduced U75); Matrox Solios eA/XA; Matrox Solios ecl/xcl/ev-cl]

The 3D reconstruction context or result buffer must be allocated on the same system as the 2D graphics context (ContextGraId). If it is not, an error will occur.

DstImageBufOrListGraId

Specifies the identifier of the destination image buffer or 2D graphics list in which to draw.

If you specify to draw in an image buffer and you are drawing something from a 3D reconstruction context or result buffer, you can establish the minimum size with which to allocate the destination buffer, using M3dmapInquire() or M3dmapGetResult() with M_CAMERA_IMAGE_SIZE_X and M_CAMERA_IMAGE_SIZE_Y, respectively. In addition, you must not draw in an image buffer that has a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

If you specify a 2D graphics list, the 2D graphics list must have been previously allocated using MgraAllocList(). A 2D graphics list can only be used as a destination for certain operations.

Operation

Specifies what to draw in the destination image buffer or 2D graphics list.

The following operations can only draw in a 1-band destination image buffer.

function map For specifying the type of operation to perform
Click to summarizeValue Description
Click to summarize M_DRAW_REGION_INTERPOLATED

Draws all regions (pixels) of the laser line image that were interpolated due to missing data (gaps) in the calibration laser lines. Although the laser line can appear in these regions and be associated with a valid height, the heights will be less accurate since they are interpolated.

This drawing operation is only available if ContextOrResult3dmapId is a 3D reconstruction context allocated with M_DEPTH_CORRECTION and calibrated using M3dmapCalibrate().

(summarize)
Click to summarize M_DRAW_REGION_INVERTED

Draws all regions (pixels) of the laser line image where an inversion occured. An inversion occurs when a reference plane associated with a lower height is found above a reference plane associated with a higher height. The laser line can still appear in these regions, however, results taken from these regions will be incorrect.

This drawing operation is only available if ContextOrResult3dmapId is a 3D reconstruction context allocated with M_DEPTH_CORRECTION and calibrated using M3dmapCalibrate().

(summarize)
Click to summarize M_DRAW_REGION_MISSING_DATA

Draws all regions (pixels) of the laser line image where the laser line cannot appear, because of missing data (gaps) in the calibration laser lines that could not be accounted for by interpolation.

This drawing operation is only available if ContextOrResult3dmapId is a 3D reconstruction context allocated with M_DEPTH_CORRECTION and calibrated using M3dmapCalibrate().

(summarize)
Click to summarize M_DRAW_REGION_UNCALIBRATED

Draws all regions (pixels) of the laser line image where the laser line cannot appear, because they are outside the calibrated region.

This drawing operation is only available if ContextOrResult3dmapId is a 3D reconstruction context allocated with M_DEPTH_CORRECTION and calibrated using M3dmapCalibrate().

(summarize)
Click to summarize M_DRAW_REGION_VALID

Draws all regions (pixels) of the laser line image where the laser line can appear and be associated with a valid height.

This drawing operation is only available if ContextOrResult3dmapId is a 3D reconstruction context allocated with M_DEPTH_CORRECTION and calibrated using M3dmapCalibrate().

(summarize)

The following operations can draw in a 1-band or 3-band destination image buffer, or a 2D graphics list.

function map For specifying an operation that can draw in a 2D graphics list
Click to summarizeValue Description
Click to summarize M_DRAW_CALIBRATION_LINES

Draws all the fitted laser lines used for calibrating the 3D reconstruction setup.

This drawing operation is only available if ContextOrResult3dmapId is a 3D reconstruction context allocated with M_CALIBRATED_CAMERA_LINEAR_MOTION and calibrated using M3dmapCalibrate().

(summarize)
Click to summarize M_DRAW_CALIBRATION_PEAKS

Draws all the extracted laser lines used for calibrating the 3D reconstruction setup.

This drawing operation is only available if ContextOrResult3dmapId is a 3D reconstruction context allocated with M_CALIBRATED_CAMERA_LINEAR_MOTION and calibrated using M3dmapCalibrate().

If drawing in an image buffer, the 2D graphics context cannot have any zoom factors associated with it (MgraControl() with M_DRAW_ZOOM_X or M_DRAW_ZOOM_Y must be set to 1.0).

(summarize)
Click to summarize M_DRAW_PEAKS_LAST

Draws the laser line that would have produced the most recent results stored in the 3D reconstruction result buffer using M3dmapAddScan().

This drawing operation is only available if ContextOrResult3dmapId is a 3D reconstruction result buffer, allocated using M3dmapAllocResult().

(summarize)
LabelOrIndex

Reserved for future expansion and must be set to M_DEFAULT.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; mil3dmap.lib.
DLL Requires mil.dll; mil3dmap.dll.
DEFAULT PROC NONE DRAW REGION INTERPOLATED DRAW REGION INVERTED DRAW REGION MISSING DATA DRAW REGION UNCALIBRATED DRAW REGION VALID DRAW CALIBRATION LINES DRAW CALIBRATION PEAKS DRAW PEAKS LAST