Filters
Filter values by
Result Type
  • 3D reconstruction result buffer
    • Laser line data
    • Depth corrected data
| Customize Help
| Save Settings

M3dmapGetResult



Function Map
Synopsis
Get the specified type of result(s) from a 3D reconstruction result buffer.
Syntax
void M3dmapGetResult(
MIL_ID Result3dmapId, //in
MIL_INT LabelOrIndex, //in
MIL_INT64 ResultType, //in
void *ResultArrayPtr //out
)
Description

This function retrieves the result(s) of the specified type from a result buffer. For M_LASER_CALIBRATION_DATA, M_DEPTH_CORRECTED_DATA, and M_POINT_CLOUD_RESULT 3D reconstruction result buffers, results are available after using M3dmapAddScan() to fill the result buffer with the extracted laser line data.

An M_POINT_CLOUD_RESULT 3D reconstruction result buffer contains an array of distinct point clouds. You can retrieve results from an individual point cloud in the result buffer, from an aggregate of all point clouds in the result buffer, or from the result buffer itself using the LabelOrIndex parameter.

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
Result3dmapId

Specifies the identifier of the 3D reconstruction result buffer from which to retrieve results.

LabelOrIndex

Specifies the point cloud(s) in the specified 3D reconstruction result buffer, or the entire result buffer itself, from which to get results. Only 3D reconstruction result buffers allocated using M_POINT_CLOUD_RESULT have point clouds that can be specified using this parameter. For all other types of 3D reconstruction result buffers, set this parameter to M_DEFAULT.

function map For specifying the point cloud(s) or point cloud container
Click to summarizeValue Description
Click to summarize

Specifies the array index of a point cloud in the specified 3D reconstruction result buffer.

(summarize)
Parameters

Specifies the array index of an existing point cloud.

Click to summarize

Specifies the label for a point cloud in the specified 3D reconstruction result buffer.

(summarize)
Parameters

Specifies the label of an existing point cloud.

Click to summarize M_ALL

Specifies to get results about all point clouds in the specified 3D reconstruction result buffer.

Click to summarize M_GENERAL

Specifies to get results about the point cloud container (3D reconstruction result buffer allocated using M_POINT_CLOUD_RESULT).

ResultType

Specifies the type of result to get.

See the Parameter associations section for possible values that can be specified.

ResultArrayPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ]
  • array of type MIL_FLOAT [optionally, in C++: a reference to a std::vector<MIL_FLOAT> ]
  • array of type MIL_ID [optionally, in C++: a reference to a std::vector<MIL_ID> ]
  • array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ]
  • array of type MIL_INT16 [optionally, in C++: a reference to a std::vector<MIL_INT16> ]
  • array of type MIL_INT32 [optionally, in C++: a reference to a std::vector<MIL_INT32> ]
  • array of type MIL_INT64 [optionally, in C++: a reference to a std::vector<MIL_INT64> ]
  • MIL_DOUBLE
  • MIL_FLOAT
  • MIL_ID
  • MIL_INT
  • MIL_INT16
  • MIL_INT32
  • MIL_INT64

Specifies the address in which to write the results.

When LabelOrIndex is set to M_ALL, you must specify the address of an array with as many elements as point clouds in the point cloud container. You can inquire the number of point clouds using M3dmapInquire() set to M_NUMBER_OF_POINT_CLOUDS.

See the Parameter associations section for possible values that can be returned.

To retrieve a result from an M_POINT_CLOUD_RESULT 3D reconstruction result buffer, the ResultType parameter can be set to one of the following values:

function map For retrieving results from a 3D reconstruction result buffer of type M_POINT_CLOUD_RESULT
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_HAS_FEATURE +

Retrieves whether the specified point cloud(s) have the specified feature (such as position or intensity data). The feature is specified using the combination value.

When the LabelOrIndex parameter is set to M_POINT_CLOUD_INDEX() or M_POINT_CLOUD_LABEL(), M_HAS_FEATURE returns whether the specified point cloud has the feature.

When the LabelOrIndex parameter is set to M_GENERAL, M_HAS_FEATURE returns whether all the point clouds in the specified result buffer have the feature.

When the LabelOrIndex parameter is set to M_ALL, M_HAS_FEATURE returns an array where the value of each element in the array is whether the point cloud at the corresponding index has the feature.


