MIL_ID PatResultId, | //in |
MIL_INT64 ResultType, | //in |
void *UserArrayPtr | //out |
This function retrieves the result(s) of the specified type from a specified pattern matching result buffer. Results are only available after calling MpatFindModel() or MpatFindMultipleModel().
If your target image was associated with a calibration context, positional and dimensional results are, by default, returned with respect to the relative coordinate system of the image. Otherwise, these results are returned in pixels, relative to the top-left pixel in the target image.
If your target image was associated with a calibration context but you want to retrieve positional and dimensional results in pixel units, use MpatSetSearchParameter() with the M_RESULT_OUTPUT_UNITS control type set to M_PIXEL. However, note that if you set M_RESULT_OUTPUT_UNITS to M_WORLD without specifying a calibrated image in which to calculate the results, MpatGetResult() will generate an error.
Specifies the identifier of the pattern matching result buffer from which to retrieve result(s).
Specifies the type of result to retrieve for each model occurrence.
See the Parameter associations section for possible values that can be specified.
Specifies the address of the one-dimensional array in which to write the specified results. The array must be big enough to hold the number of results indicated by MpatGetNumber().
See the Parameter associations section for possible values that can be returned.
The table below lists possible values for the ResultType parameter and possible values returned to the UserArrayPtr parameter.
To specify the type of result to retrieve for each model occurrence, the ResultType parameter must be set to one of the following.
Unless otherwise specified, the following values require that you pass the UserArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to the same number of elements returned by MpatGetNumber() (for multiple results) or the address of a MIL_DOUBLE (for a single result).
For specifying the results to
retrieve
|
|||||||||||||||||||||||||||||||||||||||
ResultType |
Description
|
||||||||||||||||||||||||||||||||||||||
UserArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_ANGLE |
Retrieves the angle of the occurrence (if found using MpatFindModel()), relative to the output coordinate system specified using MpatSetSearchParameter() with M_RESULT_OUTPUT_UNITS. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_MODEL_INDEX |
Retrieves the index of the model, in the model identifier array, for which the occurrence was found when using MpatFindMultipleModel() with M_FIND_BEST_MODELS. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_NUMBER_OF_PIXELS |
Retrieves the number of pixels in the model used to compute the correlation function. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_POSITION_X |
Retrieves the X-coordinate of the occurrence. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_POSITION_Y |
Retrieves the Y-coordinate of the occurrence. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SCORE |
Retrieves the match score of the occurrence, as a percentage. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SUM_I |
Retrieves the sum of the values of the pixels in the image over the N pixels corresponding to the model occurrence. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SUM_II |
Retrieves the sum of the squares of the values of the pixels in the image over the N pixels corresponding to the model occurrence. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SUM_IM |
Retrieves the sum of the products of the values of the pixels in the image and the pixels in the model over the N pixels corresponding to the model occurrence. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SUM_M |
Retrieves the sum of the values of the pixels in the model over the N pixels of the model. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_SUM_MM |
Retrieves the sum of the squares of the values of the pixels in the model over the N pixels of the model. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib; milpat.lib. |
DLL | Requires mil.dll; milpat.dll. |