Skip to main content

MimProjection

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

Project a 2D image into 1D.

Syntax

void MimProjection(
AIL_ID SrcImageBufId, //in
AIL_ID DstImageBufOrResultImId, //out
AIL_DOUBLE ProjectionAxisAngle, //in
AIL_INT64 Operation, //in
AIL_DOUBLE OperationValue //in
)

Description

This function projects a two-dimensional image into one dimension, based on the specified projection operation and projection axis angle, writing results to the specified projection image processing result buffer or a destination image buffer. The results are generated based on the specified operation and calculated along each lane of pixels in the image, perpendicular to the specified projection axis angle. The 90° projection of the image (lanes = rows) using a summation operation is known as the row profile; the 0° projection (lanes = columns) as the column profile.

Writing results to a projection image processing result buffer allows you to manipulate results using an array once you have retrieved the results using MimGetResultor MimGetResult1d.

You can limit this function's results to a region of the source image buffer using a region of interest (ROI) set using MbufSetRegion.

Parameters

SrcImageBufId (in, AIL_ID)

Specifies the identifier of the source image buffer. The image buffer must be a 1-band buffer.

DstImageBufOrResultImId (out, AIL_ID)

Specifies the destination buffer in which to write the projection results.

For specifying the projection result buffer identifier or a destination image buffer

ValueDescription
Destination image buffer IDSpecifies the identifier of an image buffer allocated with MbufAlloc.... The destination image buffer must have the same data type (unsigned, signed, or float) as the source buffer. For an M_SUM operation, this image buffer must be of 32-bit depth. For an M_MAX, M_MEAN, M_MEDIAN, M_MIN, M_RANK, or M_RANK_PERCENTILEoperation, this image buffer can have a depth greater than or equal to that of the source image buffer.
Destination result buffer IDSpecifies the identifier of an image processing result buffer allocated usingMimAllocResult with M_PROJ_LIST. The buffer should have as many locations as there are lanes to project in the image perpendicular to the specified projection axis angle.

You can read the projection values from the result buffer using MimGetResult1d or MimGetResultwith M_VALUE. |

ProjectionAxisAngle (in, AIL_DOUBLE)

Specifies the angle of the projection axis. Lanes are perpendicular to this angle. This parameter can be set to one of the following:

For specifying the angle of projection in degrees

ValueDescription
M_0_DEGREESpecifies a projection onto the axis at 0° (lanes = columns).
M_90_DEGREESpecifies a projection onto the axis at 90° (lanes = rows).

Operation (in, AIL_INT64)

Specifies the operation to perform.

For specifying the type of operation

ValueDescription
M_DEFAULT
M_MAXSpecifies to find the maximum pixel value along each lane.
M_MEANSpecifies to find the mean pixel value along each lane.
M_MEDIANSpecifies to find the median pixel value along each lane.
M_MINSpecifies to find the minimum pixel value along each lane.
M_RANKSpecifies to find the pixel value with the specified rank (OperationValue) along each lane. The pixels in a lane are ranked in ascending order based on pixel value.

The rank cannot be larger than the lane size of the image. This can be inquired using MbufInquire with M_SIZE_X or M_SIZE_Y, depending on the projection axis. | | M_RANK_PERCENTILE | Specifies to find the pixel value with the specified rank (OperationValue) along each lane; the rank is specified as a percentage of the lane length. The pixels in a lane are ranked in ascending order based on pixel value. | | M_SUM (default) | Specifies to sum all pixel values along each lane.

Note that, if the sum of pixels in any lane is larger than the depth of the result buffer or destination image buffer, the result will be undefined. |

OperationValue (in, AIL_DOUBLE)

Specifies the rank for M_RANK, and the percentile for M_RANK_PERCENTILE. For other operations, this parameter must be set to M_NULL.

Copyright © 2026 Zebra Technologies.