| MIL 10 Reference
| Customize Help
| Save Settings

MmeasGetResult



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 specified type of result(s) for all points, edges, stripes, or circles from a measurement marker buffer or a measurement result buffer.
Syntax
void MmeasGetResult(
MIL_ID MarkerOrMeasResultId, //in
MIL_INT64 ResultType, //in
void *FirstResultArrayPtr, //out
void *SecondResultArrayPtr //out
)
Description

This function retrieves the result(s) of the specified type for all points, edges, stripes, or circles from a measurement marker buffer or a measurement result buffer. Measurement marker buffers hold the results of an MmeasFindMarker() operation, while measurement result buffers hold the results of an MmeasCalculate() operation. Depending on the buffer you are using, you must call either MmeasFindMarker() or MmeasCalculate() prior to calling MmeasGetResult(); otherwise, you will get incorrect results.

If you are using a multiple-occurrence marker, MmeasGetResult() typically returns the specified result for all occurrences. The result for the marker's first occurrence will be followed by the result for the marker's second occurrence, and so on. To return results for a single occurrence, use MmeasGetResultSingle(). Note that some results cannot be returned for each occurrence since they are based on the marker itself (for example, M_BOX_ANGLE_FOUND, which returns the angle of the marker's box search region); in such cases, you will get a single result, even if you are using a multiple-occurrence marker.

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 and you want to retrieve positional and dimensional results in pixel units, use MmeasSetMarker() for a measurement marker buffer, or MmeasControl() for a measurement result buffer, with M_RESULT_OUTPUT_UNITS set to M_PIXEL. If you set M_RESULT_OUTPUT_UNITS to M_WORLD without specifying a calibrated image in which to calculate the results, MmeasGetResult() will generate an error.

For certain result types, MIL returns one value for an edge marker, and two values for a stripe marker. In these cases, for an edge marker, MIL returns all results to FirstResultArrayPtr; SecondResultArrayPtr must be set to M_NULL.

When retrieving results for a stripe marker, result types can return one general result for the stripe, results for both edges of the stripe, or results for one edge of the stripe. To return results for one edge of the stripe, you must specify the edge using the combination value M_EDGE_FIRST or M_EDGE_SECOND. In this case, MIL returns the results to FirstResultArrayPtr and you must set SecondResultArrayPtr to M_NULL. When retrieving results for both edges of a stripe marker, MIL returns results for the first edge to FirstResultArrayPtr and for the second edge to SecondResultArrayPtr.

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
MarkerOrMeasResultId

Specifies the identifier of the measurement marker buffer (allocated with MmeasAllocMarker()) or measurement result buffer (allocated with MmeasAllocResult()) from which to retrieve results.

ResultType

Specifies the type of result(s) to retrieve.

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

FirstResultArrayPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type MIL_DOUBLE
  • array of type MIL_INT
  • array of type MIL_INT32
  • array of type MIL_INT64
  • M_NULL
  • MIL_DOUBLE
  • MIL_INT
  • MIL_INT32
  • MIL_INT64

Specifies the address of the first array in which to write the requested information.

With a multiple-occurrence marker, the results for each occurrence of the marker will be stored in a separate element of the specified arrays.

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

SecondResultArrayPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type MIL_DOUBLE
  • array of type MIL_INT
  • array of type MIL_INT32
  • array of type MIL_INT64
  • M_NULL
  • MIL_DOUBLE
  • MIL_INT
  • MIL_INT32
  • MIL_INT64

Specifies the address of the second array in which to write the requested information.

For most result types, only FirstResultArrayPtr will be used, and SecondResultArrayPtr should be set to M_NULL.

With a multiple-occurrence marker, results for each edge or stripe are held in an array. The results for each occurrence of the marker will be stored in a separate element of the specified arrays.

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

To retrieve results from any type of marker (measurement marker buffer), or from a measurement result buffer, ResultType can be set to one of the values specified in the table below.

function map For any type of marker (measurement marker buffer) or a measurement result buffer
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_NUMBER +

Retrieves the number of points, edges, stripes, or circles measured. Note that edges, stripes, and circles are searched for, but points are placed manually. For circle markers, M_NUMBER will never return a value greater than one, since circles cannot be defined as a multiple-occurrence marker.

If you are getting results from a measurement result buffer, and you are using two multiple-occurrence markers that have a different number of occurrences, MIL uses the fewest number of occurrences to calculate results (MmeasCalculate()).

After a call to the MmeasFindMarker() function, this number is equal to the number of occurrences of a marker found in the search region.

After a call to the MmeasCalculate() function, this number is equal to the smallest number of occurrences held in either marker involved in the calculation.

Note that this result type always returns one value, even when using a multiple-occurrence marker, and there are multiple occurrences.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns the number of points, edges, stripes, or circles measured.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

To retrieve results from an edge or stripe marker (measurement marker buffer), or from a measurement result buffer, ResultType can be set to one of the values specified in the table below. If you are getting results from a measurement result buffer, and you are using two multiple-occurrence markers that have a different number of occurrences, MIL uses the fewest number of occurrences to calculate results (MmeasCalculate()).

Unless otherwise specified, the following values require that you pass the FirstResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to the number of marker occurrences found. In addition, you must pass the SecondResultArrayPtr parameter M_NULL.

function map For an edge or stripe marker (measurement marker buffer) or a measurement result buffer
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_ANGLE +

Retrieves the angle for each marker occurrence, in degrees. The angle is relative to the output coordinate system specified using M_RESULT_OUTPUT_UNITS with either MmeasSetMarker() (for a measurement marker buffer) or MmeasControl() (for a measurement result buffer).

If retrieved from a measurement marker buffer, M_ANGLE returns the angle of the line measured for the edge. For a stripe marker, this line follows the center of the stripe and is calculated as the mean of the lines following its edges. If the result is requested for a specific edge of the stripe, using the combination value M_EDGE_FIRST or M_EDGE_SECOND, the angle of the first or second edge is returned, respectively.

If retrieved from a measurement result buffer, M_ANGLE returns the angle of the lines joining each of the occurrences of the two markers, relative to the positive X-axis.

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 25: Calibrating your camera setup.

(summarize)
Collapse M_LINE_A +

Retrieves the coefficient A of the line equation, for each marker occurrence. The line equation is of the general form, Ax + By + C = 0.

If retrieved from an edge marker, M_LINE_A returns the coefficient A of the line measured for the edge. For a stripe marker, this line follows the center of the stripe, and is calculated as the mean of the lines following its edges. If the result is requested for a specific edge of the stripe, using the combination value M_EDGE_FIRST or M_EDGE_SECOND, the coefficient A of the line equation of the first or second edge, respectively, is returned.

If retrieved from a measurement result buffer, M_LINE_A returns the coefficient A of the line joining each occurrence of the two markers.

(summarize)
Collapse M_LINE_B +

Retrieves the coefficient B of the line equation, for each marker occurrence. The line equation is of the general form, Ax + By + C = 0.

If retrieved from an edge marker, M_LINE_B returns the coefficient B of the line measured for the edge. For a stripe marker, this line follows the center of the stripe, and is calculated as the mean of the lines following its edges. If the result is requested for a specific edge of the stripe, using the combination value M_EDGE_FIRST or M_EDGE_SECOND, the coefficient B of the line equation of the first or second edge, respectively, is returned.

If retrieved from a measurement result buffer, M_LINE_B returns the coefficient B of the line joining each occurrence of the two markers.

(summarize)
Collapse M_LINE_C +

Retrieves the coefficient C of the line equation, for each marker occurrence. The line equation is of the general form, Ax + By + C = 0.

If retrieved from an edge marker, M_LINE_C returns the coefficient C of the line measured for the edge. For a stripe marker, this line follows the center of the stripe, and is calculated as the mean of the lines following its edges. If the result is requested for a specific edge of the stripe, using the combination value M_EDGE_FIRST or M_EDGE_SECOND, the coefficient C of the line equation of the first or second edge, respectively, is returned.

If retrieved from a measurement result buffer, M_LINE_C returns the coefficient C of the lines joining each occurrence of the two markers.

(summarize)

To retrieve results from any type of marker (measurement marker buffer), ResultType can be set to one of the values specified in the table below.

function map For any type of marker (measurement marker buffer)
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_POSITION +

Retrieves the X- and Y-coordinates of the position, for each marker occurrence.

For point markers, the position refers to the X- and Y-coordinates specified using MmeasSetMarker() with M_POSITION.

For edge markers, the position refers to the X- and Y-coordinates of the edge's maximum edgevalue (highest edge peak).

For stripe markers, the position refers to the X- and Y-coordinates at the center of a theoretical line between the position (maximum edgevalue) of the stripe's two outermost edges. If you use M_EDGE_FIRST or M_EDGE_SECOND, you will get the X- and Y-coordinates of that edge's maximum edgevalue (highest edge peak).

For circle markers, the position refers to the X- and Y-coordinates at the circle's center.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the position on the X-axis.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the position on the Y-axis.

To retrieve results from an edge, stripe, or circle marker (measurement marker buffer), ResultType can be set to one of the values specified in the table below.

function map For an edge, stripe, or circle marker (measurement marker buffer)
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_FIT_ERROR_MAX +

Retrieves the maximum distance from a subedge to the fitted line equation (for edge or stripe markers) or to the fitted circle (for circle markers), for each marker occurrence. This distance is called the maximum fit error. If you did not specify subregions (for edges or stripes), M_FIT_ERROR_MAX returns 0. Note that circles always have subregions.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the maximum fit error. For a stripe marker, this is the maximum fit error for the first edge.

(summarize)
Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the maximum fit error for the second edge of a stripe. For edge and circle markers, set this parameter to M_NULL.

(summarize)
Collapse M_NUMBER_OF_OUTLIERS +

Retrieves the number of subedges considered outliers, for each marker occurrence. Outliers are subedges within the search region that do not contribute to marker's fit operation since they are considered to be too far away from the general distribution of subedges. The number of outliers corresponds to the number of fitted subedges subtracted from the number of subregions.

Use M_SUB_EDGES_MARKER_INDEX to establish the occurrence to which the subedge belongs.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the number of outliers for the edge or circle. For a stripe marker, this is the number of outliers for the first edge.

(summarize)
Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the number of outliers for the second edge of a stripe. For edge and circle markers, set this parameter to M_NULL.

(summarize)
Collapse M_SEARCH_REGION_WAS_CLIPPED +

Retrieves whether the marker's search region was clipped. This value is only useful if you enabled clipping (MmeasSetMarker() with M_SEARCH_REGION_CLIPPING).

Note that this result type always returns one value, even when using a multiple-occurrence marker, and there are multiple occurrences.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns one of the following.

(summarize)
Collapse 0

Specifies that the search region was not clipped.

Collapse 1

Specifies that the search region was clipped.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_SUB_EDGES_MARKER_INDEX +

Retrieves the index of the occurrence on which each subedge is located, for each marker occurrence. If a subedge is not found in a subregion, an arbitrary number is returned. Use M_SUB_EDGES_WEIGHT to determine if a subedge was actually found.

This result is useful when retrieving subedge-type of results for a multiple-occurrence marker. For example, you can use the index to separate, by marker, the values obtained with M_SUB_EDGES_POSITION and M_SUB_EDGES_WEIGHT.

(summarize)
Collapse FirstResultArrayPtr
Data type info
  • Data type: array of type MIL_DOUBLE
    Array size: The array size must be (number of occurrences) x (number of subregions).
    Note: When getting results for edge markers.

  • Data type: array of type MIL_DOUBLE
    Array size: The array size must be 2 x (number of occurrences) x (number of subregions); if the result is requested for a specific edge of the stripe, using the combination value M_EDGE_FIRST or M_EDGE_SECOND, the array size must be (number of occurrences) x (number of subregions).
    Note: When getting results for stripe markers.

Returns the index values. For a stripe marker, these are the index values for the first edge.

(summarize)
Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: For stripe markers, the array size must be 2 x (number of occurrences) x (number of subregions); if the result is requested for a specific edge of the stripe, using the combination value M_EDGE_FIRST or M_EDGE_SECOND, the array size must be (number of occurrences) x (number of subregions).

Returns whether the result refers to the first or second edge of the stripe. For edge and circle markers, this parameter must be set to M_NULL.

(summarize)
Collapse M_EDGE_FIRST

Specifies that the edge is the first edge in the stripe.

Collapse M_EDGE_SECOND

Specifies that the edge is the second edge in the stripe.

Collapse M_SUB_EDGES_POSITION +

Retrieves the X- and Y-coordinates of the subedges, for each marker occurrence.

If a subedge is not found in a subregion, the X- and Y- positions will be arbitrary numbers. Use M_SUB_EDGES_WEIGHT to determine whether a subedge was found.

Use M_SUB_EDGES_MARKER_INDEX to establish the occurrence to which the subedge belongs.

(summarize)
Collapse FirstResultArrayPtr
Data type info
  • Data type: array of type MIL_DOUBLE
    Array size: The array size must be (number of occurrences) x (number of subregions).
    Note: When getting results for edge markers.

  • Data type: array of type MIL_DOUBLE
    Array size: The array size must be 2 x (number of occurrences) x (number of subregions); if the result is requested for a specific edge of the stripe, using the combination value M_EDGE_FIRST or M_EDGE_SECOND, the array size must be (number of occurrences) x (number of subregions).
    Note: When getting results for stripe markers.

Returns the position on the X-axis.

Collapse SecondResultArrayPtr
Data type info
  • Data type: array of type MIL_DOUBLE
    Array size: The array size must be (number of occurrences) x (number of subregions).
    Note: When getting results for edge markers.

  • Data type: array of type MIL_DOUBLE
    Array size: The array size must be 2 x (number of occurrences) x (number of subregions); if the result is requested for a specific edge of the stripe, using the combination value M_EDGE_FIRST or M_EDGE_SECOND, the array size must be (number of occurrences) x (number of subregions).
    Note: When getting results for stripe markers.

Returns the position on the Y-axis.

Collapse M_SUB_EDGES_WEIGHT +

Retrieves the weight of the subedges, for each marker occurrence. The weight indicates whether a subedge was found in the subregion. Found subedges are used to calculate the fit, angle, and line equation values.

Use M_SUB_EDGES_MARKER_INDEX to establish the occurrence to which the subedge belongs.

(summarize)
Collapse FirstResultArrayPtr
Data type info
  • Data type: array of type MIL_DOUBLE
    Array size: The array size must be (number of occurrences) x (number of subregions).
    Note: When getting results for edge markers.

  • Data type: array of type MIL_DOUBLE
    Array size: The array size must be 2 x (number of occurrences) x (number of subregions); if the result is requested for a specific edge of the stripe, using the combination value M_EDGE_FIRST or M_EDGE_SECOND, the array size must be (number of occurrences) x (number of subregions).
    Note: When getting results for stripe markers.

Returns one of the following.

(summarize)
Collapse 0

Specifies that the subedge was not found.

Collapse 1

Specifies that the subedge was found.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_VALID_FLAG +

Retrieves whether the marker was found.

Note that this result type always returns one value, even when using a multiple-occurrence marker, and there are multiple occurrences.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns one of the following.

(summarize)
Collapse M_FALSE

Specifies that the marker was not found.

Collapse M_TRUE

Specifies that the marker was found.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

To retrieve results from an edge or stripe marker (measurement marker buffer), ResultType can be set to one of the values specified in the table below, unless otherwise specified.

Unless otherwise specified, the following values require that you pass the FirstResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to the number of marker occurrences found. In addition, you must pass the SecondResultArrayPtr parameter the address of a MIL_DOUBLE.

function map For an edge or stripe marker (measurement marker buffer)
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_BOX_ANGLE_FOUND +

Retrieves the angle found for the box search region when the angle is internally determined by MIL. In this case, you must have specified M_ANY as the angle of the box search region (MmeasSetMarker() with M_BOX_ANGLE) or enabled an angular search (M_BOX_ANGLE_MODE set to M_ENABLE).

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 25: Calibrating your camera setup.

Note that this result type always returns one value, even when using a multiple-occurrence marker, and there are multiple occurrences.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns the angle of the box search region, in degrees.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_BOX_CORNER_BOTTOM_LEFT +

Retrieves the coordinates of the bottom-left corner of the marker's box search region.

If the box search region was rotated using MmeasSetMarker() with M_BOX_ANGLE or from an angular search, the result will take that rotation into account.

Note that this result type always returns one set of values (X- and Y-positions), even when using a multiple-occurrence marker, and there are multiple occurrences.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns the X-position.

Collapse SecondResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns the Y-position.

Collapse M_BOX_CORNER_BOTTOM_RIGHT +

Retrieves the coordinates of the bottom-right corner of the marker's box search region.

If the box search region was rotated using MmeasSetMarker() with M_BOX_ANGLE or from an angular search, the result will take that rotation into account.

Note that this result type always returns one set of values (X- and Y-positions), even when using a multiple-occurrence marker, and there are multiple occurrences.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns the X-position.

Collapse SecondResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns the Y-position.

Collapse M_BOX_CORNER_TOP_LEFT +

Retrieves the coordinates of the top-left corner of the marker's box search region.

If the box search region was rotated using MmeasSetMarker() with M_BOX_ANGLE or from an angular search, the result will take that rotation into account.

Note that this result type always returns one set of values (X- and Y-positions), even when using a multiple-occurrence marker, and there are multiple occurrences.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns the X-position.

Collapse SecondResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns the Y-position.

Collapse M_BOX_CORNER_TOP_RIGHT +

Retrieves the coordinates of the top-right corner of the marker's box search region.

If the box search region was rotated using MmeasSetMarker() with M_BOX_ANGLE or from an angular search, the result will take that rotation into account.

Note that this result type always returns one set of values (X- and Y-positions), even when using a multiple-occurrence marker, and there are multiple occurrences.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns the X-position.

Collapse SecondResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns the Y-position.

Collapse M_BOX_EDGEVALUES +

Retrieves the edgevalues of the marker's box search region.

MIL establishes edgevalues by applying a first derivative filter to the search region's intensity profile and normalizing the output according to the number of pixels and the maximum pixel value possible. To establish the intensity profile, MIL projects the pixels bounded by the two-dimensional search region (or each subregion) into a one-dimensional pixel intensity summation, which is performed vertically or horizontally, depending on the search region's origin and search direction.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: To determine the number of edgevalues returned, use MmeasGetResult() with M_BOX_EDGEVALUES_NUMBER.

Returns the edgevalues.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_BOX_EDGEVALUES_NUMBER +

Retrieves the number of edgevalues that M_BOX_EDGEVALUES returns. This value corresponds to the number of pixels along the width or height of the marker's box search region, depending on the search region's origin and search direction.

Note that this result type always returns one value, even when using a multiple-occurrence marker, and there are multiple occurrences.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns the number of edgevalues.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_DISTANCE_FROM_BOX_ORIGIN +

Retrieves the position, as a distance value relative to the origin of the box search region, for each marker occurrence.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the position as a distance value. For a stripe marker, this is the distance to the first edge of the stripe.

(summarize)
Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the position as the distance to the second edge of a stripe. For edge markers, set this parameter to M_NULL.

(summarize)
Collapse M_DRAW_PROFILE_SCALE_OFFSET +

Retrieves the scale and offset used to draw a profile.

(summarize)
Collapse FirstResultArrayPtr

Returns the scale used to draw a profile. If M_AUTO_SCALE_PROFILE was set using MmeasSetMarker(), this returns the resolved value.

(summarize)
Collapse SecondResultArrayPtr

Returns the offset used to draw a profile. If M_AUTO_OFFSET_PROFILE was set using MmeasSetMarker(), this returns the resolved value.

(summarize)
Collapse M_EDGE_CONTRAST +

Retrieves the grayscale difference between the start (M_EDGE_START) and end (M_EDGE_END) of the intensity transition from which the edge is established, for each marker occurrence.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the contrast. For a stripe marker, this is the contrast of the first edge.

(summarize)
Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the contrast of the second edge of a stripe. For edge markers, set this parameter to M_NULL.

(summarize)
Collapse M_EDGE_END +

Retrieves the X- and Y-coordinates of the end of the edge (that is, the end of the intensity transition from which the edge is established), for each marker occurrence. For a stripe marker, the coordinates representing the average value of end positions is returned unless otherwise specified by the combination value M_EDGE_FIRST or M_EDGE_SECOND.

In the intensity profile calculated for a search region, M_EDGE_START represents the first significant slope used to establish the edge, while M_EDGE_END represents the first significant slope in the opposite direction used to establish the edge. Depending on the search region's origin and search direction, the edge's start and end can be on either side of the edge.

To retrieve the minimum and maximum position of the edge peak of the marker, use M_EDGEVALUE_PEAK_POS_MIN and M_EDGEVALUE_PEAK_POS_MAX.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the X-coordinate of the end of the edge.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the Y-coordinate of the end of the edge.

Collapse M_EDGE_INSIDE +

Retrieves the number of edges located between the two exterior edges of a stripe, for each marker occurrence. This result only applies to stripes.

(summarize)
Collapse M_EDGE_START +

Retrieves the X- and Y-coordinates of the start of the edge (that is, the start of the intensity transition from which the edge is established), for each marker occurrence. For a stripe marker, the coordinates representing the average value of start positions is returned unless otherwise specified by the combination value M_EDGE_FIRST or M_EDGE_SECOND.

In the intensity profile calculated for a search region, M_EDGE_START represents the first significant slope used to establish the edge, while M_EDGE_END represents the first significant slope in the opposite direction used to establish the edge. Depending on the search region's origin and search direction, the edge's start and end can be on either side of the edge.

To retrieve the minimum and maximum position of the edge peak of the marker, use M_EDGEVALUE_PEAK_POS_MIN and M_EDGEVALUE_PEAK_POS_MAX.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the X-coordinate of the start of the edge.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the Y-coordinate of the start of the edge.

Collapse M_EDGE_STRENGTH +

Retrieves the greatest edgevalue of the edge, for each marker occurrence. The greatest edgevalue of an edge is considered to be its edge strength.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the edge strength. For a stripe marker, this is the strength of the first edge.

(summarize)
Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the strength of the second edge of a stripe. For edge markers, set this parameter to M_NULL.

(summarize)
Collapse M_EDGE_WIDTH +

Retrieves the distance between the start (M_EDGE_START) and end (M_EDGE_END) of the intensity transition from which the edge is established, for each marker occurrence.

To retrieve the width of the edge established by the edge peak of the marker, use M_EDGEVALUE_PEAK_WIDTH.

(summarize)
Collapse FirstResultArrayPtr

Returns the edge width. For a stripe marker, this is the edge width of the first edge.

(summarize)
Collapse SecondResultArrayPtr

Returns the edge width of the second edge of a stripe. For edge markers, set this parameter to M_NULL.

(summarize)
Collapse M_EDGEVALUE_PEAK_CONTRAST +

Retrieves 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), for each marker occurrence.

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

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the contrast. For a stripe marker, this is the contrast of the first edge.

