MpatFindMultipleModel()函数

Synopsis

Find multiple pattern matching models in the target image buffer.

Format

void MpatFindMultipleModel(ImageBufId, ModelIdLst, PatResultIdLst, NumModels, ExpFlag)

MIL_ID ImageBufId; Image buffer identifier
MIL_ID *ModelIdLst; Model identifier list
MIL_ID *PatResultIdLst; Pattern matching result buffer identifier list
long NumModels Number of models in list
long ExpFlag Reserved expansion flag

Description

This function finds occurrences of the specified models in the given image and returns the position of each occurrence for each model. If you wish to search for several models in a given image region, a single call to this function is more efficient than multiple calls to MpatFindModel.

The search is performed using each model’s current search parameters. Note, the model search parameters determine the number of occurrences to find. Results are written to the specified result structures. Use the MpatGet..() commands (MpatGetNumber, MpatGetResult) to read the results.

This function assumes that the model was extracted from an image with the same scaling as the target image. In addition, if using normalized grayscale non-rotational models, it assumes that there has been no change in image orientation since the models were defined (with a 5° to 10° tolerance). If using rotational models, the rotational range of the model is set using the MpatSetAngle command.

This function returns results in decreasing match-score order. This means that the most-likely occurrence is always returned first.

Patterns that are very close to the edge of the image may be found with lower match scores than usual due to edge effects. For this reason, you should use MpatSetPosition, rather than a child buffer, to restrict the search to a portion of the image.

The ImageBufId parameter specifies the identifier of the source of the target image. This parameter can only be given an image buffer identifier.

The ModelIdLst parameter specifies a list of identifiers of the models for which to search in the specified target image buffer. Note, all models must be of the same size and center and must use the same search region in the target image.

The PatResultIdLst parameter specifies a list of the identifiers of the pattern recognition result buffers in which to store results. Note, the results of ModeIdLst[n] are written to result buffer PatResultLst[n]; therefore, you must specify the same number of result buffers as the number of models.

The NumModels parameter specifies the number of models in the model list.

The ExpFlag parameter must be set to M_NULL.

Note

This function supports the use of a rotational model.

Status

Current limitations:

  • Only supports unsigned two-dimensional images up to 8 bits deep.

See also

MpatFindModel, MpatGetNumber, MpatGetResult

《MpatFindMultipleModel()函数》上有4条评论

评论已关闭。