Filters
Filter values by
Model Finder result buffer type
  • Geometric Model Finder result buffer
  • Geometric controlled Model Finder result buffer
  • Shape-specific result buffer
Result type
  • General result
  • Specific or all occurrences
    • Common to occurrences of all model types
    • Specific to occurrences of circle models
    • Specific to occurrences of cross models
    • Specific to occurrences of diamond models
    • Specific to occurrences of ellipse models
    • Specific to occurrences of rectangle models
    • Specific to occurrences of ring models
    • Specific to occurrences of segment models.
    • Specific to occurrences of square models
    • Specific to occurrences of triangle models
| Customize Help
| Save Settings

MmodGetResult



Function Map
Synopsis
Get the specified type of result(s) from a Model Finder result buffer.
Syntax
void MmodGetResult(
MIL_ID ResultId, //in
MIL_INT ResultIndex, //in
MIL_INT64 ResultType, //in
void *ResultArrayPtr //out
)
Description

This function retrieves the result(s) of the specified type from a Model Finder result buffer. Results are only available after calling MmodFind().

The result entries will be ordered by match score, starting with the highest score (regardless of the result type requested). When searching for multiple models, results are not sorted according to which model occurrence was found; results are still sorted according to score. The M_INDEX result type returns the index of the model associated with the Model Finder result; whereas the M_USER_LABEL result type returns its user label.

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 MmodControl() 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, MmodGetResult() will generate an error.

If the target is not calibrated and the nominal search aspect ratio is not set to 1 (MmodControl() with M_ASPECT_RATIO), results are returned for the corrected target coordinate system (whereby the target pixel width is equal to the pixel height).

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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
ResultId

Specifies the identifier of the Model Finder result buffer from which to retrieve results.

ResultIndex

Specifies where to get results. This parameter can be set to one of the following:

function map For specifying where to get results
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_ALL for result types that apply to one or all occurrences. Same as M_GENERAL for general result types.

(summarize)
Click to summarize M_ALL

Retrieves the results of the specified type for all model occurrences found.

Click to summarize M_GENERAL

Retrieves a result relating to the entire Model Finder context.

Click to summarize 0 <= Value < M_NUMBER

Specifies the result index.

ResultType

Specifies the type of result to retrieve.

See the Parameter associations section for possible values that can be specified.

ResultArrayPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ]
  • array of type MIL_ID [optionally, in C++: a reference to a std::vector<MIL_ID> ]
  • array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ]
  • array of type MIL_INT32 [optionally, in C++: a reference to a std::vector<MIL_INT32> ]
  • array of type MIL_INT64 [optionally, in C++: a reference to a std::vector<MIL_INT64> ]
  • MIL_DOUBLE
  • MIL_ID
  • MIL_INT
  • MIL_INT32
  • MIL_INT64

Specifies the address in which to write results.

See the Parameter associations section for possible values that can be returned.

When retrieving a general result, the ResultType parameter can be set to one of the following values.

function map For a general result
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_CONTEXT_ID +

Retrieves the identifier of the Model Finder context used by MmodFind() to obtain the results in the result buffer. Note that this identifier might not be valid if the Model Finder context has been freed using MmodFree().

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE MORE
Click to summarize M_MOD_DEFINE_COMPATIBLE +

Retrieves whether the result can be used to define a model.

This result type is not available for an M_SHAPE_... type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE MORE
Click to summarize M_FALSE

Specifies that the result cannot be used to define a model.

Click to summarize M_TRUE

Specifies that the result can be used to define a model.

Click to summarize M_NUMBER +

Retrieves the number of occurrences found (all models).

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE MORE
Click to summarize M_TIMEOUT_END +

Retrieves whether the timeout has been reached. You can set the timeout limit using MmodControl() with M_TIMEOUT. By default, there is no limit.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE MORE
Click to summarize M_FALSE

Specifies that the timeout has not been reached.

Click to summarize M_TRUE

Specifies that the timeout has been reached.

When retrieving a general result, a result for an individual occurrence, or a result for all occurrences (M_ALL), the ResultType parameter can be set to the following value.

function map For an individual occurrence, all occurrences, or a general result
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_NUMBER_OF_CHAINED_EDGELS +

Retrieves the total number of chained edgels.

For a general result, M_NUMBER_OF_CHAINED_EDGELS returns the number of chained edgels in the target.

For a specified occurrence, M_NUMBER_OF_CHAINED_EDGELS returns the chained edgels in the occurrence. When used with M_ALL, an array of results is returned, with one result per occurrence.

