| Customize Help
| Save Settings

MpatMask



Function Map
Synopsis
Mask areas of a model in a Pattern Matching context.
Syntax
void MpatMask(
MIL_ID ContextPatId, //in
MIL_INT Index, //in
MIL_ID MaskBufferId, //in
MIL_INT64 MaskType, //in
MIL_INT64 ControlFlag //in
)
Description

This function allows you to apply a "don't care" mask to a model in a Pattern Matching context. Essentially, the mask sets pixels in the specified model to a "don't care state. The "don't care" pixels of the model will not be considered when searching for occurrences of the model in the target image (using MpatFind()). If a pixel in the mask image is a non-zero value, the corresponding pixel in the model is set to a "don't care" state. Note that there must be at least one model to the context before calling this function in the mask image; otherwise an error will occur.

Note, each time this function is called, a new set of "don't care" pixels is assigned to the specified model, superseding any existing set. Therefore, multiple calls to this function do not have a cumulative effect. Also, whenever the "don't care" pixels in a model change, the effect of any preprocessing is undone. Therefore, if the "don't care" pixels are changed, call MpatPreprocess() before searching for the model.

This function does not support a M_REGULAR_MODEL + M_CIRCULAR_OVERSCAN type of model, except if M_SEARCH_ANGLE_MODE is set to M_DISABLE.

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
ContextPatId

Specifies the identifier of the Pattern Matching context containing the model to mask.

Index

Specifies the individual model on which to apply the mask.

function map For specifying a model
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies the default value; the default value is 0.

Click to summarize Value >= 0

Specifies the index of the model for which the mask is being created.

MaskBufferId

Specifies the identifier of the image buffer to use as a mask. Non-zero-pixel values identify the "don't care" pixels in the model.

This buffer must be a 1-band, 8-bit, unsigned image buffer. The buffer must be of the same size as the model. The buffer can be calibrated; however, the mask is applied on a pixel basis.

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.

Note that you can set this parameter to M_NULL to remove the mask.

MaskType

Specifies which type of mask to employ.

function map For specifying the value of the don't care pixels
Click to summarizeValue Description
Click to summarize M_DONT_CARE

Specifies to apply (or remove) a don't care mask. The features present in the masked area (non-zero pixels) are ignored during the search. Features present in this area of the occurrence will not affect the scores.

(summarize)
ControlFlag

Reserved for future expansion. This parameter must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; milpat.lib.
DLL Requires mil.dll; milpat.dll.
DEFAULT PROC NONE UNSIGNED DONT CARE