Skip to main content

M3dimRemapDepthMap

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

Remap a depth map to fit within a specified data range, or convert the depth map to a different bit depth.

Syntax

void M3dimRemapDepthMap(
AIL_ID RemapContext3dimId, //in
AIL_ID SrcImageBufId, //in
AIL_ID DstImageBufId, //out
AIL_INT64 ControlFlag //in
)

Description

This function linearly remaps source pixels to destination pixels according to the specified mode, which determines the range of Z-values (Z-range) for the destination depth map. Use M3dimControl to set the remap mode (M_REMAP_MODE) and other remap options. Note that the remap operation maintains the same calibration in X and Y as the source buffer.

You can use M3dimRemapDepthMap to remap a depth map to a different data type. This allows you to pass the remapped depth map to functions that only accept image buffers of certain bit depths (for example, MmodFind).

You can limit this function's results to a region of an image buffer using a region of interest (ROI) set using MbufSetRegion. The ROI must be defined in raster format (M_RASTER or M_VECTOR_AND_RASTER). An error is generated if the ROI is only in vector format (M_VECTOR). If both the source and the destination image buffers have an ROI, results are limited to the portion of the ROIs that intersect.

Parameters

RemapContext3dimId (in, AIL_ID)

Specifies a remap 3D image processing context.

For specifying the remap 3D image processing context identifier

ValueDescription
M_REMAP_CONTEXT_BUFFER_LIMITSSpecifies a predefined remap 3D image processing context with all remap context control types (M3dimControl) set to their default, including M_REMAP_MODE, which is set to M_BUFFER_LIMITS. Use this predefined context to remap the source depth map using its M_MIN and M_MAX as the values to define the destination's Z-range.
M_REMAP_CONTEXT_DATA_EXTREMESSpecifies a predefined remap 3D image processing context with all remap context control types (M3dimControl) set to their default, except for M_REMAP_MODE, which is set to M_DATA_EXTREMES. Use this predefined context to remap the source depth map using its minimum and maximum pixel values to define the destination's Z-range.
M_REMAP_CONTEXT_USE_DESTINATIONSpecifies a predefined remap 3D image processing context with all remap context control types (M3dimControl) set to their default, except for M_REMAP_MODE, which is set to M_USE_DESTINATION_CALIBRATION. Use this predefined context to remap the source depth map using the destination image buffer's calibration information or destination container's scale, offset, and matrix information to define the destination's Z-range.
Remap 3D image processing context identifierSpecifies the identifier of a remap 3D image processing context, previously allocated using M3dimAlloc with M_REMAP_CONTEXT.

Note: In this case, the function applies the remap control settings specified using M3dimControl. |

SrcImageBufId (in, AIL_ID)

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

DstImageBufId (out, AIL_ID)

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

ControlFlag (in, AIL_INT64)

Reserved for future expansion and must be set to M_DEFAULT.

Copyright © 2026 Zebra Technologies.