(summarize)
Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the contrast of the second edge of a stripe. For edge markers, set this parameter to M_NULL.

(summarize)
Collapse M_EDGEVALUE_PEAK_POS_MAX +

Retrieves the X- and Y-coordinates of the maximum value of the edge peak (that is, the maximum edgevalue along the first derivative representation of the intensity profile), known as the summit, for each marker occurrence. For a stripe marker, the coordinates representing the average value of maximum positions is returned unless otherwise specified by the combination value M_EDGE_FIRST or M_EDGE_SECOND.

To establish the maximum and minimum positions of the edge peak, MIL considers the portion of the peak that contains the maximum edgevalue, and that satisfies the M_EDGEVALUE_MIN and M_EDGEVALUE_VAR_MIN constraints set using MmeasSetMarker(). That is, the peak must dip, on both sides, below either the minimum edgevalue threshold (M_EDGEVALUE_MIN) or the local edgevalue threshold established by subtracting M_EDGEVALUE_VAR_MIN from the peak's summit, whichever is highest.

Depending on the search region's origin and search direction, the maximum and minimum position can be on either side of the edge peak. Note that you can also retrieve different start and end positions of the edge using M_EDGE_START and M_EDGE_END.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the X-coordinate of the maximum position of the edge peak.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the Y-coordinate of the maximum position of the edge peak.

