| Customize Help
| Save Settings

M3dregInquire



Function Map
Synopsis
Inquire information about a pairwise 3D registration context or a pairwise 3D registration result buffer.
Syntax
MIL_INT64 M3dregInquire(
MIL_ID ContextOrResult3dregId, //in
MIL_INT64 Index, //in
MIL_INT64 InquireType, //in
void *UserVarPtr //out
)
Description

This function inquires information about a pairwise 3D registration context or a pairwise 3D registration result buffer.

In addition, this function can inquire the settings for stop conditions for the registration operation executed by M3dregCalculate(). To inquire whether a stop condition was met, call M3dregGetResult() with M_STATUS.

Note that for a 3D pairwise registration result buffer, this function only retrieves information about the buffer's settings (set using M3dregAllocResult() or M3dregControl()). To retrieve results from the registration result buffer, use M3dregGetResult().

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 if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
ContextOrResult3dregId

Specifies the identifier of the 3D pairwise registration context or a pairwise 3D registration result buffer to inquire. The pairwise 3D registration context is allocated with M3dregAlloc(), and the pairwise 3D registration result buffer is allocated with M3dregAllocResult().

Index

Specifies to inquire a pairwise 3D registration context, an individual registration element (or all registration elements), or a pairwise 3D registration result buffer. Set this parameter to one of the following values:

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

Specifies the default behavior.

If ContextOrResult3dregId specifies a pairwise 3D registration context, then M_DEFAULT is the same as M_CONTEXT.

If ContextOrResult3dregId specifies a pairwise 3D registration result buffer, then M_DEFAULT is the same as M_GENERAL.

(summarize)
Click to summarize M_ALL

Specifies to inquire all registration elements of a pairwise 3D registration context or all registration result elements of a pairwise 3D registration result buffer.

Click to summarize M_CONTEXT

Specifies to inquire a pairwise 3D registration context.

Click to summarize M_GENERAL

Specifies to inquire a pairwise 3D registration result buffer.

Click to summarize 0 <= Value <
M3dregInquire(ContextOrResult3dregId, M_NUMBER_OF_REGISTRATION_ELEMENTS)

Specifies the index of the registration element or registration result element to inquire.

InquireType

Specifies the type of setting about which to inquire.

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

UserVarPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • defined-elsewhere-in-parameter
  • MIL_DOUBLE
  • MIL_FLOAT
  • MIL_ID
  • MIL_INT
  • MIL_INT32
  • MIL_INT64

Specifies the address in which to write the requested information. Since the M3dregInquire() function also returns the requested information, you can set this parameter to M_NULL.

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

For the following inquire types, the ContextOrResult3dregId parameter must specify a 3D registration context or a 3D registration result buffer. The Index parameter must be set to M_CONTEXT or M_GENERAL, for a 3D registration context or 3D registration result buffer respectively.

function map For inquiring a pairwise 3D registration context or a pairwise 3D registration result buffer
Click to summarizeInquireType Description
UserVarPtr
- Possible values returned
Click to summarize M_NUMBER_OF_REGISTRATION_ELEMENTS +

Inquires the number of registration elements in the 3D registration context, or the number of registration result elements in the 3D registration result buffer. SET

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize 2 <= Value <= 65535

Specifies the number of registration elements or registration result elements.

The default value is 2.

(summarize)

For a pairwise 3D registration context, when Index is set to M_CONTEXT, the InquireType parameter can be set to one of the following:

function map For inquiring a pairwise 3D registration context
Click to summarizeInquireType Description
UserVarPtr
- Possible values returned
Click to summarize M_ERROR_MINIMIZATION_METRIC +

Inquires the technique for performing the pairwise comparison during each iteration of the registration operation, and establishes how to compute the RMS error.

The best technique for a given registration depends on how many large and flat surfaces the object represented by the point cloud has. Using the correct setting can help avoid registration sliding (when multiple different registration are possible because of large planar surfaces) or diverging (when the registration operation results in the point clouds moving apart). SET

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

