| MIL 10 Reference
| Customize Help
| Save Settings

MedgeGetResult



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 results of the included edges from an Edge Finder result buffer.
Syntax
void MedgeGetResult(
MIL_ID EdgeResultId, //in
MIL_INT EdgeIndexOrLabelValue, //in
MIL_INT64 ResultType, //in
void *FirstResultArrayPtr, //out
void *SecondResultArrayPtr //out
)
Description

This function retrieves the results of a specified type from an Edge Finder result buffer, after an MedgeCalculate() call.

The following result types can be retrieved from the Edge Finder result buffer:

  • General results related to the edge extraction and edge processing.

  • Edge chain results.

  • Edge feature results.

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 of the image.

If your target image was associated with a calibration context but you want to retrieve positional and dimensional results in pixel units, use MedgeControl() 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, MedgeGetResult() will generate an error.

Note that in the presence of distortion, some results are meaningless when converted from real-world to pixel units (for example, the Feret angles). For example, if an edge appears warped in the source image, but the calibration context of the source image compensates for this during the extraction, the resulting Feret angles are meaningful in the real-world coordinate system, and meaningless in the pixel coordinate system.

Note that, unless otherwise specified, results are only returned to FirstResultArrayPtr; when this is the case, SecondResultArrayPtr must be set to M_NULL.

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
EdgeResultId

Specifies the identifier of the Edge Finder result buffer from which to get results.

EdgeIndexOrLabelValue

Specifies the edge(s) from which to get results. This parameter can be set to one of the following values.

function map For edge results
CollapseValue Description
Collapse M_DEFAULT

Same as M_ALL.

Collapse M_ALL +

Specifies all edges. That is, the target array(s) will be filled with the specified type of result for all the included edges. Note that target array values are ordered by edge indices.

(summarize)
Collapse Value +

Specifies either the edge's index or label. Index values must fall within the following range: 0 to the number of included edges in the Edge Finder result buffer - 1. Label values can be returned with the result type M_LABEL_VALUE.

(summarize)
Combination constants for the values listed in For edge results.

You can add one of the following values to the above-mentioned values to specify whether you are providing an index or a label value.

function map For specifying an index or label value
CollapseCombination value Description
Collapse M_TYPE_INDEX

Specifies an edge using its index value.

This is the default value.

(summarize)
Collapse M_TYPE_LABEL

Specifies an edge using its label value.

ResultType

Specifies the type of result 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_ID
  • array of type MIL_INT
  • array of type MIL_INT32
  • array of type MIL_INT64
  • M_NULL
  • MIL_DOUBLE
  • MIL_ID
  • MIL_INT
  • MIL_INT32
  • MIL_INT64

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

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_ID
  • array of type MIL_INT
  • array of type MIL_INT32
  • array of type MIL_INT64
  • M_NULL
  • MIL_DOUBLE
  • MIL_ID
  • MIL_INT
  • MIL_INT32
  • MIL_INT64

Specifies the address of the second array in which to write the requested information. If nothing is to be written, set SecondResultArrayPtr to M_NULL.

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

The tables below list possible values for the ResultType parameter and possible values returned to the FirstResultArrayPtr and SecondResultArrayPtr parameters.

To retrieve general results related to the edge extraction and edge processing, the ResultType parameter must be set to one of the values below.

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 1. In addition, you must pass the SecondResultArrayPtr parameter M_NULL.

function map For retrieving results related to edge extraction and edge processing
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_CONTEXT_TYPE +

Retrieves the type of the Edge Finder context that was used to extract edges.

(summarize)
Collapse FirstResultArrayPtr

Returns one of the following.

(summarize)
Collapse M_CONTOUR

Specifies a contour context type, which is used to find object contours in images.

Collapse M_CREST

Specifies a crest context type, which is used to find thin line crests in images.

Collapse M_SIZE_X +

Retrieves the width of the source image and internal processing buffers, in pixels.

Note that if you have used MedgePut() to add edge chains to the Edge Finder result buffer, the width returned can be bigger than the width of the source image buffer if the edge chains exceed the boundaries of the source image buffer.

(summarize)
Collapse M_SIZE_Y +

Retrieves the height of the source image and internal processing buffers, in pixels.

Note that if you have used MedgePut() to add edge chains to the Edge Finder result buffer, the height returned can be bigger than the height of the source image buffer if the edge chains exceed the boundaries of the source image buffer.

