Skip to main content

MimAllocResult

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 an image processing result buffer.

Syntax

AIL_ID MimAllocResult(
AIL_ID SysId, //in
AIL_INT NbEntries, //in
AIL_INT64 ResultType, //in
AIL_ID * ResultImIdPtr //out
)

Description

This function allocates a result buffer with the specified number of entries, for use with some of the Image Processing module's functions (for example, the statistical functions).

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

Parameters

SysId (in, AIL_ID)

Specifies 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.

NbEntries (in, AIL_INT)

Specifies the number of buffer entries to allocate for the specified result buffer. This parameter should be set to one of the following values:

For specifying the number of buffer entries

ValueDescription
M_DEFAULTSpecifies that Aurora Imaging Library automatically establishes the size of the result buffer. You can only use this value when the ResultType parameter is set to M_AUGMENTATION_RESULT, M_COUNT_LIST, M_LOCATE_DIFFERENCE_RESULT, M_LOCATE_PEAK_1D_RESULT, M_STATISTICS_RESULT, or M_WAVELET_TRANSFORM_RESULT.
Value > 0Specifies the number of buffer entries. This value should take into account the type of result buffer being allocated. A specific number of entries must be specified when the ResultTypeparameter is set to M_EVENT_LIST,M_EXTREME_LIST,M_FIND_ORIENTATION_LIST,M_HIST_LIST, or M_PROJ_LIST.

A specific number of entries can be specified when the ResultType parameter is set to M_LOCATE_DIFFERENCE_RESULT to limit the number of results.

A specific number of entries cannot be specified when the ResultType parameter is set to M_COUNT_LIST, M_LOCATE_PEAK_1D_RESULT, M_STATISTICS_RESULT, or M_WAVELET_TRANSFORM_RESULT.

Note that for NbEntries other than M_DEFAULT, M_EVENT_LIST and M_LOCATE_DIFFERENCE_RESULT results from a multi-core processing application might differ from run to run. |

ResultType (in, AIL_INT64)

Specifies the type of data that will be stored in this result buffer. This parameter must be set to one of the following values:

For specifying the type of data

ValueDescription
M_AUGMENTATION_RESULTSpecifies that the buffer can hold MimAugment results.
M_COUNT_LISTSpecifies that the buffer can hold MimCountDifference results.
M_EVENT_LISTSpecifies that the buffer can hold MimLocateEvent results.
M_EXTREME_LISTSpecifies that the buffer can hold MimFindExtreme results.
M_FIND_ORIENTATION_LISTSpecifies that the buffer can hold MimFindOrientation results.
M_HIST_LISTSpecifies that the buffer can hold MimHistogram results.
M_LOCATE_DIFFERENCE_RESULTSpecifies that the buffer can hold MimLocateDifference results.
M_LOCATE_PEAK_1D_RESULTSpecifies that the buffer can hold MimLocatePeak1d results. In this case, you must set the NbEntries parameter to M_DEFAULT.
M_PROJ_LISTSpecifies that the buffer can hold MimProjection results.
M_STATISTICS_RESULTSpecifies that the buffer can hold MimStatCalculate results.
M_WAVELET_TRANSFORM_RESULTSpecifies that the buffer can hold results from MimWaveletTransform and MimWaveletDenoise. Such results can themselves be processed. That is, you can use the wavelet result as the source with which to perform MimWaveletTransform and MimWaveletDenoise.

For

ValueDescription
M_FLOATAllocates a result buffer of type float. You should allocate a float result type buffer when the source buffer specified by MimProjection, MimFindExtreme, or MimLocateEvent is of type float. If the specified source buffer is of type float and the result buffer is not, the functions can produce inaccurate results.

Note that allocating a result buffer of type float when the source buffer is not, will slow down the operations performed by the MimProjection, MimFindExtreme, or MimLocateEvent function. |

ResultImIdPtr *(out, AIL_ID)

Specifies the address of the variable in which to write the image processing result buffer identifier or specifies the data type that the function should use to return the image processing 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 image processing 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 image processing result buffer; in this case, an Aurora Imaging Library smart identifier of type _AIL_UNIQUE_IM_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 image processing result buffer (it is freed automatically). For more information, see Aurora Imaging Library smart identifiers. | | Address in which to write the identifier | Specifies the address of an AIL_ID in which to write the identifier of the allocated image processing result buffer.

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

Return Value

Type: AIL_ID

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

Remarks

Note that some of the result buffer types listed above are not available in Aurora Imaging Library Lite. See the result buffer's corresponding operation function for Aurora Imaging Library Lite availability.

Copyright © 2026 Zebra Technologies.