Collapse M_EDGEVALUE_PEAK_POS_MIN +

Retrieves the X- and Y-coordinates of the minimum position of the edge peak (that is, the minimum edgevalue along the first derivative representation of the intensity profile), for each marker occurrence. For a stripe marker, the coordinates representing the average value of minimum positions is returned unless otherwise specified by the combination value M_EDGE_FIRST or M_EDGE_SECOND.

To establish the minimum and maximum positions of the edge peak, MIL considers the portion of the peak that contains the maximum edgevalue, and that satisfies the M_EDGEVALUE_MIN and M_EDGEVALUE_VAR_MIN constraints set using MmeasSetMarker(). That is, the peak must dip, on both sides, below either the minimum edgevalue threshold (M_EDGEVALUE_MIN)or the local edgevalue threshold established by subtracting M_EDGEVALUE_VAR_MIN from the peak's summit, whichever is highest.

Depending on the search region's origin and search direction, the maximum and minimum position can be on either side of the edge peak's summit. Note that you can also retrieve different start and end positions of the edge using M_EDGE_START and M_EDGE_END.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the X-coordinate of the minimum position of the edge peak.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the Y-coordinate of the minimum position of the edge peak.

Collapse M_EDGEVALUE_PEAK_WIDTH +

Retrieves the distance between the minimum (M_EDGEVALUE_PEAK_POS_MIN) and maximum (M_EDGEVALUE_PEAK_POS_MAX) position of the edge peak (that is, the minimum and maximum positions of the edgevalue along the first derivative representation of the intensity profile), for each marker occurrence.