(summarize)
Collapse M_THRESHOLD_HIGH +

Retrieves the upper bound value, used during hysteresis thresholding to extract edges.

(summarize)
Collapse M_THRESHOLD_LOW +

Retrieves the lower bound value, used during hysteresis thresholding to extract edges.

(summarize)
Collapse M_THRESHOLDS +

Retrieves both the lower and upper bound values, used during hysteresis thresholding to extract edges.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: 1

Returns the lower bound threshold value.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: 1

Returns the upper bound threshold value.

Collapse M_TIMEOUT_END +

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

(summarize)
Collapse FirstResultArrayPtr

Returns one of the following.

(summarize)
Collapse M_FALSE

Specifies that the timeout limit has not been reached.

Collapse M_TRUE

Specifies that the timeout limit has been reached.

To retrieve information about the internal processing buffers, you must specify the internal buffer about which to retrieve the information and the type of information to retrieve. To do so, set ResultType to a combination of two values, one from each of the following two tables. The information retrieved can be used to allocate a buffer with the same properties as the internal processing buffer. This newly allocated buffer can then be used, for example, as the destination buffer for MedgeDraw().

The internal Edge Finder buffers cannot be accessed directly; however, they can be accessed by creating a buffer with the same characteristics as the internal buffer and using MedgeDraw() to draw the contents of the internal Edge Finder buffer into your new buffer.

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 1. In addition, you must pass the SecondResultArrayPtr parameter M_NULL.

function map For retrieving information about the internal processing buffers
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_ANGLE_ID +

Retrieves information about the internal angle buffer.

Note that information about the internal angle buffer is only available if it was saved using MedgeControl() with M_SAVE_ANGLE set to M_ENABLE.


You must specify a combination value from the following table:
(summarize)
Collapse M_CROSS_DERIVATIVE_ID +

Retrieves information about the internal cross derivative buffer.

Note that information about the internal cross derivative buffer is only available if it was saved using MedgeControl() with M_SAVE_DERIVATIVES set to M_ENABLE.


You must specify a combination value from the following table:
(summarize)
Collapse M_FIRST_DERIVATIVE_X_ID +

Retrieves information about the internal first derivative buffer in the X-direction.

Note that information about the internal first derivative in the X-direction buffer is only available if it was saved using MedgeControl() with M_SAVE_DERIVATIVES set to M_ENABLE.


You must specify a combination value from the following table:
(summarize)
Collapse M_FIRST_DERIVATIVE_Y_ID +

Retrieves information about the internal first derivative buffer in the Y-direction.

Note that information about the internal first derivative buffer in the Y-direction is only available if it was saved using MedgeControl() with M_SAVE_DERIVATIVES set to M_ENABLE.


You must specify a combination value from the following table:
(summarize)
Collapse M_FIRST_DERIVATIVES_ID +

Retrieves information about the internal first derivative buffers in both the X- and Y-directions.

Note that information about the internal first derivative buffers in both the X- and Y-directions is only available if it was saved using MedgeControl() with M_SAVE_DERIVATIVES set to M_ENABLE.