You can use M_NUMBER_OF_CHAINED_EDGELS to determine the required array size for the M_CHAIN_... result types.

This result type is not available if the target edges were not saved in the context (M_SAVE_TARGET_EDGES must be set to M_ENABLE).

When retrieving a general result, this result type is not supported if the Model Finder context used was an M_GEOMETRIC_CONTROLLED type of context.

This result type is not available for an M_SHAPE_... type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE

When retrieving a general result or result(s) for a single occurrence, the ResultType parameter can be set to one of the following values.

function map For an individual occurrence or a general result
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_CHAIN_ANGLE +

Retrieves the angle values of each edgel in all chains in the entire target or in the model occurrence.

The angle is always returned in uncalibrated pixel units and is measured counter-clockwise in the image, from the positive X-axis towards the negative Y-axis of the image.

Possible values range from 0 to 360 degrees and mapped in the range of 0 to 255 (that is, an 8-bit range).

This result type is not available if the target edges were not saved in the context (M_SAVE_TARGET_EDGES must be set to M_ENABLE).

When retrieving a general result, this result type is not supported if the Model Finder context used was an M_GEOMETRIC_CONTROLLED type of context.

This result type is not available for an M_SHAPE_... type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAIN_INDEX +

Retrieves the chain index of each edgel in all chains in the entire target, or in the model occurrence.

The first chain in the target is identified as index 1, with increasing indices for subsequent chains.

This result type is not available if the target edges were not saved in the context (M_SAVE_TARGET_EDGES must be set to M_ENABLE).

When retrieving a general result, this result type is not supported if the Model Finder context used was an M_GEOMETRIC_CONTROLLED type of context.

This result type is not available for an M_SHAPE_... type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAIN_X +

Retrieves the X-coordinate of each edgel in all chains in the entire target or in the model occurrence.

This result type is not available if the target edges were not saved in the context (M_SAVE_TARGET_EDGES must be set to M_ENABLE).

When retrieving a general result, this result type is not supported if the Model Finder context used was an M_GEOMETRIC_CONTROLLED type of context.

This result type is not available for an M_SHAPE_... type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CHAIN_Y +

Retrieves the Y-coordinate of each edgel in all chains in the entire target or in the model occurrence.

This result type is not available if the target edges were not saved in the context (M_SAVE_TARGET_EDGES must be set to M_ENABLE).

When retrieving a general result, this result type is not supported if the Model Finder context used was an M_GEOMETRIC_CONTROLLED type of context.

This result type is not available for an M_SHAPE_... type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE

You can add one of the following values to the above-mentioned values to specify the edges for which to retrieve results.

function map For specifying which edges in the occurrence to consider
Click to summarizeCombination value Description
Click to summarize M_MODEL

Retrieves the edge information of the model transformed at the occurrence position.

Click to summarize M_TARGET

Retrieves the edge information of the target in the region of the occurrence. When using M_TARGET, you must not set the ResultIndex parameter to M_GENERAL.

(summarize)

When retrieving a result for a single occurrence or for all occurrences, the ResultType parameter can be set to one of the following values.

function map For a result of a single occurrence or all occurrences
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_ANGLE +

Retrieves the angle of the occurrence's reference axis (specified for the model using MmodControl() with M_REFERENCE_ANGLE), relative to the output coordinate system specified using MmodControl() 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.

For an M_SHAPE_ELLIPSE type of Model Finder result buffer, the reference axis is the principal axis of the ellipse (its width), unless the reference axis is modified using MmodControl() with M_REFERENCE_ANGLE prior to calling MmodFind().

For an M_SHAPE_SEGMENT type of Model Finder result buffer, the orientation of the segment is dependent on its gradient, which is set using MmodControl() with M_SEGMENT_CONSISTENT_GRADIENT. The direction of the segment is orthogonal to its gradient.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_ASPECT_RATIO +

Retrieves the found aspect ratio of all occurrences.

For an M_SHAPE_ELLIPSE or an M_SHAPE_RECTANGLE type of Model Finder result buffer, the returned aspect ratio is defined as being the ratio of the occurrence's aspect ratio divided by the model's.

This result type is only available for an M_SHAPE_ELLIPSE, M_SHAPE_RECTANGLE, or M_DEFAULT type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_BOTTOM_LEFT_X +

Retrieves the X-coordinate of the bottom-left corner of the rectangle.

