Skip to main content

MedgeMask

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

Mask regions of the Edge Finder context.

Syntax

void MedgeMask(
AIL_ID ContextId, //out
AIL_ID MaskImageId, //in
AIL_INT64 ControlFlag //in
)

Description

This function allows you to set a mask for an Edge Finder context. The mask is applied to the image that uses the context. Subsequent calls to MedgeCalculate will therefore extract edges only in the context's unmasked regions.

You can also mask edges during post-calculation. In this case, masked edges are excluded from the result buffer and subsequent calculations. Note that partially masked edges are cropped.

Parameters

ContextId (out, AIL_ID)

Specifies the Edge Finder context in which to set the mask. The Edge Finder context must have been previously allocated on the required system using MedgeAlloc.

MaskImageId (in, AIL_ID)

Specifies the identifier of the image buffer used to identify the masked pixels in the Edge Finder context.

For the identifier of the image buffer

ValueDescription
M_NULLSpecifies to ignore this parameter. This parameter must be set to M_NULL when removing the mask.
Image buffer identifierSpecifies the image buffer to use as a mask. If the size of the mask image is greater than the source image, the mask will be clipped.

A masked pixel corresponds to a non-zero value in the mask buffer. Note that this buffer can be calibrated; however, this is not necessary, since the mask is applied on a pixel basis.

This image buffer must be a 1-band buffer and must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error. |

ControlFlag (in, AIL_INT64)

Reserved for future expansion and must be set to M_DEFAULT.

Copyright © 2026 Zebra Technologies.