Table: | For specifying a model |
MIL_ID ContextPatId, | //in |
MIL_INT Index, | //in |
MIL_ID MaskBufferId, | //in |
MIL_INT64 MaskType, | //in |
MIL_INT64 ControlFlag | //in |
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.
Specifies the individual model on which to apply the mask.
For specifying a model
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Specifies the default value; the default value is 0. |
||||||||||||||||||||||||||||||||||||||
Value >= 0 |
Specifies the index of the model for which the mask is being created. |
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.
Specifies which type of mask to employ.
For specifying the value of the don't care
pixels
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
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)Specifies to apply (or remove) a don't care mask. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milpat.lib. |
DLL | Requires mil.dll; milpat.dll. |