You must specify a combination value from the following table:
(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_FALSE

Specifies that the specified point cloud(s) do not have the feature.

Click to summarize M_TRUE

Specifies that the specified point cloud(s) do have the feature.

Click to summarize M_NUMBER_OF_3D_POINTS +

Retrieves the number of 3D points extracted from laser line data and stored in the specified point cloud(s).

When the LabelOrIndex parameter is set to M_POINT_CLOUD_INDEX() or M_POINT_CLOUD_LABEL(), M_NUMBER_OF_3D_POINTS returns the number of points in the specified point cloud.

When the LabelOrIndex parameter is set to M_GENERAL, M_NUMBER_OF_3D_POINTS returns the total number of points in all the point clouds in the specified result buffer.

When the LabelOrIndex parameter is set to M_ALL, M_NUMBER_OF_3D_POINTS returns an array where the value of each element in the array is the number of points in the point cloud at the corresponding index.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize Value >= 0

Specifies the number of 3D points.

Click to summarize M_TOTAL_DISPLACEMENT_Y +

Retrieves the total displacement along the Y-axis (typically the conveyor) from the first call to M3dmapAddScan().

If the value of M_SCAN_SPEED (M3dmapControl()) has remained constant since the last call to M3dmapClear(), M_TOTAL_DISPLACEMENT_Y is equivalent to M_SCAN_SPEED x (number of calls to M3dmapAddScan()-1).

M_TOTAL_DISPLACEMENT_Y is only available when the LabelOrIndex parameter is set to M_GENERAL.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Combination values for M_HAS_FEATURE.

You must add one of the following values to the above-mentioned value to determine whether the feature exists in the specified location.

function map For specifying the feature to check
Click to summarize
Combination value
Description
Click to summarize M_INTENSITY

Specifies to determine if intensity information exists in the specified point cloud(s).

Click to summarize M_POSITION

Specifies to determine if position information exists in the specified point cloud(s).

Combination value for M_NUMBER_OF_3D_POINTS.

You can add the following value to the above-mentioned value to specify which 3D points should be included when returning the number of points.

function map For modifying the number of points returned
Click to summarize
Combination value
Description
Click to summarize M_EXCLUDE_INVALID_POINTS +

Specifies to exclude all points in the specified point cloud(s) that are set to M_INVALID_POINT. Only valid points are included in the calculation.

(summarize)

You can add the following value to the above-mentioned values to specify to return the points of the last scan only.

function map For including the last scan only
Click to summarize
Combination value
Description
Click to summarize M_LAST_SCAN

Specifies to return only those points generated during the last call to M3dmapAddScan().

To retrieve a result about partially corrected depth maps from an M_DEPTH_CORRECTED_DATA 3D reconstruction result buffer, the ResultType parameter can be set to one of the following values:

function map For retrieving results from a 3D reconstruction result buffer of type M_DEPTH_CORRECTED_DATA
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_PARTIALLY_CORRECTED_DEPTH_MAP_BUFFER_TYPE +

Retrieves the data type and depth that an image buffer should have to store the partially corrected depth map.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_UNSIGNED + 8

Specifies that the image buffer should be an 8-bit unsigned buffer.

Click to summarize M_UNSIGNED + 16

Specifies that the image buffer should be a 16-bit unsigned buffer.

Click to summarize M_PARTIALLY_CORRECTED_DEPTH_MAP_SIZE_X +

Retrieves the X-size, in pixels, that an image buffer should have to store the partially corrected depth map.

If the MimControl() M_SCAN_LANE_DIRECTION control type setting is set to M_VERTICAL, this is equal to the X-size of the image buffer passed to M3dmapAddScan().

If the MimControl() M_SCAN_LANE_DIRECTION control type setting is set to M_HORIZONTAL, this is equal to the Y-size of the image buffer passed to M3dmapAddScan().

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_PARTIALLY_CORRECTED_DEPTH_MAP_SIZE_Y +

Retrieves the Y-size, in pixels, that an image buffer should have to store the partially corrected depth map.

This is equal to the number of times M3dmapAddScan() was called or the value of the M_MAX_FRAMES control, whichever is smaller.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE

To retrieve a result from a 3D reconstruction result buffer of type M_LASER_CALIBRATION_DATA or M_DEPTH_CORRECTED_DATA, or from an individual point cloud, the ResultType parameter can be set to one of the following values:

function map For retrieving results from a 3D reconstruction result buffer of type M_LASER_CALIBRATION_DATA or M_DEPTH_CORRECTED_DATA, or individual point clouds.
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_CAMERA_IMAGE_SIZE_X +

Retrieves the X-size of the image buffer from which the last laser line was extracted using M3dmapAddScan().

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CAMERA_IMAGE_SIZE_Y +

Retrieves the Y-size of the image buffer from which the last laser line was extracted using M3dmapAddScan().

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_INTENSITY_MAP_BUFFER_TYPE +

Retrieves the data type and depth that an image buffer should have to store the intensity map.

The returned depth and data type are the same as those of the image buffer, passed to M3dmapAddScan(), containing the grabbed image of the laser line.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_UNSIGNED + 8

Specifies that the image buffer should be an 8-bit unsigned buffer.

Click to summarize M_UNSIGNED + 16

Specifies that the image buffer should be a 16-bit unsigned buffer.

Click to summarize M_NUMBER_OF_MISSING_DATA_LAST_SCAN +

Retrieves the number of points (pixels) with unknown values in the last laser line extracted using M3dmapAddScan().

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_SCAN_LANE_DIRECTION +

Retrieves whether laser line detection was performed vertically or horizontally.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_UNCORRECTED_DEPTH_MAP_BUFFER_TYPE +

Retrieves the data type and depth that an image buffer should have to store the uncorrected depth map.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_UNSIGNED + 8

Specifies that the image buffer should be an 8-bit unsigned buffer.

Click to summarize M_UNSIGNED + 16

Specifies that the image buffer should be a 16-bit unsigned buffer.

Click to summarize M_UNCORRECTED_DEPTH_MAP_FIXED_POINT +

Retrieves the number of fractional bits used for the uncorrected depth map.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_UNCORRECTED_DEPTH_MAP_SIZE_X +

Retrieves the X-size, in pixels, that an image buffer should have to store the uncorrected depth map.

Note that M_UNCORRECTED_DEPTH_MAP_SIZE_X is also the X-size for storing the intensity map.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_UNCORRECTED_DEPTH_MAP_SIZE_Y +

Retrieves the Y-size, in pixels, that an image buffer should have to store the uncorrected depth map.

Note that M_UNCORRECTED_DEPTH_MAP_SIZE_Y is also the Y-size for storing the intensity map.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE

You can add the following value to the above-mentioned values to determine the required array size (number of elements) to store the returned values.

function map For determining the required array size (number of elements) to store the returned values
Click to summarizeResultType combination value Description
ResultArrayPtr
- Possible values returned
Click to summarize M_NB_ELEMENTS

Retrieves the required array size (number of elements) to store the returned values.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE MORE

You can add the following value to the above-mentioned values to determine whether a result is available.

function map For determining whether results are available
Click to summarizeResultType Description
ResultArrayPtr
- Possible values returned
Click to summarize M_AVAILABLE

Retrieves whether a result is available to be returned.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize M_NULL

Specifies that the result is not available to be returned.

Click to summarize Value != 0

Specifies that the result is available to be returned.

You can add one of the following values to the above-mentioned values to cast the requested results to the required data type.

Note: In C++, when using a standard vector (std::vector) instead of an array, the values listed in this combination table must not be used. If you need to use a specific data type, instantiate the vector with the necessary data type.

function map For specifying the data type
Click to summarizeResultType Description
ResultArrayPtr
- Possible values returned
Click to summarize M_TYPE_MIL_DOUBLE

Casts the requested results to a MIL_DOUBLE.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ]  |  address of a MIL_DOUBLE MORE
Click to summarize M_TYPE_MIL_FLOAT

