Skip to main content

MclassAllocResult

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

Allocate a classification result buffer to hold training, prediction, or statistic results.

Syntax

AIL_ID MclassAllocResult(
AIL_ID SysId, //in
AIL_INT64 ResultType, //in
AIL_INT64 ControlFlag, //in
AIL_ID * ResultClassIdPtr //out
)

Description

This function allocates a classification result buffer, on the specified system, to store the results from an MclassTrain, MclassPredict, or MclassStatCalculate operation.

When the classification result buffer is no longer required, release it usingMclassFreeunless M_UNIQUE_ID was specified during allocation; if M_UNIQUE_ID was specified, the smart identifier manages the classification result buffer's lifetime and you must not manually free it.

Parameters

SysId (in, AIL_ID)

Specifies the identifier of the system on which to allocate the result buffer. This parameter should be set to one of the following values:

For specifying the system identifier

ValueDescription
M_DEFAULT_HOSTSpecifies the default Host system of the current Aurora Imaging Library application.
System identifierSpecifies a valid system identifier, previously allocated using MsysAlloc.

ResultType (in, AIL_INT64)

Specifies the type of classification result buffer to allocate. Set this parameter to one of the following values:

For specifying the type of classification result buffer to allocate

ValueDescription
M_PREDICT_ANO_RESULTSpecifies an anomaly detection prediction result buffer. This buffer holds the results produced from calling MclassPredict with a predefined anomaly detection classifier context (M_CLASSIFIER_ANO_PREDEFINED).
M_PREDICT_CNN_RESULTSpecifies a CNN prediction result buffer. This buffer holds the results produced from calling MclassPredict with a predefined CNN classifier context (M_CLASSIFIER_CNN_PREDEFINED).
M_PREDICT_DET_RESULTSpecifies an object detection prediction result buffer. This buffer holds the results produced from calling MclassPredict with a predefined object detection classifier context (M_CLASSIFIER_DET_PREDEFINED).
M_PREDICT_ONNX_RESULTSpecifies an ONNX prediction result buffer. This buffer holds the results produced from calling MclassPredict with an ONNX classifier context (M_CLASSIFIER_ONNX).
M_PREDICT_SEG_RESULTSpecifies a segmentation prediction result buffer. This buffer holds the results produced from calling MclassPredict with a predefined segmentation classifier context (M_CLASSIFIER_SEG_PREDEFINED).
M_PREDICT_TREE_ENSEMBLE_RESULTSpecifies a tree ensemble prediction result buffer. This buffer holds the results produced from calling MclassPredict with a tree ensemble classifier context (M_CLASSIFIER_TREE_ENSEMBLE).
M_STAT_ANO_RESULTSpecifies a statistics classification result buffer for anomaly detection. This buffer holds the results produced from calling MclassStatCalculate with a statistics classification context for anomaly detection (M_STAT_ANO).
M_STAT_CNN_RESULTSpecifies a statistics classification result buffer for image classification. This buffer holds the results produced from calling MclassStatCalculate with a statistics classification context for image classification (M_STAT_CNN).
M_STAT_DET_RESULTSpecifies a statistics classification result buffer for object detection. This buffer holds the results produced from calling MclassStatCalculate with a statistics classification context for object detection (M_STAT_DET).
M_STAT_SEG_RESULTSpecifies a statistics classification result buffer for segmentation. This buffer holds the results produced from calling MclassStatCalculate with a statistics classification context for segmentation (M_STAT_SEG).
M_STAT_TREE_ENSEMBLE_RESULTSpecifies a statistics classification result buffer for feature classification. This buffer holds the results produced from calling MclassStatCalculate with a statistics classification context for feature classification (M_STAT_TREE_ENSEMBLE).
M_TRAIN_ANO_RESULTSpecifies an anomaly training result buffer. This buffer holds the results produced from calling MclassTrain with an anomaly detection training context (M_TRAIN_ANO).
M_TRAIN_CNN_RESULTSpecifies a CNN training result buffer. This buffer holds the results produced from calling MclassTrain with a CNN training context (M_TRAIN_CNN).
M_TRAIN_DET_RESULTSpecifies an object detection training result buffer. This buffer holds the results produced from calling MclassTrain with an object detection training context (M_TRAIN_DET).
M_TRAIN_SEG_RESULTSpecifies a segmentation training result buffer. This buffer holds the results produced from calling MclassTrain with a segmentation training context (M_TRAIN_SEG).
M_TRAIN_TREE_ENSEMBLE_RESULTSpecifies a tree ensemble training result buffer. This buffer holds the results produced from calling MclassTrain with a tree ensemble training context (M_TRAIN_TREE_ENSEMBLE).

ControlFlag (in, AIL_INT64)

Reserved for future expansion and must be set to M_DEFAULT.

ResultClassIdPtr *(out, AIL_ID)

Specifies the address of the variable in which to write the classification result buffer identifier or specifies the data type that the function should use to return the result buffer identifier.

For retrieving the identifier or specifying how to return it

ValueDescription
M_NULLSpecifies that you will use this function's return value to obtain the identifier of the allocated classification result
                          buffer; in this case, a standard Aurora Imaging Library identifier of type _AIL_ID_ is returned. |

| M_UNIQUE_ID | Specifies that you will use this function's return value to obtain the identifier of the allocated classification result buffer; in this case, an Aurora Imaging Library smart identifier of type _AIL_UNIQUE_CLASS_ID_is returned instead of a standard Aurora Imaging Library identifier.This setting is only available when using C++11 (or later).An Aurora Imaging Library smart identifier manages the lifespan of the Aurora Imaging Library object it owns (similar to a std::unique_ptr). Note, you can use an Aurora Imaging Library smart identifier as though it were a standard Aurora Imaging Library identifier, except that you cannot use it to manually free the classification result buffer (it is freed automatically). For more information, see Aurora Imaging Library smart identifiers. | | Address in which to write the prediction result buffer identifier | Specifies the address of an AIL_ID in which to write the identifier of the allocated prediction result buffer.

If allocation fails, M_NULL is written as the identifier. | | Address in which to write the statistics classification result buffer identifier | Specifies the address of an AIL_ID in which to write the identifier of the allocated statistics classification result buffer.

If allocation fails, M_NULL is written as the identifier. | | Address in which to write the training result buffer identifier | Specifies the address of an AIL_ID in which to write the identifier of the allocated training result buffer.

If allocation fails, M_NULL is written as the identifier. |

Return Value

Type: AIL_ID

The returned value is the classifier result buffer identifier either as a standard identifier (AIL_ID) or a smart identifier (AIL_UNIQUE_CLASS_ID). If allocation fails, M_NULL is returned (or nullptr ifM_UNIQUE_ID was specified).

Copyright © 2026 Zebra Technologies.