To retrieve the width of the edge instead of the width of the edge peak, use M_EDGE_WIDTH.

(summarize)
Collapse FirstResultArrayPtr

Returns the edge width. For a stripe marker, MIL returns the edge width of the first edge.

(summarize)
Collapse SecondResultArrayPtr

Returns the edge width of the second edge of a stripe. For edge markers, set this parameter to M_NULL.

(summarize)
Collapse M_LENGTH +

Retrieves the length of the side of the search region perpendicular to the search direction. This is useful to retrieve the number of pixels that were projected into a single value of the intensity profile without having to find M_ORIENTATION first.

(summarize)
Collapse M_LINE_END_POINT_FIRST +

Retrieves the X- and Y-coordinates of the first intersection point, for each marker occurrence, between the edge's mean line and the box search region. For a stripe marker, the mean line is the mean of the lines following its two edges.

If you request this result for a specific edge of a stripe, using the combination value M_EDGE_FIRST or M_EDGE_SECOND, M_LINE_END_POINT_FIRST will return the first intersection point of the line following the specified edge and the box search region.

If the box search region was rotated using MmeasSetMarker() with M_BOX_ANGLE or from an angular search, the intersection will take that rotation into account.

For vertical edges, the first intersection point is typically at the top of the box search region, while for horizontal edges the first intersection point is typically on the right of the box search region. Note that the intersection point that is considered to be the first or second (M_LINE_END_POINT_SECOND) can change depending on the edge's angle and whether the box search region is rotated.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the X-coordinate of the intersection point.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the Y-coordinate of the intersection point.

