| Customize Help
| Save Settings

M3dimProfile



Function Map
Synopsis
Takes the profile of a depth map or point cloud, along a specified slicing plane.
Syntax
void M3dimProfile(
MIL_ID SrcContainerOrImageBufId, //in
MIL_ID ProfileResult3dimId, //in
MIL_INT64 ProfileType, //in
MIL_INT64 Param1, //in
MIL_DOUBLE Param2, //in
MIL_DOUBLE Param3, //in
MIL_DOUBLE Param4, //in
MIL_DOUBLE Param5, //in
MIL_INT64 ControlFlag //in
)
Description

This function takes the profile of a depth map or point cloud, along a specified slicing plane. The specified result buffer is filled with coordinates that make up the profile.

For a depth map profile, pixels are sampled along a specified line and corresponding points are extracted. The specified line effectively defines a slicing plane for the depth map, since the pixels' intensity values indicate depth (Z-values).

For a point cloud profile, 3D points are sampled and extracted along a specified slicing plane, which is divided into a grid of cells. For each cell, if points exist within the specified cutoff distance (perpendicular to the plane), the point closest to the plane is selected for the profile.

Note that the profile contains valid points only. No profile points are extracted from gaps in the depth map or invalid points in the point cloud.

You can retrieve results using M3dimGetResult(). To draw the profile, use MgraDots() or M3dgraDots().

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
SrcContainerOrImageBufId

Specifies the identifier of the source point cloud container or depth map image buffer.

The container must be 3D-processable (that is, if you call MbufInquireContainer() with M_3D_PROCESSABLE, the function returns M_PROCESSABLE). The container must have been previously allocated using MbufAllocContainer() with M_PROC.

The image buffer must be an 8-bit, 16-bit, or 32-bit unsigned, 1-band buffer, and must contain a fully corrected depth map (that is, if you call McalInquire() with M_DEPTH_MAP, the function returns M_TRUE). This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

ProfileResult3dimId

Specifies the identifier of the profile 3D image processing result buffer. The result buffer must have been allocated using M3dimAllocResult() with M_PROFILE_RESULT.

ProfileType

Specifies the type of profile to generate.

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

Param1

Specifies the first parameter. Depends on ProfileType.

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

Param2

Specifies the second parameter. Depends on ProfileType.

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

Param3

Specifies the third parameter. Depends on ProfileType.

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

Param4

Specifies the fourth parameter. Depends on ProfileType.

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

Param5

Specifies the fifth parameter. Depends on ProfileType.

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

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

The table below lists possible values for the ProfileType, Param1, Param2, Param3, Param4, and Param5 parameters.

Set unused parameters to M_DEFAULT.

function map For specifying the profile type
Click to summarizeProfileType Description
Param1
Param2
Param3
Param4
Param5
Click to summarize M_PROFILE_DEPTH_MAP

Specifies to take the profile of a depth map. Points are extracted along the specified line. If the line crosses a valid depth map pixel, the corresponding point is included in the profile. Note that invalid pixels (gaps) are ignored.

The source object (SrcContainerOrImageBufId) must be a depth map image buffer.

(summarize)
Click to summarize Param1

Sets the units with which to interpret the Param2, Param3, Param4, and Param5 parameters, when taking the profile of a depth map.

(summarize)
Click to summarize M_PIXEL

Specifies to interpret the values in pixel units.

Click to summarize M_WORLD

Specifies to interpret the values in world units.

Click to summarize Param2

Specifies the X-coordinate of the first point that defines the line.

Click to summarize Param3

Specifies the Y-coordinate of the first point that defines the line.

Click to summarize Param4

Specifies the X-coordinate of the second point that defines the line.

Click to summarize Param5

Specifies the Y-coordinate of the second point that defines the line.

Click to summarize M_PROFILE_POINT_CLOUD

Specifies to take the profile of a point cloud. 3D points are extracted along the specified slicing plane, and within a specified distance from the plane. Invalid points in the point cloud are ignored.

The source object (SrcContainerOrImageBufId) must be a container.

(summarize)
Click to summarize Param1

Specifies the identifier of a transformation matrix object that defines the slicing plane along which to sample points for the profile. The transformation matrix object must have been previously allocated using M3dgeoAlloc() with M_TRANSFORMATION_MATRIX.

(summarize)
Click to summarize Param2

Specifies the sampling distance, in world units, along the specified slicing plane, in the X-direction of the plane coordinate system.

Param2 and Param3 define a grid of cells along the slicing plane. For each cell, if points exist within the cutoff distance (Param4), the point closest to the slicing plane is selected for the profile.

(summarize)
Click to summarize Param3

Specifies the sampling distance, in world units, along the specified slicing plane, in the Y-direction of the plane coordinate system.

Param2 and Param3 define a grid of cells along the slicing plane. For each cell, if points exist within the cutoff distance (Param4), the point closest to the slicing plane is selected for the profile.

(summarize)
Click to summarize Param4

Specifies the cutoff distance (perpendicular to, and on either side of the specified slicing plane), in world units, beyond which points will not be considered for the profile. For example, if 5 is specified, only points within 5 units above and 5 units below the slicing plane are considered.

(summarize)
Click to summarize Param5

Specifies a limit along the profile's X-dimension.

(summarize)
Click to summarize M_DEFAULT

Specifies no limit along X. Note that, when M_DEFAULT is specified, an included point's X-coordinate can have any value, positive or negative.

(summarize)
Click to summarize Value > 0

Specifies the length along the X-axis beyond which points are not included for the profile. This means that included points are those whose X-coordinate is between 0 and the specified Param5 value.

(summarize)
Compilation information
Header Include mil.h.
Library Use mil.lib; mil3dim.lib.
DLL Requires mil.dll; mil3dim.dll.
UNSIGNED TRUE PROC NONE NOT PROCESSABLE PROFILE DEPTH MAP PIXEL WORLD PROFILE POINT CLOUD DEFAULT