Skip to main content

MmeasControl

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

Control a measurement context or result buffer setting.

Syntax

void MmeasControl(
AIL_ID ContextOrResultId, //out
AIL_INT64 ControlType, //in
AIL_DOUBLE ControlValue //in
)

Description

This function allows you to control a measurement context or result buffer setting. These settings control the behavior of measurement operations (MmeasFindMarker and MmeasCalculate), which subsequently affects the results that you obtain (MmeasGetResult or MmeasGetResultSingle) or draw (MmeasDraw).

Parameters

ContextOrResultId (out, AIL_ID)

Specifies the identifier of the measurement context or result buffer.

For specifying the measurement context or result buffer identifier

ValueDescription
Measurement context IDSpecifies a valid measurement context, previously allocated using MmeasAllocContext.
Measurement result buffer IDSpecifies a valid measurement result buffer, previously allocated using MmeasAllocResult.

ControlType (in, AIL_INT64)

Specifies the type of control to set.

ControlValue (in, AIL_DOUBLE)

Specifies the required value for the control.

Parameter Associations

For a measurement context

The following ControlType and corresponding ControlValue parameter settings can be specified for a measurement context. In this case, you must set the ContextOrResultId parameter to a measurement context.


M_PIXEL_ASPECT_RATIO

Sets the pixel width to pixel height ratio.

ValueDescription
Value (default)Specifies the ratio.

M_PIXEL_ASPECT_RATIO_INPUT

Sets whether to use M_PIXEL_ASPECT_RATIO to correct measurement inputs.

ValueDescription
M_CORRECTED (default)Specifies to correct measurement inputs with the specified aspect ratio.
M_NORMALSpecifies to not correct measurement inputs (ratio of 1.0).

M_PIXEL_ASPECT_RATIO_OUTPUT

Sets whether to use M_PIXEL_ASPECT_RATIO to correct measurement results (output data).

ValueDescription
M_CORRECTED (default)Specifies to correct measurement results with the specified aspect ratio.
M_NORMALSpecifies to not correct measurement results (ratio of 1.0).

For a measurement result buffer

The following ControlType and corresponding ControlValue parameter settings can be specified for a measurement result buffer. In this case, you must set the ContextOrResultId parameter to a measurement result buffer.


M_RESULT_OUTPUT_UNITS

Sets whether to return results of MmeasCalculate in pixels or world units. This essentially sets the output coordinate system to use. The setting of this control type will only affect functions within this module which return positional results. This control type can be changed at any time to return results in the required output units. Use MmeasSetMarker with M_RESULT_OUTPUT_UNITS to control the units in which results found using MmeasFindMarker are returned.

ValueDescription
M_DEFAULT
M_ACCORDING_TO_CALIBRATION (default)Specifies that results are returned in world units if the result was calculated on an image associated with a camera calibration context; otherwise, specifies that results are returned in pixel units.
M_PIXELSpecifies that results are returned in pixel units, with respect to the pixel coordinate system.
M_WORLDSpecifies that results are returned in world units, with respect to the relative coordinate system. If world units are specified, calling MmeasGetResult or MmeasGetResultSingle generates an error if the result was not calculated on a calibrated image.
Copyright © 2026 Zebra Technologies.