Specifies to calculate the RMS error using the shortest distance between the point (in the reference point cloud), and the plane tangent to the other paired point. The tangent plane is calculated using the normal of the latter point.

This setting improves the speed of registering organized point clouds where the normal at a given point is not similar to the normal at nearby points. This implies that the object represented by the point cloud has a large range of surface directions, and no relatively large flat surfaces. Large surfaces can result in the registration sliding or diverging.

This is the default value.

(summarize)
Click to summarize M_POINT_TO_POINT

Specifies to calculate the RMS error using the distance between the paired points.

This setting is better suited to registering point clouds that represent objects with large planar surfaces, and will avoid registration sliding or diverging.

(summarize)
Click to summarize M_MAX_ITERATIONS +

Inquires a stop condition for the iterative registration operation. If the maximum number of iterations is reached, the registration operation stops.

To inquire whether this stop condition was met, call M3dregGetResult() with M_STATUS.

Note that preregistration constitutes the first iteration. SET

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT
Click to summarize Value > 0

Specifies the maximum number of iterations in the registration operation.

The default value is 20.

(summarize)
Click to summarize M_PREREGISTRATION_MODE +

Inquires how to perform the preregistration step. SET

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

Specifies to apply the preregistration transformation matrix, specified using M3dregSetLocation(); then automatically register the centroids (center of mass) of the two point clouds.

By default, the registration of the centroids is a translation only and does not include any rotation.

(summarize)
Click to summarize M_USER_DEFINED

Specifies to apply the preregistration transformation matrix in the first iteration of the registration operation.

This is the default value.

(summarize)
Click to summarize M_RMS_ERROR_RELATIVE_THRESHOLD +

Inquires the stop condition for the registration operation that tests the percentage change of the root-mean-square (RMS) error of successive iterations. The RMS error is calculated from the distance between all paired points. You can control how the distance is calculated using M_ERROR_MINIMIZATION_METRIC.

If this stop condition is met, the registration is typically considered correct.

Note that the specified value represents a percentage, so the default value of 0.1 represents 0.1%, not 10%. SET

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize Value >= 0.0

Specifies the relative RMS error threshold.

The default value is 0.1.

(summarize)
Click to summarize M_RMS_ERROR_THRESHOLD +

Inquires the stop condition for the registration operation that tests the root-mean-square (RMS) error of successive iterations. The RMS error is calculated from the distance between all paired points. You can control how the distance is calculated using M_ERROR_MINIMIZATION_METRIC.

If this stop condition is met, the registration is typically considered correct. SET

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize Value >= 0.0

Specifies the RMS error threshold.

The default value is 0.0.

(summarize)
Click to summarize M_SUBSAMPLE +

Inquires whether to enable subsampling before applying the registration.

Settings for subsampling techniques are defined in a subsampling context. Every registration context contains a subsampling context.

To change the settings of the subsampling context, call M3dregInquire() with M_SUBSAMPLE_CONTEXT_ID to first get the MIL identifier of the subsampling context. The subsampling context can then be controlled using M3dimControl() (see the settings available for Subsample context ID). SET

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

Specifies to disable subsampling before applying the registration.

This is the default value.

(summarize)
Click to summarize M_ENABLE

Specifies to enable subsampling before applying the registration.

Click to summarize M_SUBSAMPLE_CONTEXT_ID +

Inquires the ID of the subsampling context within the specified registration context.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_ID
Click to summarize Subsample Context ID

Specifies the MIL identifier of the subsampling context.

For a 3D pairwise registration context, when Index is set to an index value or M_ALL, the InquireType parameter can be set to one of the following:

function map For inquiring the registration elements of a 3D pairwise registration context
Click to summarizeInquireType Description
UserVarPtr
- Possible values returned
Click to summarize M_OVERLAP +

Sets the percentage of all possible point pairings to use in a single iteration of the registration operation.

For example, if you specify 80%, then during each iteration, the top 80% of point pairings are used to generate an RMS error and are used to calculate a transformation. This excludes the 20% worst point pairings, which often contains outliers in the reference point cloud. These outliers are typically caused by image noise, occlusion, or object deformity.