Collapse M_LINE_END_POINT_SECOND +

Retrieves the X- and Y-coordinates of the second intersection point, for each marker occurrence, between the edge's mean line and the box search region. For a stripe marker, the mean line is the mean of the lines following its two edges.

If you request results for a specific edge of a stripe marker occurrence, using the combination value M_EDGE_FIRST or M_EDGE_SECOND, M_LINE_END_POINT_SECOND returns the second intersection point of the line following the specified edge and the box search region.

If the box search region was rotated using MmeasSetMarker() with M_BOX_ANGLE or from an angular search, the intersection will take that rotation into account.

For vertical edges, the second intersection point is typically at the bottom of the box search region, while for horizontal edges the second intersection point is typically on the left of the box search region. Note that the intersection point that is considered to be the first (M_LINE_END_POINT_FIRST) or second can change depending on the edge's angle and whether the box search region is rotated.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the X-coordinate of the intersection point.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the Y-coordinate of the intersection point.

Collapse M_ORIENTATION +

Retrieves the orientation of the marker.

Note that this result type always returns one value, even when using a multiple-occurrence marker, and there are multiple occurrences.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns one of the following.

(summarize)
Collapse M_HORIZONTAL

Specifies a horizontal orientation.

Collapse M_VERTICAL

Specifies a vertical orientation.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_POLARITY +

