Click here to show toolbars of the Web Online Help System: show toolbars |
MIL_ID ContextPatId, | //in |
MIL_INT64 ModelType, | //in |
MIL_ID SrcImageBufId, | //in |
MIL_DOUBLE Param1, | //in |
MIL_DOUBLE Param2, | //in |
MIL_DOUBLE Param3, | //in |
MIL_DOUBLE Param4, | //in |
MIL_INT64 ControlFlag | //in |
This function allows you to add one or more models at a time to, or delete a model from, a Pattern Matching context. When defining a search model, you are specifying the area of an image to use as a pattern to find within a target image, using MpatFind(). When a call to MpatFind() is made, all models that are part of the specified context (and that have MpatControl() with M_NUMBER set to a value greater than zero) are searched for simultaneously in the target. Note, when a model is added or deleted, the Pattern Matching context must be preprocessed again, using MpatPreprocess().
The search is performed according to the general search settings specified in the Pattern Matching context, as well as the individual model search settings (depending on the M_SEARCH_MODE value specified). Specify both the context and individual model search settings using MpatControl().
When adding a model to the context, a number is assigned to the new model. The context starts numbering the models at 0, and each subsequent model added to the Pattern Matching context is given a sequential index number, in the order that you add the models. When deleting a model, all models with a higher index shift down one.
Specifies the Pattern Matching context to which to add, or from which to delete, the model. The Pattern Matching context must have been previously allocated on the required system using MpatAlloc().
Specifies the type of the model to define when adding models to the context, or specifies to delete a model from the Pattern Matching context.
See the Parameter associations section for possible values that can be specified.
Specifies the identifier of the image buffer from which to define the models, or the Pattern Matching context from which to copy a model.
Set this parameter to M_NULL if not used.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the model to add. Its definition is dependent on the model type chosen. When not used, set this parameter to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the model to add. Its definition is dependent on the model type chosen. When not used, set this parameter to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the model to add. Its definition is dependent on the model type chosen. When not used, set this parameter to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
Specifies an attribute of the model to add. Its definition is dependent on the model type chosen. When not used, set this parameter to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
Specifies the speed of the allocation or the interpolation mode to use, depending on the model type chosen. When not used, set this parameter to M_DEFAULT.
See the Parameter associations section for possible values that can be specified.
The tables below list possible values for the ModelType, SrcImageBufId, Param1, Param2, Param3, Param4, and ControlFlag parameters.
To add a model to the Pattern Matching context, the ModelType, Param1, Param2, Param3, and ControlFlag parameters can be set to the following values:
Note that any unused parameters should be set to M_DEFAULT. Note, if unused, set SrcImageBufId to M_NULL.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
SrcImageBufId | |||||||||||||||||||||||||||||||||||||||
Param1 | |||||||||||||||||||||||||||||||||||||||
Param2 | |||||||||||||||||||||||||||||||||||||||
Param3 | |||||||||||||||||||||||||||||||||||||||
Param4 | |||||||||||||||||||||||||||||||||||||||
ControlFlag | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Defines one or more models automatically of the specified dimensions from the most-suitable distinct areas found, in the source image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the identifier of the image buffer (source image) from which to extract a distinct model. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the maximum displacement (shift), in the horizontal direction, expected between the position of the model in the source image and the position of the model when found in the target image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Selects models from anywhere in the whole width of the image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the expected maximum pixel displacement in the horizontal direction, as an integer. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the maximum displacement (shift), in the vertical direction, expected between the position of the model in the source image and the position of the model when found in the target image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Selects models from anywhere in the whole height of the image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the expected maximum pixel displacement in the vertical direction, as an integer. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the width of the model, as an integer. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the height of the model, as an integer. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the speed of the process by which model(s) are defined from the model source image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_FAST. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the search should favor high precision over speed. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the search should favor speed over high precision. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Defines a regular model, from the specified area, in the source image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the identifier of the image buffer (model source image) from which to extract the model. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the X-coordinate of the top-left corner of the model (origin) in the model source image (SrcImageBufId). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the X-coordinate of the model origin is 0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the X-coordinate of model origin in the source image, in pixels (as an integer). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the Y-coordinate of the top-left corner of the model (origin) in the source image (SrcImageBufId). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the Y-coordinate of the model origin is 0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the Y-coordinate of model origin in the source image, in pixels (as an integer). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the width of the model in the model source image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the width of the model is the distance from the origin of the model to the edge of the image in the X-direction. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the width of the model in the model source image, in pixels (as an integer). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the height of the model in the model source image. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the height of the model is the distance from the origin of the model to the edge of the image in the Y-direction. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the height of the model in the model source image, in pixels (as an integer). |
You can add the following value to the above-mentioned values to extract the model as well as a circular area around it.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the model is extracted from the source image with the circular overscan data. |
You can add the following value to the above-mentioned values to set the number of models to allocate from the same image.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Allocates several models from the same source image. |
When deleting a model from the specified Pattern Matching context, use the following value:
Any unused parameters should be set to M_DEFAULT. Note, if unused, set SrcImageBufId to M_NULL.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
SrcImageBufId | |||||||||||||||||||||||||||||||||||||||
Param1 | |||||||||||||||||||||||||||||||||||||||
Param2 | |||||||||||||||||||||||||||||||||||||||
Param3 | |||||||||||||||||||||||||||||||||||||||
Param4 | |||||||||||||||||||||||||||||||||||||||
ControlFlag | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to remove the specified model from the Pattern Matching context, specified using the Param1 parameter. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
This parameter must be set to M_NULL. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the model to delete from within the Pattern Matching context. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to delete all models from the Pattern Matching context. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the index of the model to delete. |
Header | Include mil.h. |
Library | Use mil.lib; milpat.lib. |
DLL | Requires mil.dll; milpat.dll. |