MpatSetNumber()函数

Synopsis

Set the expected number of occurrences of a model.

Format

void MpatSetNumber(ModelId, NbOccurences)

MIL_ID ModelId;

Identifier of model to be affected

long NbOccurences;

Maximum number of occurrences to find

Description

This function sets the number of occurrences of a model in an image for which to search when using MpatFindModel or MpatFindMultipleModel. Occurrences with match scores that attain/exceed the certainty level (set with MpatSetCertainty) are returned, up to the number specified in NbOccurences. If such occurrences are fewer than the specified number, the remaining occurrences returned are the best of those that attain/exceed the acceptance level (set with MpatSetAcceptance). The default is 1 (that is, find only the first occurrence with a match score that attains/exceeds the certainty level).

You can modify the number of occurrences before performing each search.

The ModelId parameter specifies the identifier of the model for which to set the expected number of occurrences.

The NbOccurences parameter specifies the maximum number of occurrences for which to look in the target image. The number of occurrences should be less than or equal to the number of result buffer entries or some results may be lost. To return all matches that attain/exceed the acceptance level, set this parameter to M_ALL.

See also

MpatSetAcceptance, MpatSetCertainty, MpatFindModel, MpatFindMultipleModel, MpatGetNumber, MpatGetResult