Retrieves the polarity, for each marker occurrence.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the polarity of the edge. For a stripe marker, this is the polarity of the first edge.

(summarize)
Collapse M_NEGATIVE

Specifies that the polarity of the edge is negative.

Collapse M_POSITIVE

Specifies that the polarity of the edge is positive.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: The number of marker occurrences.

Returns the polarity of the second edge of a stripe. For edge markers, set this parameter to M_NULL.

(summarize)
Collapse M_NEGATIVE

Specifies that the polarity of the second edge is negative.

Collapse M_POSITIVE

Specifies that the polarity of the second edge is positive.

Collapse M_SCORE +

Retrieves the score, for each marker occurrence. This score represents how confident you should be that MIL found what you expected. For a stripe marker, the score is the average of the score of both edges.

(summarize)
Collapse M_SCORE_TOTAL +

Retrieves the marker's final score. This score represents how confident you should be that MIL found what you expected. MIL establishes the marker's final score using all marker occurrences and score characteristics. For a stripe marker, the score is the average of the score of both edges.

Note that this result type always returns one value, even when using a multiple-occurrence marker, and there are multiple occurrences.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns the score, as a percentage.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_SPACING +

Retrieves the distance between each marker occurrence and the next.

(summarize)
Collapse M_STRIPE_WIDTH +