Casts the requested results to a MIL_FLOAT.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_FLOAT [optionally, in C++: a reference to a std::vector<MIL_FLOAT> ]  |  address of a MIL_FLOAT MORE
Click to summarize M_TYPE_MIL_ID

Casts the requested results to a MIL_ID.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_ID [optionally, in C++: a reference to a std::vector<MIL_ID> ]  |  address of a MIL_ID MORE
Click to summarize M_TYPE_MIL_INT

Casts the requested results to a MIL_INT.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ]  |  address of a MIL_INT MORE
Click to summarize M_TYPE_MIL_INT16

Casts the requested results to a MIL_INT16.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_INT16 [optionally, in C++: a reference to a std::vector<MIL_INT16> ]  |  address of a MIL_INT16 MORE
Click to summarize M_TYPE_MIL_INT32

Casts the requested results to a MIL_INT32.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_INT32 [optionally, in C++: a reference to a std::vector<MIL_INT32> ]  |  address of a MIL_INT32 MORE
Click to summarize M_TYPE_MIL_INT64

Casts the requested results to a MIL_INT64.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_INT64 [optionally, in C++: a reference to a std::vector<MIL_INT64> ]  |  address of a MIL_INT64 MORE
Compilation information
Header Include mil.h.
Library Use mil.lib; mil3dmap.lib.
DLL Requires mil.dll; mil3dmap.dll.
ALL GENERAL HAS FEATURE FALSE TRUE NUMBER OF 3D POINTS TOTAL DISPLACEMENT Y INTENSITY POSITION EXCLUDE INVALID POINTS LAST SCAN PARTIALLY CORRECTED DEPTH MAP BUFFER TYPE UNSIGNED 8 UNSIGNED 16 PARTIALLY CORRECTED DEPTH MAP SIZE X PARTIALLY CORRECTED DEPTH MAP SIZE Y CAMERA IMAGE SIZE X CAMERA IMAGE SIZE Y INTENSITY MAP BUFFER TYPE UNSIGNED 8 UNSIGNED 16 NUMBER OF MISSING DATA LAST SCAN SCAN LANE DIRECTION HORIZONTAL VERTICAL UNCORRECTED DEPTH MAP BUFFER TYPE UNSIGNED 8 UNSIGNED 16 UNCORRECTED DEPTH MAP FIXED POINT UNCORRECTED DEPTH MAP SIZE X UNCORRECTED DEPTH MAP SIZE Y NB ELEMENTS AVAILABLE NULL TYPE MIL DOUBLE TYPE MIL FLOAT TYPE MIL ID TYPE MIL INT TYPE MIL INT16 TYPE MIL INT32 TYPE MIL INT64 DEFAULT DEFAULT ALL ALL