This result type is only available for an M_SHAPE_RECTANGLE type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_BOTTOM_LEFT_Y +

Retrieves the Y-coordinate of the bottom-left corner of the rectangle.

This result type is only available for an M_SHAPE_RECTANGLE type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_BOTTOM_RIGHT_X +

Retrieves the X-coordinate of the bottom-right corner of the rectangle.

This result type is only available for an M_SHAPE_RECTANGLE type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_BOTTOM_RIGHT_Y +

Retrieves the Y-coordinate of the bottom-right corner of the rectangle.

This result type is only available for an M_SHAPE_RECTANGLE type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CENTER_X +

Retrieves the X-coordinate of the center of an occurrence of a circle, ellipse, rectangle, or segment model.

This result type is only supported for an M_SHAPE_... type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_CENTER_Y +

Retrieves the Y-coordinate of the center of an occurrence of a circle, ellipse, rectangle, or segment model.

This result type is only supported for an M_SHAPE_... type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_END_POS_X +

Retrieves the X-coordinate of the end point of an occurrence of a segment.

This result type is only available for an M_SHAPE_SEGMENT type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_END_POS_Y +

Retrieves the Y-coordinate of the end point of an occurrence of a segment.

This result type is only available for an M_SHAPE_SEGMENT type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_FIT_ERROR +

Retrieves the fit error as the average quadratic distance, in pixels or calibrated units, between the edges in the occurrence and the corresponding edges in the model. A perfect fit is represented as 0.0.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_INDEX +

Retrieves the index of the model that was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_MODEL_COVERAGE +

Retrieves the model coverage of the occurrence. The model coverage is the percentage of the total length of the model's active edges found in the occurrence. 100% indicates that for every active edge in the model, a corresponding edge was found in the occurrence.

Note that using a weighted mask with a model affects the calculation of the model coverage. To view the modified equation, refer to the Determining what is a match section of Chapter 8: Geometric Model Finder.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_POLARITY +

Retrieves the polarity of the occurrence.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_ANY

Specifies that the occurrences are a mixture of polarities. For more information, see MmodControl() with M_POLARITY and M_ANY.

(summarize)
Click to summarize M_REVERSE

Specifies that the polarity of occurrences is the reverse of that of the model. For more information, see MmodControl() with M_POLARITY and M_REVERSE.

(summarize)
Click to summarize M_SAME

Specifies that the polarity of occurrences is the same as that of the model. For more information, see MmodControl() with M_POLARITY and M_SAME.

(summarize)
Click to summarize M_POSITION_X +

Retrieves the X-coordinate of the occurrence. This is the X-position of the model's reference axis transformed at the occurrence (MmodControl() with M_REFERENCE_X).

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_POSITION_Y +

Retrieves the Y-coordinate of the occurrence. This is the Y-position of the model's reference axis transformed at the occurrence (MmodControl() with M_REFERENCE_Y).

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_SCALE +

Retrieves the scale of the occurrence. For an M_SHAPE_ELLIPSE or M_SHAPE_RECTANGLE type of Model Finder result buffer, the returned scale is defined as the occurrence's width divided by the model's width. For an M_SHAPE_SEGMENT type of Model Finder result buffer, the returned scale is defined as the occurrence's length divided by the model's length.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_SCORE +

Retrieves the score of the occurrence (as a percentage). The score is calculated as follows:

Score = Model coverage x (1 - Fit error weighting factor * Normalized fit error).

Note: the normalized fit error is the fit error (M_FIT_ERROR) converted to a number between 0.0-1.0 for an M_GEOMETRIC or M_GEOMETRIC_CONTROLLED type of Model Finder context, while for an M_SHAPE_CIRCLE or M_SHAPE_CIRCLE type of Model Finder context, the normalized fit error is influenced by the value of M_SAGITTA_TOLERANCE and is not limited to being between 0.0 and 1.0. For an M_SHAPE_RECTANGLE or M_SHAPE_SEGMENT type of Model Finder context, the normalized fit error is influenced by the value of M_DEVIATION_TOLERANCE and is not limited to being between 0.0 and 1.0. For all Model Finder context types, the terms within the square brackets result in a number between 0.0 and 1.0.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_SCORE_FIT +

Retrieves the fit score of the occurrence (as a percentage). The score is calculated as follows:

Fit Score = 1 - Normalized fit error.

This result type is only supported for a model defined in an M_SHAPE_... type of Model Finder context. For other types of models see the target score (M_SCORE_TARGET).

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_SCORE_TARGET +