Retrieves the width of the stripe, for each marker occurrence. The stripe's width refers to the distance between the position of the maximum edgevalue of the stripe's two outermost edges. This result is only available for stripe markers.

(summarize)

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

Note that if you explicitly request the result for a specific edge of a stripe, using M_EDGE_FIRST or M_EDGE_SECOND, you must retrieve the result for that edge with FirstResultArrayPtr. In this case, you must set SecondResultArrayPtr to M_NULL.

function map For specifying the edge for which to retrieve results (stripe markers only)
CollapseCombination value Description
Collapse M_EDGE_FIRST

Retrieves the specified result for the first outermost edge of a stripe.

Collapse M_EDGE_SECOND

Retrieves specified result for the second outermost edge of a stripe.

To retrieve results from a circle marker (measurement marker buffer), ResultType can be set to the value specified in the table below.

Unless otherwise specified, the following values require that you pass the FirstResultArrayPtr parameter the address of a MIL_DOUBLE. In addition, you must pass the SecondResultArrayPtr parameter M_NULL.

function map For a circle marker (measurement marker buffer)
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_RADIUS +

Retrieves the circle's radius.

(summarize)

To retrieve results from a measurement result buffer, the ResultType parameter can be set to one of the following values. If you are using two multiple-occurrence markers that have a different number of occurrences, MIL uses the fewest number of occurrences to calculate results (MmeasCalculate()).

