| MIL 10 Reference
| Customize Help
| Save Settings

MmeasGetScore



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
None.
Synopsis
Retrieves information about the specified score characteristic.
Syntax
void MmeasGetScore(
MIL_ID MarkerId, //in
MIL_INT64 Characteristic, //in
MIL_INT Index, //in
MIL_DOUBLE *Param1Ptr, //out
MIL_DOUBLE *Param2Ptr, //out
MIL_DOUBLE *Param3Ptr, //out
MIL_DOUBLE *Param4Ptr, //out
MIL_DOUBLE *Param5Ptr, //out
MIL_INT *InputUnitsPtr, //out
MIL_INT64 ControlFlag //in
)
Description

This function retrieves information about the specified score characteristic of an edge, stripe, or circle marker. When using this function with M_RESULT, you will get the results of the score characteristic that MIL established in the target image after your last call to MmeasFindMarker(), as well as the value of the characteristic established by the find operation. When using this function with M_MARKER, you will get the values that you specified for the score characteristic's settings with your last call to MmeasSetScore(), as well as the value of the character specified in the marker. Before using this function with M_RESULT, you must first call MmeasFindMarker().

The information that you can retrieve for each score characteristic is based on its settings in MmeasSetScore(). If you try to get the results (M_RESULT) of a score characteristic that you did not set using MmeasSetScore(), you will receive an error. However, if you inquire (M_MARKER) about a score characteristic that you did not set, you will receive the default (initial) values of that characteristic, as indicated in MmeasSetScore().

If you have associated the target image with a calibration context (MmeasFindMarker()), you can specify that certain values be interpreted in world units. To do so, you must have used MmeasSetScore() with M_WORLD. Note that if you used M_WORLD but didn't use a calibrated target image, the function will generate an error.

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
MarkerId

Specifies the identifier of the measurement marker buffer.

Characteristic

Specifies the score characteristic about which to get information.

For retrieving information about a score characteristic for an edge, stripe, or circle marker, the Characteristic parameter can be set to one of the following values.

function map For retrieving information about a score characteristic for an edge, stripe, or circle marker
CollapseValue Description
Collapse M_EDGE_CONTRAST_SCORE +

Retrieves information about the grayscale difference in intensity between the start (M_EDGE_START) and end (M_EDGE_END) of the intensity transition from which the marker's edges are established.

(summarize)
Collapse M_EDGEVALUE_PEAK_CONTRAST_SCORE +

Retrieves information about the grayscale difference of the intensity transition between the first zero edgevalues on both sides of the established edge peak (before M_EDGEVALUE_PEAK_POS_MIN, and after M_EDGEVALUE_PEAK_POS_MAX).

Note that some images might never have a zero edgevalue, in which case you should use M_EDGE_CONTRAST_SCORE for a more meaningful result.

(summarize)
Collapse M_STRENGTH_SCORE +

Retrieves information about the greatest edgevalue (strength) of the marker.

(summarize)

You must add one of the following values to the above-mentioned values to specify the edge of the stripe for which to return results (stripe markers only).

function map For specifying the stripe's edge
CollapseCombination value Description
Collapse M_EDGE_FIRST

Retrieves results for the first outermost edge of a stripe. This must be combined with M_RESULT.

(summarize)
Collapse M_EDGE_SECOND

Retrieves results for the second outermost edge of a stripe. This must be combined with M_RESULT.

(summarize)

For retrieving information about a score characteristic for an edge or stripe marker, the Characteristic parameter can be set to one of the following values.

function map For retrieving information about a score characteristic for an edge or stripe marker
CollapseValue Description
Collapse M_DISTANCE_FROM_BOX_ORIGIN_SCORE +

Retrieves information about the distance between the position of the box search region's origin and the position of the marker.

(summarize)
Collapse M_SPACING_SCORE +

Retrieves information about the typical distance (spacing) between consecutive edge or stripe occurrences of a multiple marker.

(summarize)

For retrieving information about a score characteristic for a stripe marker, the Characteristic parameter can be set to one of the following values.

function map For retrieving information about a score characteristic for a stripe marker
CollapseValue Description
Collapse M_EDGE_INSIDE_SCORE +

Retrieves information about the number of edges inside a stripe marker.

(summarize)
Collapse M_STRIPE_WIDTH_SCORE +

Retrieves information about the distance (width) between the stripe's two outermost edges.

(summarize)