Typically, if there are fewer points in the reference point cloud than in the point cloud that will be registered to it, the overlap should roughly equal the ratio of the points in the reference point cloud to the points in the other point cloud.

If the density of points is the same in both point clouds, this ratio could be set to the exact ratio between the two. For example, if there are 100 points in the reference point cloud, 200 points in the point cloud that will be registered to it, and they have a similar density, then the overlap can be set to 50%.

If there are more points in the reference point cloud, this value should be set to a little under 100%. In this case, you should use as many of the points in the reference point cloud as possible while still accounting for outliers. SET

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize 0.0 < Value <= 100.0

Specifies the percentage of possible paired points included in each iteration of the registration operation.

The default value is 80.0.

(summarize)

For a 3D pairwise registration result buffer, when Index is set to an index value or M_ALL, the InquireType parameter can be set to one of the following:

function map For inquiring the registration elements of a 3D pairwise registration result buffer
Click to summarizeInquireType Description
UserVarPtr
- Possible values returned
Click to summarize M_ITERATION_INDEX +

Inquires the index of the iteration from which to copy the transformation matrix or get results. SET

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

Specifies the final iteration of the registration operation.

This is the default value.

(summarize)
Click to summarize Value >= 0

Specifies the iteration index.

You can add one of the following values to the above-mentioned values to get information about the default value of an inquire type, regardless of the current value of the inquire type.

function map For inquiring about the default value
Click to summarizeInquireType Description
UserVarPtr
- Possible values returned
Click to summarize M_DEFAULT

Inquires the default value of the specified inquire type.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: defined elsewhere
Click to summarize M_IS_SET_TO_DEFAULT

Inquires whether the specified inquire type is set to its default value.

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

Specifies that the inquire type is not set to its default value.

Click to summarize M_TRUE

Specifies that the inquire type is set to its default value.

You can add the following value to the above-mentioned values to determine whether an inquire type is supported.

function map To inquire whether an inquire type is supported
Click to summarizeInquireType Description
UserVarPtr
- Possible values returned
Click to summarize M_SUPPORTED

Inquires whether the specified inquire type is supported for the 3D registration context.

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

Specifies that the inquire type is not supported.

Click to summarize Value != 0

Specifies that the inquire type is supported.

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

function map To specify the data type
Click to summarizeInquireType Description
UserVarPtr
- Possible values returned
Click to summarize M_TYPE_MIL_DOUBLE

Casts the requested information to a MIL_DOUBLE.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_TYPE_MIL_FLOAT

Casts the requested information to a MIL_FLOAT.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_FLOAT
Click to summarize M_TYPE_MIL_INT

Casts the requested information to a MIL_INT.

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

Casts the requested information to a MIL_INT32.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT32
Click to summarize M_TYPE_MIL_INT64

Casts the requested information to a MIL_INT64.

(summarize)
Expand data type infoCollapse data type info UserVarPtr extra info
Data type info: Data type: address of a MIL_INT64
Return value
The returned value is the requested information, cast to a MIL_INT64. If the requested information does not fit into a MIL_INT64, this function will return M_NULL or truncate the information.
Compilation information
Header Include mil.h.
Library Use mil.lib; mil3dreg.lib.
DLL Requires mil.dll; mil3dreg.dll.
DEFAULT ALL CONTEXT GENERAL NUMBER OF REGISTRATION ELEMENTS) NUMBER OF REGISTRATION ELEMENTS ERROR MINIMIZATION METRIC POINT TO PLANE POINT TO POINT MAX ITERATIONS PREREGISTRATION MODE CENTROID USER DEFINED RMS ERROR RELATIVE THRESHOLD RMS ERROR THRESHOLD SUBSAMPLE DISABLE ENABLE SUBSAMPLE CONTEXT ID OVERLAP ITERATION INDEX LAST ITERATION DEFAULT IS SET TO DEFAULT FALSE TRUE SUPPORTED NULL TYPE MIL DOUBLE TYPE MIL FLOAT TYPE MIL INT TYPE MIL INT32 TYPE MIL INT64