Retrieves the target score of the occurrence. The target score is calculated as follows:

Target Score = Target coverage x (1 - Fit error weighting factor * Normalized fit error).

Note that the normalized fit error (M_FIT_ERROR) is the fit error converted to a number between 0.0 and 1.0.

This result type is not available for an M_SHAPE_... type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_SEGMENT_CONSISTENT_GRADIENT +

Retrieves whether the gradients of the segment model occurrences are consistent.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_FALSE

Specifies that the occurrences do not have consistent gradients.

Click to summarize M_TRUE

Specifies that the occurrences have consistent gradients.

Click to summarize M_START_POS_X +

Retrieves the X-coordinate of the start point of an occurrence of a segment.

This result type is only available for an M_SHAPE_SEGMENT type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_START_POS_Y +

Retrieves the Y-coordinate of the start point of an occurrence of a segment.

This result type is only available for an M_SHAPE_SEGMENT type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_TARGET_COVERAGE +

Retrieves the target coverage of the model. The target coverage is a percentage of the total length of edges present within the occurrence's bounding box, corresponding to the model's active edges. Lower scores indicate that features or edges found in the target (result occurrence) are not present in the model.

Note that using a weighted mask with a model affects the calculation of the target coverage. To view the modified equation, refer to the Determining what is a match section of Chapter 8: Geometric Model Finder.

This result type is not available for an M_SHAPE_... type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_TOP_LEFT_X +

Retrieves the X-coordinate of the top-left corner of the rectangle.

This result type is only available for an M_SHAPE_RECTANGLE type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_TOP_LEFT_Y +

Retrieves the Y-coordinate of the top-left corner of the rectangle.

This result type is only available for an M_SHAPE_RECTANGLE type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_TOP_RIGHT_X +

Retrieves the X-coordinate of the top-right corner of the rectangle.

This result type is only available for an M_SHAPE_RECTANGLE type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_TOP_RIGHT_Y +

Retrieves the Y-coordinate of the top-right corner of the rectangle.

This result type is only available for an M_SHAPE_RECTANGLE type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_USER_LABEL +

Retrieves the user label of the model that was found.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_NO_LABEL

Specifies that no user label is associated with the model.

Click to summarize Value

Specifies the user label of the model. INFO

When retrieving a result for a single occurrence or for all occurrences, the ResultType parameter can be set to one of the following values. The following values are not available for all model types. For one of these values to be available for a result occurrence, the result occurrence must be of the appropriate type. Use M_AVAILABLE to ensure that the value can be used with the occurrence. If the ResultIndex parameter is set to M_ALL, all the occurrences must support the result type, otherwise an error is generated.

function map For a result of a single occurrence or all occurrences (with constraints)
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_CORNER_RADIUS +

Retrieves the radius used to round the corners of the models. This control type is only valid for models of type M_CROSS, M_DIAMOND, M_RECTANGLE, M_SQUARE, and M_TRIANGLE.

This result type is not available for an M_SHAPE_... type of Model Finder result buffer.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_HEIGHT +

Retrieves the height of the shape. This result type is only available for M_CROSS, M_DIAMOND, M_ELLIPSE, M_RECTANGLE and M_TRIANGLE.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_HORIZONTAL_THICKNESS +

Retrieves the horizontal thickness of the cross. This result type is only available for M_CROSS.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_INNER_RADIUS +

Retrieves the inner radius of the ring. This result type is only available for M_RING.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_LENGTH +

Retrieves the length of the segment. This result type is only available for M_SEGMENT.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_OUTER_RADIUS +

Retrieves the outer radius of the ring. This result type is only available for M_RING.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_RADIUS +

Retrieves the radius of the circle. This result type is only available for M_CIRCLE.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_VERTICAL_THICKNESS +

Retrieves the vertical thickness of the cross. This result type is only available for M_CROSS.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_WIDTH +

Retrieves the width of the shape. This result type is only available for M_CROSS, M_DIAMOND, M_ELLIPSE, M_RECTANGLE, M_SQUARE and M_TRIANGLE.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE

To retrieve a transformation coefficient for a single occurrence or for all occurrences, the ResultType parameter can be set to one of the following values. These coefficients allow you to convert coordinates in the model coordinate system to the corresponding coordinates in the target coordinate system for that occurrence (or vice versa). These coefficients handle variations in scale, translation, and angle. If the model is calibrated, these coefficients are given for the real world.