For retrieving information about a score characteristic for a circle marker, the Characteristic parameter can be set to one of the following values.

function map For retrieving information about a score characteristic for a circle marker
CollapseValue Description
Collapse M_RADIUS_SCORE +

Retrieves information about the linear distance between the circle's center and its circumference (radius).

(summarize)

You must add one of the following values to the above-mentioned values to specify whether to retrieve information about the results of, or the values set for, the specified score characteristic.

function map For specifying whether to retrieve information about the results of, or the values set for, the specified score characteristic
CollapseCombination value Description
Collapse M_MARKER

Retrieves the values that you specified for the score characteristic's settings with your last call to MmeasSetScore().

Collapse M_RESULT

Retrieves the results of the score characteristic after your last call to MmeasFindMarker(). MIL returns values using the input units specified using MmeasSetScore().

(summarize)
Index

Specifies the index of the occurrence of a multiple marker. This parameter must be set to one of the following values:

function map For specifying the occurrence of a multiple marker
CollapseValue Description
Collapse M_DEFAULT

Specifies the index information is not applicable. Use this value when using M_MARKER.

(summarize)
Collapse Value >= 0

Specifies the index of the occurrence of a multiple marker (MarkerId), when using M_RESULT.

If you are using M_RESULT, but did not specify a multiple marker, the index must be zero.

(summarize)
Param1Ptr

Specifies the address of the variable in which to write either the characteristic's resulting value (when using M_RESULT) or the characteristic's minimum acceptable limit, as indicated using MmeasSetScore() with the Min parameter (when using M_MARKER).

When using M_RESULT, the characteristic's resulting value (as measured in the target image using MmeasFindMarker()) is the same as the corresponding characteristic result retrieved using MmeasGetResult() and MmeasGetResultSingle(), regardless of whether you specify a score characteristic using MmeasSetScore(). This correspondence is listed in the following table:

MmeasGetScore() and Param1Ptr

MmeasGetResult() and MmeasGetResultSingle()

M_EDGE_CONTRAST_SCORE

M_EDGE_CONTRAST

M_EDGEVALUE_PEAK_CONTRAST_SCORE

M_EDGEVALUE_PEAK_CONTRAST

M_STRENGTH_SCORE

M_EDGE_STRENGTH

M_DISTANCE_FROM_BOX_ORIGIN_SCORE

M_DISTANCE_FROM_BOX_ORIGIN

M_SPACING_SCORE

M_SPACING

M_RADIUS_SCORE

M_RADIUS

M_EDGE_INSIDE_SCORE

M_EDGE_INSIDE

M_STRIPE_WIDTH_SCORE

M_STRIPE_WIDTH

Param2Ptr

Specifies the address of the variable in which to write either the characteristic's resulting score (when using M_RESULT) or the characteristic's lowest acceptable limit, as indicated using MmeasSetScore() with the Low parameter (when using M_MARKER).

Param3Ptr

Specifies the address of the variable in which to write either the greatest value that MIL considers theoretically possible for the characteristic (when using M_RESULT) or the characteristic's highest acceptable limit, as indicated using MmeasSetScore() with the High parameter (when using M_MARKER).

Param4Ptr

Specifies the address of the variable in which to write the characteristic's maximum acceptable limit, as indicated using MmeasSetScore() with the Max parameter (when using M_MARKER); otherwise, you must specify M_NULL, indicating that MIL does not return any information to this parameter (when using M_RESULT).

Param5Ptr

Specifies the address of the variable in which to write the characteristic's score-offset, as indicated using MmeasSetScore() with the ScoreOffset parameter (when using M_MARKER); otherwise, you must specify M_NULL, indicating that MIL does not return any information to this parameter (when using M_RESULT).

InputUnitsPtr

Specifies the address of the variable in which to write the characteristic's input units, as indicated using MmeasSetScore() with the InputUnits parameter (when using M_MARKER); otherwise, you must specify M_NULL, indicating that MIL does not return any information to this parameter (when using M_RESULT).

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; milmeas.lib.
DLL Requires mil.dll; milmeas.dll.
EDGE CONTRAST SCORE EDGEVALUE PEAK CONTRAST SCORE STRENGTH SCORE EDGE FIRST EDGE SECOND DISTANCE FROM BOX ORIGIN SCORE SPACING SCORE EDGE INSIDE SCORE STRIPE WIDTH SCORE RADIUS SCORE MARKER RESULT DEFAULT RESULT MARKER STRIPE EDGE CIRCLE