| Customize Help
| Save Settings

MimMatch



Function Map
Synopsis
Generates a series of correlation values between the source image and a model image.
Syntax
void MimMatch(
MIL_ID MatchContextImId, //in
MIL_ID SrcImageBufId, //in
MIL_ID DstImageBufId, //in
MIL_INT64 ControlFlag //in
)
Description

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.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
MatchContextImId

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.

SrcImageBufId

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.

DstImageBufId

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.

ControlFlag

Specifies the operation to perform. This parameter must be set to one of the following values.

function map For specifying the operation to perform.
Click to summarizeValue Description
Click to summarize M_DEFAULT

Performs the match operation according to the settings of the match image processing context.

Click to summarize M_PREPROCESS

Preprocess the specified image processing context. Note that, if not called explicitly, this operation will be performed automatically with the first call to MimMatch().

If the identifier of the source and/or destination buffer is not set to M_NULL, information about the source and/or destination image buffer will be used in the preprocessing operation.

(summarize)
Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
MATCH CONTEXT UNSIGNED PROC NONE FLOAT PROC NONE SIGNED PROC NONE DEFAULT PREPROCESS