Skip to main content

M3dimProfileEx

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Takes the uniform profile of a depth map along a specified slicing plane according to the settings of the profile 3D image processing context.

Syntax

void M3dimProfileEx(
AIL_ID ProfileContext3dimId, //in
AIL_ID SrcDepthBufId, //in
AIL_ID DstContainerBufOrResult3dimId, //out
AIL_INT64 Param1, //in
AIL_DOUBLE Param2, //in
AIL_DOUBLE Param3, //in
AIL_DOUBLE Param4, //in
AIL_DOUBLE Param5, //in
AIL_INT64 ControlFlag //in
)

Description

This function extracts a uniform depth map profile along a specified slicing plane. The specified destination container or result buffer is filled with coordinates that make up the profile. You can use M3dimControl to specify settings, such as the thickness of the profile and the interpolation mode to use.

Pixels are sampled along a specified line and corresponding points are considered for the profile. The specified line effectively defines a slicing plane for the depth map, since the pixels' intensity values indicate depth (Z-values). In M3dimProfile, if the specified line crosses a valid depth map pixel, the corresponding point is included in the profile. Whereas, M3dimProfileEx can sample multiple source pixels for each profile point so that the thickness of the line is taken into consideration; you can use M3dimControl with M_PROFILE_THICKNESS to specify a thickness perpendicular to the profile line, and all points corresponding to pixels within the specified thickness of the line will be considered when determining the value of the profile point.

This function always uniformly extracts points along the profile line defined by the start and end points; pixels are sampled along the line using a specified sampling distance (M3dimControl with M_PROFILE_SAMPLE_SIZE) so that each point in the profile is at an equal distance away from the next.

Note: Note that when the destination is a result buffer, the profile contains valid points only; no profile points are extracted from gaps in the depth map. Invalid points can exist in the profile only when the destination is a container.

You can retrieve results using M3dimGetResult. To draw the profile, use M3dimDraw3d. Alternatively, you can use MgraDots or M3dgraDots to draw the profile points.

Parameters

ProfileContext3dimId (in, AIL_ID)

Specifies the identifier of the profile 3D image processing context. The context must have been allocated using M3dimAlloc with M_PROFILE_CONTEXT.

SrcDepthBufId (in, AIL_ID)

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

For specifying the source depth map container or depth map image buffer identifier

ValueDescription
Depth map container identifierSpecifies the identifier of a depth map container.

The container must have been previously allocated using MbufAllocContainer with M_PROC, and must store data in a 3D-processable depth map format (that is, if you call MbufInquireContainer with M_3D_PROCESSABLE_DEPTH_MAP, the function returns M_TRUE).

The container must not have a region component. Using a container with a region component will cause an error. | | Depth map image buffer identifier | Specifies the identifier of a depth map image buffer.

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

The image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error. |

DstContainerBufOrResult3dimId (out, AIL_ID)

Specifies the identifier of the destination container or profile 3D image processing result buffer.

For specifying the destination container or profile result buffer identifier

ValueDescription
Container identifierSpecifies the identifier of a container.

The container must have been previously allocated using MbufAllocContainer with M_PROC, and must not be a child container. | | Profile 3D image processing result buffer identifier | Specifies the identifier of a profile 3D image processing result buffer.

The result buffer must have been previously allocated using M3dimAllocResult with M_PROFILE_RESULT. |

Param1 (in, AIL_INT64)

Specifies the first parameter, which determines the units with which to interpret the Param2, Param3, Param4, and Param5 parameters.

For specifying the input units

ValueDescription
M_PIXELSpecifies to interpret the values in pixel units.
M_WORLDSpecifies to interpret the values in world units.

Param2 (in, AIL_DOUBLE)

Specifies the X-coordinate of the first point that defines the line along which to extract points.

Param3 (in, AIL_DOUBLE)

Specifies the Y-coordinate of the first point that defines the line along which to extract points.

Param4 (in, AIL_DOUBLE)

Specifies the X-coordinate of the second point that defines the line along which to extract points.

Param5 (in, AIL_DOUBLE)

Specifies the Y-coordinate of the second point that defines the line along which to extract points.

ControlFlag (in, AIL_INT64)

Reserved for future expansion and must be set to M_DEFAULT.

Copyright © 2026 Zebra Technologies.