You must specify a combination value from the following table:
(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: 1

Returns information about the internal first derivative buffer in the X-direction.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: 1

Returns information about the internal first derivative buffer in the Y-direction.

Collapse M_IMAGE_ID +

Retrieves information about the source buffer.

Note that information about the source buffer is only available if it was saved using MedgeControl() with M_SAVE_IMAGE set to M_ENABLE.


You must specify a combination value from the following table:
(summarize)
Collapse M_MAGNITUDE_ID +

Retrieves information about the internal magnitude buffer.

Note that information about the internal magnitude buffer is only available if it was saved using MedgeControl() with M_SAVE_MAGNITUDE set to M_ENABLE.

The magnitude buffer is calculated according to MedgeControl() with M_MAGNITUDE_TYPE. If M_MAGNITUDE_TYPE is set to M_SQR_NORM, magnitude values are truncated on 15.0 bits. If M_MAGNITUDE_TYPE is set to M_NORM, magnitude values are truncated on 8.7 bits, with fixed-point precision. 32-bit float buffers use the same conventions, but with floating-point precision.


You must specify a combination value from the following table:
(summarize)
Collapse M_MASK_ID +

Retrieves information about the internal mask buffer.

Note that information about the internal mask buffer is only available if it was saved using MedgeControl() with M_SAVE_MASK set to M_ENABLE.


You must specify a combination value from the following table:
(summarize)
Collapse M_SECOND_DERIVATIVE_X_ID +

Retrieves information about the internal second derivative buffer in the X-direction.

Note that information about the internal second derivative buffer in the X-direction is only available if it was saved using MedgeControl() with M_SAVE_DERIVATIVES set to M_ENABLE.


You must specify a combination value from the following table:
(summarize)
Collapse M_SECOND_DERIVATIVE_Y_ID +

Retrieves information about the internal second derivative buffer in the Y-direction.

Note that information about the internal second derivative buffer in the Y-direction is only available if it was saved using MedgeControl() with M_SAVE_DERIVATIVES set to M_ENABLE.


You must specify a combination value from the following table:
(summarize)
Collapse M_SECOND_DERIVATIVES_ID +

Retrieves information about the internal second derivative buffers in both the X- and Y-directions.

Note that information about the internal second derivative buffers in both the X- and Y-directions is only available if it was saved using MedgeControl() with M_SAVE_DERIVATIVES set to M_ENABLE.


You must specify a combination value from the following table:
(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: 1

Returns information about the internal second derivative buffer in the X-direction.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: 1

Returns information about the internal second derivative buffer in the Y-direction.

Combination constants for the values listed in For retrieving information about the internal processing buffers.

You must add one of the following values to the above-mentioned values to specify the type of information to retrieve from the specified internal processing buffer.

Note that to inquire the width or height of the internal processing buffers, use M_SIZE_X or M_SIZE_Y.

function map For specifying the type of information to retrieve from an internal processing buffer
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_SIGN

Retrieves the buffer range.

(summarize)
Collapse FirstResultArrayPtr

Returns one of the following.

(summarize)
Collapse M_SIGNED

Specifies that the buffer range is signed.

Collapse M_UNSIGNED

Specifies that the buffer range is unsigned.

Collapse M_SIZE_BAND

Retrieves the number of buffer color bands.

(summarize)
Collapse M_SIZE_BIT

Retrieves the depth per band, in bits.

(summarize)
Collapse M_TYPE

Retrieves the buffer data type and depth. Depth is returned in bits.

(summarize)
Collapse FirstResultArrayPtr

Returns one of the following.

(summarize)
Collapse M_FLOAT + 32

Specifies 32-bit float data.

Collapse M_SIGNED + 8

Specifies 8-bit signed data.

Collapse M_SIGNED + 16

Specifies 16-bit signed data.

Collapse M_SIGNED + 32

Specifies 32-bit signed data.

Collapse M_UNSIGNED + 1

Specifies 1-bit unsigned data.

Collapse M_UNSIGNED + 8

Specifies 8-bit unsigned data.

Collapse M_UNSIGNED + 16

Specifies 16-bit unsigned data.

Collapse M_UNSIGNED + 32

Specifies 32-bit unsigned data.

To retrieve chained edgel results, the ResultType parameter can be set to one of the values below. If EdgeIndexOrLabelValue is set to a specific edge, results are returned for that edge. If EdgeIndexOrLabelValue is set to M_ALL, results are returned for all the included edges.

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 M_NUMBER_OF_CHAINED_EDGELS. In addition, you must pass the SecondResultArrayPtr parameter M_NULL.

function map For retrieving edge chain results
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_CHAIN +

Retrieves the coordinates of the edge(s)'s edgels.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: the number of chained edgels in the edge. This number can be obtained using MedgeGetResult() with M_NUMBER_OF_CHAINED_EDGELS.

Returns the edgels' X-coordinates.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: the number of chained edgels in the edge. This number can be obtained using MedgeGetResult() with M_NUMBER_OF_CHAINED_EDGELS.

Returns the edgels' Y-coordinates.

Collapse M_CHAIN_ANGLE +

Retrieves the angle values of the edge(s)'s edgels.

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).

(summarize)
Collapse M_CHAIN_CODE +

Retrieves the edge(s)'s chain code. The chain code describes how edgels are connected using the following neighbor code:

(summarize)
Collapse M_CHAIN_INDEX +

Retrieves the index of each edgel's edge.

(summarize)
Collapse M_CHAIN_MAGNITUDE +

Retrieves the magnitude values of the edge(s)'s edgels.

(summarize)
Collapse M_CHAIN_MAGNITUDE + M_CHAIN_ANGLE +

Retrieves the magnitude values and the angle values of the edge(s)'s edgels.

Angles are returned, counter-clockwise, from 0 degrees to 360 degrees and mapped in the range of 0 to 255 (that is, an 8-bit range).

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: the number of chained edgels in the edge. This number can be obtained using MedgeGetResult() with M_NUMBER_OF_CHAINED_EDGELS.

Returns the magnitude values of the edge(s)'s edgels.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: the number of chained edgels in the edge. This number can be obtained using MedgeGetResult() with M_NUMBER_OF_CHAINED_EDGELS.

Returns the angle values of the edge(s)'s edgels.

Collapse M_CHAIN_X +

Retrieves the X-coordinates of the edge(s)'s edgels.

(summarize)
Collapse M_CHAIN_Y +

Retrieves the Y-coordinates of the edge(s)'s edgels.

(summarize)
Collapse M_NUMBER_OF_CHAINED_EDGELS +

Retrieves the number of edgels in the edge(s).

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: This array must be of size 1.

Collapse M_NUMBER_OF_CHAINS +

Retrieves the number of included edges.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: This array must be of size 1.

Collapse M_NUMBER_OF_VERTICES +

Retrieves the number of vertices in the chain approximation.

This result is not valid if MedgeControl() with M_CHAIN_APPROXIMATION is disabled.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: This array must be of size 1.

Collapse M_VERTICES +

Retrieves the coordinates of the vertices in the chain approximation.

This result is not valid if MedgeControl() with M_CHAIN_APPROXIMATION is disabled.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: Use M_NUMBER_OF_VERTICES to determine the size of the array.

Returns the X-coordinates of the vertices in the chain approximation.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: Use M_NUMBER_OF_VERTICES to determine the size of the array.

Returns the Y-coordinates of the vertices in the chain approximation.

Collapse M_VERTICES_CHAIN_INDEX +

Retrieves the index of the vertices' corresponding edge, in a chain approximation.

This result is not valid if MedgeControl() with M_CHAIN_APPROXIMATION is disabled.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: Use M_NUMBER_OF_VERTICES to determine the size of the array.

Collapse M_VERTICES_INDEX +

Retrieves the index of the vertices' corresponding edgels, in a chain approximation.

This result is not valid if MedgeControl() with M_CHAIN_APPROXIMATION is disabled.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: Use M_NUMBER_OF_VERTICES to determine the size of the array.

Collapse M_VERTICES_X +

Retrieves the X-coordinates of the vertices in the chain approximation.

This result is not valid if MedgeControl() with M_CHAIN_APPROXIMATION is disabled.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: Use M_NUMBER_OF_VERTICES to determine the size of the array.

Collapse M_VERTICES_Y +

Retrieves the Y-coordinates of the vertices in the chain approximation.

This result is not valid if MedgeControl() with M_CHAIN_APPROXIMATION is disabled.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: Use M_NUMBER_OF_VERTICES to determine the size of the array.

To retrieve edge feature results, the ResultType parameter must be set to one of the values below. Note that the specified feature must have already been calculated with MedgeCalculate().

If EdgeIndexOrLabelValue is set to an index value or a label value, the edge feature for the specified edge is returned. If EdgeIndexOrLabelValue is set to M_ALL, the edge feature for all the included edges in the Edge Finder result buffer is returned.

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 M_NUMBER_OF_CHAINS. In addition, you must pass the SecondResultArrayPtr parameter M_NULL.

function map For retrieving edge feature results
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_AVERAGE_STRENGTH +

Retrieves the average strength value of each edge.

(summarize)
Collapse M_BOX_X_MAX +

Retrieves the X-coordinate of each edge's extreme right edgel.

(summarize)
Collapse M_BOX_X_MIN +

Retrieves the X-coordinate of each edge's extreme left edgel.

(summarize)
Collapse M_BOX_Y_MAX +

Retrieves the Y-coordinate of each edge's extreme bottom edgel.

(summarize)
Collapse M_BOX_Y_MIN +

Retrieves the Y-coordinate of each edge's extreme top edgel.

(summarize)
Collapse M_CENTER_OF_GRAVITY +

Retrieves the coordinates of each edge's center of gravity.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: the number of edges. This number can be obtained using MedgeGetResult() with M_NUMBER_OF_CHAINS.

Returns the X-coordinate of each edge's center of gravity.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: the number of edges. This number can be obtained using MedgeGetResult() with M_NUMBER_OF_CHAINS.

Returns the Y-coordinate of each edge's center of gravity.

Collapse M_CENTER_OF_GRAVITY_X +

Retrieves the X-coordinate of each edge's center of gravity.

(summarize)
Collapse M_CENTER_OF_GRAVITY_Y +

Retrieves the Y-coordinate of each edge's center of gravity.

(summarize)
Collapse M_CIRCLE_FIT_CENTER_X +

Retrieves the X-coordinate of the center of the circle that is the best fit for each edge.

(summarize)
Collapse M_CIRCLE_FIT_CENTER_Y +

Retrieves the Y-coordinate of the center of the circle that is the best fit for each edge.

(summarize)
Collapse M_CIRCLE_FIT_COVERAGE +

Retrieves the coverage of the circle that is the best fit for each edge. The coverage describes the portion of the circle covered by the edge.

(summarize)
Collapse FirstResultArrayPtr

Returns the following.

(summarize)
Collapse 0.0 <= Value <= 1.0

Specifies the amount of coverage of the circle. The lower the value, the lower the coverage. For example, 0 equals no coverage, 0.5 equals 50 percent coverage, and 1.0 equals 100 percent coverage.

(summarize)
Collapse M_CIRCLE_FIT_ERROR +

Retrieves the fit error of the circle that is the best fit for each edge. This is calculated as the average quadratic error.

(summarize)
Collapse M_CIRCLE_FIT_RADIUS +

Retrieves the radius of the circle that is the best fit for each edge.

(summarize)
Collapse M_CLOSURE +

Retrieves the closure status of each edge.

(summarize)
Collapse FirstResultArrayPtr

Returns one of the following.

(summarize)
Collapse M_FALSE

Specifies an open edge.

Collapse M_TRUE

Specifies a closed edge.

Collapse M_CONVEX_PERIMETER +

Retrieves the convex elongation of each edge.

(summarize)
Collapse M_ELLIPSE_FIT_ANGLE +

Retrieves the angle, in degrees, of the ellipse that is the best fit for each edge, relative to the output coordinate system specified using MedgeControl() 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 25: Calibrating your camera setup.

(summarize)
Collapse M_ELLIPSE_FIT_CENTER_X +

Retrieves the X-coordinate of the center of the ellipse that is the best fit for each edge.

(summarize)
Collapse M_ELLIPSE_FIT_CENTER_Y +

Retrieves the Y-coordinate of the center of the ellipse that is the best fit for each edge.

(summarize)
Collapse M_ELLIPSE_FIT_COVERAGE +

Retrieves the coverage of the ellipse that is the best fit for each edge. The coverage describes the portion of the ellipse covered by the edge.

(summarize)
Collapse FirstResultArrayPtr

Returns the following.

(summarize)
Collapse 0.0 <= Value <= 1.0

Specifies the amount of coverage of the ellipse. The lower the value, the lower the coverage. For example, 0.0 equals no coverage, 0.5 equals 50 percent coverage, and 1.0 equals 100 percent coverage.

(summarize)
Collapse M_ELLIPSE_FIT_ERROR +

Retrieves the fit error of the ellipse that is the best fit for each edge.

(summarize)
Collapse M_ELLIPSE_FIT_MAJOR_AXIS +

Retrieves the major axis of the ellipse that is the best fit for each edge. The major axis divides the ellipse across its long dimension into two equal halves.

(summarize)
Collapse M_ELLIPSE_FIT_MINOR_AXIS +

Retrieves the minor axis of the ellipse that is the best fit for each edge. The minor axis divides the ellipse across its short dimension into two equal halves, perpendicular to the major axis.

(summarize)
Collapse M_FAST_LENGTH +

Retrieves the fast length of each edge.

(summarize)
Collapse M_FERET_BOX +

Retrieves the X- and Y-Feret values of each edge. The X-Feret is the dimension of the minimum bounding box of an edge in the horizontal direction. The Y-Feret is the dimension of the minimum bounding box of an edge in the vertical direction.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: the number of edges. This number can be obtained using MedgeGetResult() with M_NUMBER_OF_CHAINS.

Returns the X-Feret value of each edge.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: the number of edges. This number can be obtained using MedgeGetResult() with M_NUMBER_OF_CHAINS.

Returns the Y-Feret value of each edge.

Collapse M_FERET_ELONGATION +

Retrieves the Feret elongation of each edge. It is accurate for reasonably compact objects, but becomes less accurate for very elongated objects.

(summarize)
Collapse M_FERET_MAX_ANGLE +

Retrieves the angle, in degrees, at which the maximum Feret diameter is found, relative to the output coordinate system specified using MedgeControl() 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 25: Calibrating your camera setup.

(summarize)
Collapse M_FERET_MAX_DIAMETER +

Retrieves the maximum Feret diameter of each edge.

(summarize)
Collapse M_FERET_MEAN_DIAMETER +

Retrieves the average Feret diameter at all the angles checked (see M_NUMBER_OF_FERETS).

(summarize)
Collapse M_FERET_MIN_ANGLE +

Retrieves the angle, in degrees, at which the minimum Feret diameter is found, relative to the output coordinate system specified using MedgeControl() 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 25: Calibrating your camera setup.

(summarize)
Collapse M_FERET_MIN_DIAMETER +

Retrieves the minimum Feret diameter of each edge.

(summarize)
Collapse M_FERET_X +

Retrieves the X-Feret value of each edge. This is the dimension of the minimum bounding box of an edge in the horizontal direction.

(summarize)
Collapse M_FERET_Y +

Retrieves the Y-Feret value of each edge. This is the dimension of the minimum bounding box of an edge in the vertical direction.

(summarize)
Collapse M_FIRST_POINT +

Retrieves the coordinates of each edge's first point.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: the number of edges. This number can be obtained using MedgeGetResult() with M_NUMBER_OF_CHAINS.

Returns the first point X-coordinate of each edge.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: the number of edges. This number can be obtained using MedgeGetResult() with M_NUMBER_OF_CHAINS.

Returns the first point Y-coordinate of each edge.

Collapse M_FIRST_POINT_X +

Retrieves the X-coordinate of each edge's first point.

(summarize)
Collapse M_FIRST_POINT_Y +

Retrieves the Y-coordinate of each edge's first point.

(summarize)
Collapse M_GENERAL_FERET +

Retrieves the general Feret of each edge. This is the Feret diameter calculated at M_GENERAL_FERET_ANGLE, which is set in MedgeControl().

(summarize)
Collapse M_LABEL_VALUE +

Retrieves the label value of each edge in an image. The label value is a positive integer greater or equal to one; each edge in an image has a unique label value.

(summarize)
Collapse M_LENGTH +

Retrieves the length of each edge. M_LENGTH gives a more accurate but slower approximation of the edge's length than M_FAST_LENGTH.

(summarize)
Collapse M_LINE_FIT_A +

Retrieves the A variable of the line that is the best fit for each edge.

(summarize)
Collapse M_LINE_FIT_B +

Retrieves the B variable of the line that is the best fit for each edge.

(summarize)
Collapse M_LINE_FIT_C +

Retrieves the C variable of the line that is the best fit for each edge.

(summarize)
Collapse M_LINE_FIT_ERROR +

Retrieves the fit error of the line that is the best fit for each edge. This is calculated as the average quadratic error.

(summarize)
Collapse M_MOMENT_ELONGATION +

Retrieves the moment elongation of each edge.

(summarize)
Collapse FirstResultArrayPtr

Returns the following.

(summarize)
Collapse 0.0 <= Value <= 1.0

Specifies the moment elongation of each edge. Values closer to 1.0 are considered to have a low elongation, while values closer to 0.0 are considered to have a high elongation. For example, a straight edge has a null elongation value, while a circular edge has an elongation of 1.0.

(summarize)
Collapse M_MOMENT_ELONGATION_ANGLE +

Retrieves the angle, in degrees, of the principal axis along each edge's moment elongation, relative to the output coordinate system specified using MedgeControl() 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 25: Calibrating your camera setup.

(summarize)
Collapse M_POSITION +

Retrieves the X- and Y-position of each edge. The position of the edge is defined by the middle edgel of the edge.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: the number of edges. This number can be obtained using MedgeGetResult() with M_NUMBER_OF_CHAINS.

Returns the X-position of each edge.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: the number of edges. This number can be obtained using MedgeGetResult() with M_NUMBER_OF_CHAINS.

Returns the Y-position of each edge.

Collapse M_POSITION_X +

Retrieves the X-position of each edge. The position of the edge is defined by the middle edgel of the edge.

(summarize)
Collapse M_POSITION_Y +

Retrieves the Y-position of each edge. The position of the edge is defined by the middle edgel of the edge.

(summarize)
Collapse M_SIZE +

Retrieves the number of edgels in each edge.

(summarize)
Collapse M_STRENGTH +

Retrieves the strength value of each edge.

(summarize)
Collapse M_TORTUOSITY +

Retrieves the tortuosity measure of each edge.

(summarize)
Collapse M_X_MAX_AT_Y_MAX +

Retrieves the maximum X-coordinate at the maximum Y-coordinate of each edge. Together with M_BOX_Y_MAX, this is one of four contact points on the convex perimeter of the edge.

(summarize)
Collapse M_X_MIN_AT_Y_MIN +

Retrieves the minimum X-coordinate at the minimum Y-coordinate of each edge. Together with M_BOX_Y_MIN, this is one of four contact points on the convex perimeter of the edge.

(summarize)
Collapse M_Y_MAX_AT_X_MIN +

Retrieves the maximum Y-coordinate at the minimum X-coordinate of each edge. Together with M_BOX_X_MIN, this is one of four contact points on the convex perimeter of the edge.

(summarize)
Collapse M_Y_MIN_AT_X_MAX +

Retrieves the minimum Y-coordinate at the maximum X-coordinate of each edge. Together with M_BOX_X_MAX, this is one of four contact points on the convex perimeter of the edge.

(summarize)

You can add one of the following values to the above-mentioned values to get the indices of the edgels from which the specified Feret was calculated.

function map For M_FERET_MAX_DIAMETER, M_FERET_MIN_DIAMETER, or M_GENERAL_FERET
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_FIRST_FERET_INDEX

Retrieves the index of the first edgel from which the specified Feret was calculated.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: Use M_NUMBER_OF_CHAINS to determine the size of the array.

Returns the index of the first edgel.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_FIRST_FERET_INDEX + M_SECOND_FERET_INDEX +

Retrieves the indices of the first and second edgel from which the specified Feret was calculated.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: Use M_NUMBER_OF_CHAINS to determine the size of the array.

Returns the index of the first edgel.

Collapse SecondResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: Use M_NUMBER_OF_CHAINS to determine the size of the array.

Returns the index of the second edgel.

Collapse M_SECOND_FERET_INDEX

Retrieves the index of the second edgel from which the specified Feret was calculated.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: Use M_NUMBER_OF_CHAINS to determine the size of the array.

Returns the index of the second edgel.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

You can add the following value to the above-mentioned values to get the results in a packed format.

If you pack values, result types that return values in both FirstResultArrayPtr and SecondResultArrayPtr will be returned together, interlaced in FirstResultArrayPtr. For example, if you decide to pack MedgeGetResult() with M_CENTER_OF_GRAVITY, FirstResultArrayPtr will contain both the X- and Y-coordinates of the edge's center of gravity (XY XY XY...).

function map For packing values
CollapseCombination value Description
Collapse M_PACKED

Retrieves the specified values in a packed format. Note that only result types that return values in both FirstResultArrayPtr and SecondResultArrayPtr can be packed.

(summarize)
Combination constants for the values listed in For retrieving edge feature results.

You can add one of the following values to the above-mentioned values to get statistical result information.

Note that results are only returned to FirstResultArrayPtr; therefore, SecondResultArrayPtr must be set to M_NULL.

function map For retrieving statistics about results
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_MAX

Retrieves the maximum value of the requested result type.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: This array must be of size 1.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_MAX_ABS

Retrieves the maximum absolute value of the requested result type.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: This array must be of size 1.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_MEAN

Retrieves the mean value of the requested result type.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: This array must be of size 1.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_MIN

Retrieves the minimum value of the requested result type.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: This array must be of size 1.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_MIN_ABS

Retrieves the minimum absolute value of the requested result type.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: This array must be of size 1.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Collapse M_STANDARD_DEVIATION

Retrieves the standard deviation of the requested result type.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: array of type MIL_DOUBLE
Array size: This array must be of size 1.

Collapse SecondResultArrayPtr
Data type info

Data type: M_NULL

Combination constant for the values listed in For retrieving edge feature results.

You can add the following value to the above-mentioned values to determine if the edge feature result is available in the result buffer.

function map For determining whether edge feature results are available
CollapseResultType Description
FirstResultArrayPtr
- Possible values returned
SecondResultArrayPtr
- Possible values returned
Collapse M_AVAILABLE

Retrieves whether an edge feature result is available to be retrieved.

(summarize)
Collapse FirstResultArrayPtr
Data type info

Data type: MIL_DOUBLE

Returns one of the following.

(summarize)
Collapse M_NULL

Specifies that the result is not available to be retrieved.

Collapse Value != 0

Specifies that the result is available to be retrieved.

You can add one of the following values to the above-mentioned values to cast the requested results to a 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: Array size depends on the result being cast.
    Note: When multiple results.

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

Collapse M_TYPE_MIL_ID

Casts the requested results to a MIL_ID.

(summarize)
Collapse FirstResultArrayPtr and SecondResultArrayPtr
Data type info
  • Data type: array of type MIL_ID
    Array size: Array size depends on the result being cast.
    Note: When multiple results.

  • Data type: MIL_ID
    Note: When a single result.

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: Array size depends on the result being cast.
    Note: When multiple results.

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

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: Array size depends on the result being cast.
    Note: When multiple results.

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

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: Array size depends on the result being cast.
    Note: When multiple results.

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

Compilation information
Header Include mil.h.
Library Use mil.lib; miledge.lib.
DLL Requires mil.dll; miledge.dll.
DEFAULT ALL TYPE INDEX TYPE LABEL CONTEXT TYPE CONTOUR CREST SIZE X SIZE Y THRESHOLD HIGH THRESHOLD LOW THRESHOLDS TIMEOUT END FALSE TRUE ANGLE ID CROSS DERIVATIVE ID FIRST DERIVATIVE X ID FIRST DERIVATIVE Y ID FIRST DERIVATIVES ID IMAGE ID MAGNITUDE ID MASK ID SECOND DERIVATIVE X ID SECOND DERIVATIVE Y ID SECOND DERIVATIVES ID SIGN SIGNED UNSIGNED SIZE BAND SIZE BIT TYPE FLOAT 32 SIGNED 8 SIGNED 16 SIGNED 32 UNSIGNED 1 UNSIGNED 8 UNSIGNED 16 UNSIGNED 32 CHAIN CHAIN ANGLE CHAIN CODE CHAIN INDEX CHAIN MAGNITUDE CHAIN MAGNITUDE M CHAIN ANGLE CHAIN X CHAIN Y NUMBER OF CHAINED EDGELS NUMBER OF CHAINS NUMBER OF VERTICES VERTICES VERTICES CHAIN INDEX VERTICES INDEX VERTICES X VERTICES Y AVERAGE STRENGTH BOX X MAX BOX X MIN BOX Y MAX BOX Y MIN CENTER OF GRAVITY CENTER OF GRAVITY X CENTER OF GRAVITY Y CIRCLE FIT CENTER X CIRCLE FIT CENTER Y CIRCLE FIT COVERAGE CIRCLE FIT ERROR CIRCLE FIT RADIUS CLOSURE FALSE TRUE CONVEX PERIMETER ELLIPSE FIT ANGLE ELLIPSE FIT CENTER X ELLIPSE FIT CENTER Y ELLIPSE FIT COVERAGE ELLIPSE FIT ERROR ELLIPSE FIT MAJOR AXIS ELLIPSE FIT MINOR AXIS FAST LENGTH FERET BOX FERET ELONGATION FERET MAX ANGLE FERET MAX DIAMETER FERET MEAN DIAMETER FERET MIN ANGLE FERET MIN DIAMETER FERET X FERET Y FIRST POINT FIRST POINT X FIRST POINT Y GENERAL FERET LABEL VALUE LENGTH LINE FIT A LINE FIT B LINE FIT C LINE FIT ERROR MOMENT ELONGATION MOMENT ELONGATION ANGLE POSITION POSITION X POSITION Y SIZE STRENGTH TORTUOSITY X MAX AT Y MAX X MIN AT Y MIN Y MAX AT X MIN Y MIN AT X MAX FIRST FERET INDEX FIRST FERET INDEX M SECOND FERET INDEX SECOND FERET INDEX PACKED MAX MAX ABS MEAN MIN MIN ABS STANDARD DEVIATION AVAILABLE NULL TYPE MIL DOUBLE TYPE MIL ID TYPE MIL INT TYPE MIL INT32 TYPE MIL INT64