MIL_ID StatMultipleContextImId, | //in |
MIL_ID SrcImageBufId, | //in |
MIL_ID StatMultipleResultImId, | //in |
MIL_INT64 ControlFlag | //in |
This function accumulates statistics of the specified type for each pixel location across the different source images, passed upon iterative calls to this function. One value is calculated for every pixel in the source image, for each statistical operation performed. The results, passed in the specified result buffer, contain all the results for the same pixel location from multiple different images from previous calls to this function.
You can read the statistics from the result buffer using MimGetResult2d() or MimDraw().
Before using this function, you must configure which statistics to perform, using MimControl().
Once the multiple statistic image processing context is configured, preprocess the context and result buffer by calling MimStatMultiple() with M_PREPROCESS. If the preprocess operation is not done explicitly (using M_PREPROCESS), it will be done when MimStatMultiple() is first called. When preprocessing explicitly, the source image buffer can be set to M_NULL if you explicitly specify the size of the target area using MimControl() with M_SIZE_X and M_SIZE_Y. If, however, the source image buffer is provided, it will be used in the preprocess operation, to better optimize future calls.
To remove the calculated statistics associated with the specified source image from the results buffer, call MimStatMultiple() with M_CALCULATE + M_REMOVE. To reset the results generated from finding the extremes of each pixel's value (such as, M_MIN), use M_RESET_EXTREMES. The result buffer cannot be completely reset; you must free it using MimFree(), and then a allocate new result buffer using MimAlloc() with M_STAT_MULTIPLE_CONTEXT.
Note that making sequential calls to this function using the same result buffer but with multiple source images of different sizes will produce unpredictable results and is not recommended.
Specifies the identifier of the image processing context that specifies the statistics to calculate. The image processing context must have been allocated using MimAlloc() with M_STAT_MULTIPLE_CONTEXT.
Specifies the identifier of the source image buffer. The buffer used must be a 1-band image buffer.
This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.
When preprocessing the multiple statistic image processing context and result buffer, set this parameter to the identifier of a typical source image buffer. To exclude this buffer from preprocessing, set this parameter to M_NULL and set the height and width of the area in the source buffer for which you need statistics, using MimControl() with M_SIZE_X and M_SIZE_Y; otherwise an error will occur.
Specifies the identifier of the result buffer. The buffer must have been allocated using MimAllocResult() with M_STAT_MULTIPLE_RESULT.
Specifies the operation to perform on the source image.
To specify the operation to
perform
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_CALCULATE + |
Calculates the statistics specified using MimControl(). |
||||||||||||||||||||||||||||||||||||||
M_PREPROCESS |
Preprocesses the specified image processing context and image processing result buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_RESET_EXTREMES |
Resets the results generated from M_MIN, M_MIN_ABS, M_MAX, and M_MAX_ABS operations. (more details...) |
You can add the following value to the above-mentioned value to removethe results related to the specified source image buffer from the accumulated results in the specified result buffer.
To remove the calculated
results
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description
|
||||||||||||||||||||||||||||||||||||||
M_REMOVE |
Removes the results related to the specified source image. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milim.lib. |
DLL | Requires mil.dll; milim.dll. |