Synopsis
Allocate an image processing result buffer.
Format
MIL_ID MimAllocResult(SystemId, NbEntries, ResultType, ImResultIdPtr)
MIL_ID SystemId; | System identifier |
long NbEntries; | Number of result buffer entries |
long ResultType; | Type of result buffer |
MIL_ID *ImResultIdPtr; | Storage location for image processing result buffer identifier |
Description
This function allocates a result buffer with the specified number of entries, for use with the image processing module statistical functions.
When the result buffer is no longer required, you should release its memory, using MimFree.
The SystemId parameter specifies the system on which the result buffer will be allocated. This parameter must be set to a valid system identifier, M_DEFAULT_HOST, or M_DEFAULT. Specify M_DEFAULT_HOST to allocate on the default Host system of the current MIL application. Specify M_DEFAULT to have MIL select the most appropriate system on which to allocate the result buffer (it can be the default Host system or any already allocated system).
The NbEntries parameter specifies the number of buffer entries of the specified result buffer type, ResultType.
The ResultType parameter specifies the type of data that will be stored in this result buffer. This parameter can be set to one of the following:
M_HIST_LIST | For MimHistogram results. |
M_PROJ_LIST | For MimProject results. |
M_EXTREME_LIST | For MimFindExtreme results. |
M_EVENT_LIST | For MimLocateEvent results. |
M_COUNT_LIST | For MimCountDifference results. |
If a floating-point result buffer is desired, add M_FLOAT to the M_PROJ_LIST, M_EXTREME_LIST or M_LOCATE_EVENT ResultType (for example, M_PROJ_LIST + M_FLOAT).
The ImResultIdPtr parameter specifies the address of the variable in which the image processing result buffer identifier is to be written. Since MimAllocResult also returns the image processing result buffer identifier, you can set this parameter to M_NULL. If allocation fails, M_NULL is written as the identifier.
Note
This function is optimized for packed binary buffers for the M_COUNT_LIST results only.
Returned value
The returned value is the image processing result buffer identifier. If allocation fails, M_NULL is returned.
See also
《MimAllocResult()函数》上有6条评论
评论已关闭。