| MIL 10 Reference
| Customize Help
| Save Settings

MpatGetNumber



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Get the number of model occurrences found in the target image.
Syntax
MIL_INT MpatGetNumber(
MIL_ID PatResultId, //in
MIL_INT *CountPtr //out
)
Description

This function retrieves the number of matches found after searching for a model. It returns the number of occurrences of the model that were found with match scores greater than or equal to the model's acceptance level to a maximum of MpatSetNumber(). The returned number will never be bigger than the number of entries allocated for the result buffer.

This function determines the number of results retrieved with MpatGetResult(). Call MpatGetNumber() prior to checking results with MpatGetResult(). Note that when no occurrences of the model are found, there is no need to check the results.

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 if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
PatResultId

Specifies the identifier of the pattern matching result buffer that was used to store results obtained by MpatFindModel().

CountPtr

Specifies the address of the variable in which to write the number of occurrences. Since the MpatGetNumber() function also returns the requested information, you can set this parameter to M_NULL.

Return value
The returned value is the number of occurrences of the model that were found and that were greater than or equal to the acceptance level.
Compilation information
Header Include mil.h.
Library Use mil.lib; milpat.lib.
DLL Requires mil.dll; milpat.dll.