Use the following equations:

x d = A x s + B y s + C .

y d = -B x s + A y s + D .

where A, B, C, and D are the transformation coefficients (forward or reverse); x s and y s specify the source coordinates (with respect to the origin of the model coordinate system for a forward transformation or target coordinate system for a reverse transformation); and, x d and y d are the destination coordinates (with respect to the origin of the target coordinate system for a forward transformation or model coordinate system for a reverse transformation).

function map For retrieving a transformation coefficient
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_A_FORWARD +

Retrieves the forward transformation coefficient A for the occurrence.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_A_REVERSE +

Retrieves the reverse transformation coefficient A for the occurrence.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_B_FORWARD +

Retrieves the forward transformation coefficient B for the occurrence.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_B_REVERSE +

Retrieves the reverse transformation coefficient B for the occurrence.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_C_FORWARD +

Retrieves the forward transformation coefficient C for the occurrence.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_C_REVERSE +

Retrieves the reverse transformation coefficient C for the occurrence.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_D_FORWARD +

Retrieves the forward transformation coefficient D for the occurrence.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_D_REVERSE +

Retrieves the reverse transformation coefficient D for the occurrence.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE  |  array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE

You can add the following value to the above-mentioned values to specify whether a result is available.

function map For determining whether results are available
Click to summarizeResultType Description
ResultArrayPtr
- Possible values returned
Click to summarize M_AVAILABLE

Retrieves whether a result is available to be returned.

(summarize)
Expand data type infoCollapse data type info 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
Click to summarize M_NULL

Specifies that the result is not available to be retrieved.

Click to summarize 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.

function map For determining the required array size (number of elements) to store the returned values
Click to summarizeResultType combination value Description
ResultArrayPtr
- Possible values returned
Click to summarize M_NB_ELEMENTS

Retrieves the required array size (number of elements) to store the returned values.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
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.

function map For specifying the data type
Click to summarizeResultType Description
ResultArrayPtr
- Possible values returned
Click to summarize M_TYPE_MIL_DOUBLE

Casts the requested results to a MIL_DOUBLE.

(summarize)
Expand data type infoCollapse data type info 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
Click to summarize M_TYPE_MIL_ID

Casts the requested results to a MIL_ID.

(summarize)
Expand data type infoCollapse data type info 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
Click to summarize M_TYPE_MIL_INT

Casts the requested results to a MIL_INT.

(summarize)
Expand data type infoCollapse data type info 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
Click to summarize M_TYPE_MIL_INT32

Casts the requested results to a MIL_INT32.

(summarize)
Expand data type infoCollapse data type info 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
Click to summarize M_TYPE_MIL_INT64

Casts the requested results to a MIL_INT64.

(summarize)
Expand data type infoCollapse data type info 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
Compilation information
Header Include mil.h.
Library Use mil.lib; milmod.lib.
DLL Requires mil.dll; milmod.dll.
DEFAULT ALL GENERAL NUMBER CONTEXT ID MOD DEFINE COMPATIBLE FALSE TRUE NUMBER TIMEOUT END FALSE TRUE NUMBER OF CHAINED EDGELS CHAIN ANGLE CHAIN INDEX CHAIN X CHAIN Y MODEL TARGET ANGLE ASPECT RATIO BOTTOM LEFT X BOTTOM LEFT Y BOTTOM RIGHT X BOTTOM RIGHT Y CENTER X CENTER Y END POS X END POS Y FIT ERROR INDEX MODEL COVERAGE POLARITY ANY REVERSE SAME POSITION X POSITION Y SCALE SCORE SCORE FIT SCORE TARGET SEGMENT CONSISTENT GRADIENT FALSE TRUE START POS X START POS Y TARGET COVERAGE TOP LEFT X TOP LEFT Y TOP RIGHT X TOP RIGHT Y USER LABEL NO LABEL CORNER RADIUS HEIGHT HORIZONTAL THICKNESS INNER RADIUS LENGTH OUTER RADIUS RADIUS VERTICAL THICKNESS WIDTH A FORWARD A REVERSE B FORWARD B REVERSE C FORWARD C REVERSE D FORWARD D REVERSE AVAILABLE NULL NB ELEMENTS TYPE MIL DOUBLE TYPE MIL ID TYPE MIL INT TYPE MIL INT32 TYPE MIL INT64 GENERAL DEFAULT GENERAL DEFAULT GENERAL DEFAULT ALL ALL DEFAULT