Unless otherwise specified, the following values require that you pass the FirstResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to the number of occurrences of the marker found the fewest times. In addition, you must pass the SecondResultArrayPtr parameter M_NULL.

function map For a measurement result buffer
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_DISTANCE +

Retrieves the distance between each occurrence of the two markers.

(summarize)
Collapse M_DISTANCE_X +

Retrieves the distance on the X-axis between each occurrence of the two markers.

(summarize)
Collapse M_DISTANCE_Y +

Retrieves the distance on the Y-axis between each occurrence of the two markers.

(summarize)

You can add one of the following values to the above-mentioned values to get the type of statistic to be performed.

function map For specifying the type of statistic to be performed
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_MAX

Retrieves the maximum value for the requested characteristic for all the occurrences of a marker. Only one result is returned.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_MEAN

Retrieves the mean value for the requested characteristic for all the occurrences of a marker. Only one result is returned.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_MIN

Retrieves the minimum value for the requested characteristic for all the occurrences of a marker. Only one result is returned.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_STANDARD_DEVIATION

Retrieves the standard deviation of the values for the requested characteristic for all the occurrences of a marker. Only one result is returned.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

You can add one of the following values to the above-mentioned values to cast the requested results to the required data type.

function map For specifying the data type
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_TYPE_MIL_DOUBLE

Casts the requested results to a MIL_DOUBLE.

(summarize)
Collapse FirstResultArrayPtr and SecondResultArrayPtr
Data type info
  • Data type: array of type MIL_DOUBLE
    Array size: Large enough to hold results of all occurrences of the marker.
    Note: When multiple results are returned.

  • Data type: MIL_DOUBLE
    Note: When a single result is returned.

Collapse M_TYPE_MIL_INT

Casts the requested results to a MIL_INT.

(summarize)
Collapse FirstResultArrayPtr and SecondResultArrayPtr
Data type info
  • Data type: array of type MIL_INT
    Array size: Large enough to hold results of all occurrences of the marker.
    Note: When multiple results are returned.

  • Data type: MIL_INT
    Note: When a single result is returned.

Collapse M_TYPE_MIL_INT32

Casts the requested results to a MIL_INT32.

(summarize)
Collapse FirstResultArrayPtr and SecondResultArrayPtr
Data type info
  • Data type: array of type MIL_INT32
    Array size: Large enough to hold results of all occurrences of the marker.
    Note: When multiple results are returned.

  • Data type: MIL_INT32
    Note: When a single result is returned.

Collapse M_TYPE_MIL_INT64

Casts the requested results to a MIL_INT64.

(summarize)
Collapse FirstResultArrayPtr and SecondResultArrayPtr
Data type info
  • Data type: array of type MIL_INT64
    Array size: Large enough to hold results of all occurrences of the marker.
    Note: When multiple results are returned.

  • Data type: MIL_INT64
    Note: When a single result is returned.

Compilation information
Header Include mil.h.
Library Use mil.lib; milmeas.lib.
DLL Requires mil.dll; milmeas.dll.
NUMBER ANGLE LINE A LINE B LINE C POSITION FIT ERROR MAX NUMBER OF OUTLIERS SEARCH REGION WAS CLIPPED SUB EDGES MARKER INDEX EDGE FIRST EDGE SECOND SUB EDGES POSITION SUB EDGES WEIGHT VALID FLAG FALSE TRUE BOX ANGLE FOUND BOX CORNER BOTTOM LEFT BOX CORNER BOTTOM RIGHT BOX CORNER TOP LEFT BOX CORNER TOP RIGHT BOX EDGEVALUES BOX EDGEVALUES NUMBER DISTANCE FROM BOX ORIGIN DRAW PROFILE SCALE OFFSET EDGE CONTRAST EDGE END EDGE INSIDE EDGE START EDGE STRENGTH EDGE WIDTH EDGEVALUE PEAK CONTRAST EDGEVALUE PEAK POS MAX EDGEVALUE PEAK POS MIN EDGEVALUE PEAK WIDTH LENGTH LINE END POINT FIRST LINE END POINT SECOND ORIENTATION HORIZONTAL VERTICAL POLARITY NEGATIVE POSITIVE NEGATIVE POSITIVE SCORE SCORE TOTAL SPACING STRIPE WIDTH EDGE FIRST EDGE SECOND RADIUS DISTANCE DISTANCE X DISTANCE Y MAX MEAN MIN STANDARD DEVIATION TYPE MIL DOUBLE TYPE MIL INT TYPE MIL INT32 TYPE MIL INT64 STRIPE EDGE CIRCLE