MIL_ID MatchContextImId, | //in |
MIL_ID SrcImageBufId, | //in |
MIL_ID DstImageBufId, | //in |
MIL_INT64 ControlFlag | //in |
This function generates a series of correlation values (match scores) resulting from the model image being compared to every pixel in your image. The MimMatch() operation results in an image of correlation data. The closer the resulting pixel value is to the specified maximum score, the closer the match between the source image buffer and the model image.
This function uses a match image processing context to match a pixel in the source image with a given model image. Specify the model image using MimControl() with M_MODEL_IMAGE. You can also specify the algorithm to use to perform the correlation (the mode), using MimControl() with M_MODE. In addition, you can limit the region in the model image with which to perform the correlation, using a mask image; specify the mask image using MimControl() with M_MASK_IMAGE. In the match mask image, all non-zero pixels are considered mask pixels that are ignored during the match.
When dealing with large images, you can reduce the number of comparisons performed from 1 every pixel to 1 every other pixel in your model image, using MimControl() with M_MODEL_STEP.
Before you call this function to perform a match operation, preprocess the match image processing context by calling MimMatch() with M_PREPROCESS. If the preprocess operation is not done explicitly (using M_PREPROCESS), it will be done when MimMatch() is first called. When preprocessed explictly, the source and destination image buffers can be set to M_NULL. If, however, the source or destination image buffer is provided, it will be used in the preprocess operation, to better optimize future calls.
Specifies the identifier of the match image processing context. The context must have been allocated using MimAlloc() with M_MATCH_CONTEXT. In addition, the match image processing context must already be configured with the identifier of the model image.
Specifies the identifier of the source image buffer. The buffer must be an 8-bit unsigned 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 match image processing context, set this parameter to a typical source image buffer. To exclude this buffer from preprocessing, set this parameter to M_NULL.
Specifies the identifier of the destination image buffer. The buffer must be either a 16-bit signed or a 32-bit floating-point 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 match image processing context, set this parameter to a typical destination image buffer. To exclude this buffer from preprocessing, set this parameter to M_NULL.
Specifies the operation to perform. This parameter must be set to one of the following values.
For specifying the operation to
perform.
|
|||||||||||||||||||||||||||||||||||||||
Value | Description
|
||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Performs the match operation according to the settings of the match image processing context. |
||||||||||||||||||||||||||||||||||||||
M_PREPROCESS |
Preprocess the specified image processing context. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milim.lib. |
DLL | Requires mil.dll; milim.dll. |