Table: | For general results |
Table: | For specifying the results to retrieve |
+ combination: | For determining whether results are available |
+ combination: | For determining the required array size (number of elements) to store the returned values |
+ combination: | For specifying the data type |
MIL_ID ResultPatId, | //in |
MIL_INT Index, | //in |
MIL_INT64 ResultType, | //in |
void *ResultArrayPtr | //out |
This function retrieves the result(s) of the specified type from a specified Pattern Matching result buffer. Results are only available after calling MpatFind().
If your target image was associated with a camera 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 camera calibration context but you want to retrieve positional and dimensional results in pixel units, use MpatControl() 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 having specified a calibrated target 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 results.
Specifies where to get results. This parameter can be set to one of the following:
For specifying where to get results
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Same as M_ALL for result types that apply to model occurrences. Same as M_GENERAL for result types that apply to the entire result buffer. (summarize)Same as M_ALL for result types that apply to model occurrences. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ALL |
Retrieves the results of the specified type for all model occurrences found. |
||||||||||||||||||||||||||||||||||||||
M_GENERAL |
Retrieves a result relating to the entire result buffer. |
||||||||||||||||||||||||||||||||||||||
0 <= Value < M_NUMBER |
Specifies the occurrence index. |
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 M_NUMBER.
See the Parameter associations section for possible values that can be returned.
The tables below list possible values for the ResultType parameter and possible values returned to the ResultArrayPtr parameter.
When retrieving a general result, the ResultType parameter can be set to one of the following values.
For general results
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_CONTEXT_ID + |
Retrieves the identifier of the Pattern Matching context used by MpatFind() to obtain the results in the result buffer. Note that, if the Pattern Matching context has already been freed, using MpatFree(), the returned Pattern Matching context identifier might no longer be valid. (summarize)Retrieves the identifier of the Pattern Matching context used by MpatFind() to obtain the results in the result buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
MORE
Data type info: Data
type: address of a MIL_DOUBLE
MORE
|
||||||||||||||||||||||||||||||||||||||
M_NUMBER + |
Retrieves the number of occurrences found. (summarize)Retrieves the number of occurrences found. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
MORE
Data type info: Data
type: address of a MIL_DOUBLE
MORE
|
To specify the type of result to retrieve for each model occurrence, the ResultType parameter must be set to one of the following.
For specifying the results to retrieve
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_ANGLE + |
Retrieves the angle of the occurrence (if found using MpatFind()), relative to the output coordinate system specified using MpatControl() with M_RESULT_OUTPUT_UNITS. An angle interpreted with respect to the pixel coordinate system is always measured counter-clockwise. For information on the angle's direction of rotation when interpreting the angle with respect to the relative coordinate system, see the Angle convention in MIL subsection of the Working with real-world units section of Chapter 26: Calibrating your camera setup. (summarize)Retrieves the angle of the occurrence (if found using MpatFind()), relative to the output coordinate system specified using MpatControl() with M_RESULT_OUTPUT_UNITS. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
|
||||||||||||||||||||||||||||||||||||||
M_INDEX + |
Retrieves the index of the model that was found. (summarize)Retrieves the index of the model that was found. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
|
||||||||||||||||||||||||||||||||||||||
M_NUMBER_OF_PIXELS + |
Retrieves the number of pixels in the model used to compute the correlation function. Note that to retrieve this result type, the sums must be saved using MpatControl() with M_SAVE_SUMS set to M_ENABLE. (summarize)Retrieves the number of pixels in the model used to compute the correlation function. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
|
||||||||||||||||||||||||||||||||||||||
M_POSITION_X + |
Retrieves the X-coordinate of the occurrence. This is the X-coordinate of the model's reference position transformed at the occurrence (MpatControl() with M_REFERENCE_X). (summarize)Retrieves the X-coordinate of the occurrence. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
|
||||||||||||||||||||||||||||||||||||||
M_POSITION_Y + |
Retrieves the Y-coordinate of the occurrence. This is the Y-coordinate of the model's reference position transformed at the occurrence (MpatControl() with M_REFERENCE_Y. (summarize)Retrieves the Y-coordinate of the occurrence. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
|
||||||||||||||||||||||||||||||||||||||
M_SCORE + |
Retrieves the match score of the occurrence, as a percentage. (summarize)Retrieves the match score of the occurrence, as a percentage. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
|
||||||||||||||||||||||||||||||||||||||
M_SUM_I + |
Retrieves the sum of the values of the pixels in the image over the N pixels corresponding to the model occurrence. Note that to retrieve this result type, the sums must be saved using MpatControl() with M_SAVE_SUMS set to M_ENABLE. (summarize)Retrieves the sum of the values of the pixels in the image over the N pixels corresponding to the model occurrence. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
|
||||||||||||||||||||||||||||||||||||||
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. Note that to retrieve this result type, the sums must be saved using MpatControl() with M_SAVE_SUMS set to M_ENABLE. (summarize)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...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
|
||||||||||||||||||||||||||||||||||||||
M_SUM_IM + |
Retrieves the sum of the products of the values of the pixels in the image with the pixels in the model over the N pixels corresponding to the model occurrence. Note that to retrieve this result type, the sums must be saved using MpatControl() with M_SAVE_SUMS set to M_ENABLE. (summarize)Retrieves the sum of the products of the values of the pixels in the image with the pixels in the model over the N pixels corresponding to the model occurrence. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
|
||||||||||||||||||||||||||||||||||||||
M_SUM_M + |
Retrieves the sum of the values of the pixels in the model over the N pixels of the model. Note that to retrieve this result type, the sums must be saved using MpatControl() with M_SAVE_SUMS set to M_ENABLE. (summarize)Retrieves the sum of the values of the pixels in the model over the N pixels of the model. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
|
||||||||||||||||||||||||||||||||||||||
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. Note that to retrieve this result type, the sums must be saved using MpatControl() with M_SAVE_SUMS set to M_ENABLE. (summarize)Retrieves the sum of the squares of the values of the pixels in the model over the N pixels of the model. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
|
You can add the following value to the above-mentioned values to specify whether a result is available.
For determining whether results are
available
|
|||||||||||||||||||||||||||||||||||||||
ResultType | Description | ||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_AVAILABLE + |
Retrieves whether a result is available to be returned. (summarize)Retrieves whether a result is available to be returned. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
|
||||||||||||||||||||||||||||||||||||||
M_NULL |
Specifies that the result is not available to be retrieved. |
||||||||||||||||||||||||||||||||||||||
Value != 0 |
Specifies that the result is available to be retrieved. |
You can add the following value to the above-mentioned values to determine the required array size (number of elements) to store the returned values.
For determining the required array size (number of
elements) to store the returned values
|
|||||||||||||||||||||||||||||||||||||||
ResultType combination value | Description | ||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_NB_ELEMENTS |
Retrieves the required array size (number of elements) to store the returned values. (summarize)Retrieves the required array size (number of elements) to store the returned values. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: address of a MIL_DOUBLE
MORE
Data type info: Data
type: address of a MIL_DOUBLE
MORE
|
You can add one of the following values to the above-mentioned values to cast the requested results to the required data type.
Note: In C++, when using a standard vector (std::vector) instead of an array, the values listed in this combination table must not be used. If you need to use a specific data type, instantiate the vector with the necessary data type.
For specifying the data type
|
|||||||||||||||||||||||||||||||||||||||
|
Description | ||||||||||||||||||||||||||||||||||||||
ResultArrayPtr - Possible values returned |
|||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_DOUBLE |
Casts the requested results to a MIL_DOUBLE. (summarize)Casts the requested results to a MIL_DOUBLE. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
Data type info: Data
type: array of type MIL_DOUBLE [optionally, in C++:
a reference to a std::vector<MIL_DOUBLE>
] | address of a
MIL_DOUBLE MORE
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_ID |
Casts the requested results to a MIL_ID. (summarize)Casts the requested results to a MIL_ID. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info:
Data type: array of type
MIL_ID [optionally, in C++: a reference to a std::vector<MIL_ID>
] | address of a
MIL_ID MORE
Data type info:
Data type: array of type
MIL_ID [optionally, in C++: a reference to a std::vector<MIL_ID>
] | address of a
MIL_ID MORE
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT |
Casts the requested results to a MIL_INT. (summarize)Casts the requested results to a MIL_INT. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info:
Data type: array of type
MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT>
] | address of a
MIL_INT MORE
Data type info:
Data type: array of type
MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT>
] | address of a
MIL_INT MORE
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT32 |
Casts the requested results to a MIL_INT32. (summarize)Casts the requested results to a MIL_INT32. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info:
Data type: array of type
MIL_INT32 [optionally, in C++: a reference to a std::vector<MIL_INT32>
] | address of a
MIL_INT32 MORE
Data type info:
Data type: array of type
MIL_INT32 [optionally, in C++: a reference to a std::vector<MIL_INT32>
] | address of a
MIL_INT32 MORE
|
||||||||||||||||||||||||||||||||||||||
M_TYPE_MIL_INT64 |
Casts the requested results to a MIL_INT64. (summarize)Casts the requested results to a MIL_INT64. (more details...) |
||||||||||||||||||||||||||||||||||||||
ResultArrayPtr extra info |
Data type info:
Data type: array of type
MIL_INT64 [optionally, in C++: a reference to a std::vector<MIL_INT64>
] | address of a
MIL_INT64 MORE
Data type info:
Data type: array of type
MIL_INT64 [optionally, in C++: a reference to a std::vector<MIL_INT64>
] | address of a
MIL_INT64 MORE
|
Header | Include mil.h. |
Library | Use mil.lib; milpat.lib. |
DLL | Requires mil.dll; milpat.dll. |