| MIL 10 Reference
| Customize Help
| Save Settings

MimGetResult1d



See also
Availability
Available in MIL-Lite with restrictions (see remarks)
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 number of result entries from an image processing result buffer.
Syntax
void MimGetResult1d(
MIL_ID ResultImId, //in
MIL_INT OffEntry, //in
MIL_INT NbEntries, //in
MIL_INT64 ResultType, //in
void *UserArrayPtr //out
)
Description

This function retrieves the specified number of result entries from the specified result buffer and stores them in the specified one-dimensional destination user array.

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, but you want to retrieve positional and dimensional results in pixel units, use MimControl() 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, MimGetResult1d() will generate an error.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
ResultImId

Specifies the identifier of the image processing result buffer from which to get results.

OffEntry

Specifies the offset of the first result to read. The given value must be within the number of allocated result entries.

NbEntries

Specifies the number of result entries to get, starting from the entry specified by the OffEntry parameter.

ResultType

Specifies the type of result(s) to retrieve.

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

UserArrayPtr
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_FLOAT
  • array of type MIL_INT
  • array of type MIL_INT32
  • array of type MIL_INT64
  • MIL_DOUBLE
  • MIL_FLOAT
  • MIL_INT
  • MIL_INT32
  • MIL_INT64

Specifies the address of the one-dimensional array in which to write the results read from the MIL result buffer.

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

The table below lists possible values for the ResultType parameter and possible values returned to the UserArrayPtr parameter.

Unless otherwise specified, the following values require that you pass the UserArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to 1.

function map For specifying the type of result to retrieve
CollapseResultType Description
UserArrayPtr
- Possible values returned
Collapse M_ANGLE +

Retrieves the best orientations (angle values) calculated by MimFindOrientation() and stored in an M_FIND_ORIENTATION_LIST result buffer. MIL sorts the resulting angles according to their associated score (M_SCORE); angles with higher scores are listed first.

(summarize)
Collapse UserArrayPtr data type info

Data type: array of type MIL_INT
Array size: the same number of elements as the number of entries to obtain (set with MimAllocResult()).

Collapse M_ANGULAR_DATA_COHERENCE +

Retrieves the coherence, from an M_STAT_LIST result buffer, of pixels representing angles and as such, treated as unit vectors. Coherence represents the directional trend of a group of vectors and is a measure of how parallel or coherent these vectors are with respect to each other.

(summarize)
Collapse M_ANGULAR_DATA_MEAN +

Retrieves the angle of the vector sum, from an M_STAT_LIST result buffer, of pixels representing angles, and as such, treated as unit vectors. The angular component of a vector sum, calculated from the vector addition of unit vectors, is a representation of the average or mean angle of the unit vectors.

(summarize)
Collapse M_CUMULATIVE_VALUE +

Retrieves the cumulative histogram values from an M_HIST_LIST result buffer.

(summarize)
Collapse UserArrayPtr data type info

Data type: array of type MIL_INT
Array size: the same number of elements as the number of entries to obtain (MimAllocResult())

Collapse M_MAX +

Retrieves the maximum pixel value from an M_STAT_LIST result buffer.

(summarize)
Collapse M_MAX_ABS +

Retrieves the maximum absolute pixel value from an M_STAT_LIST result buffer.

(summarize)
Collapse M_MEAN +

Retrieves the mean pixel value from an M_STAT_LIST result buffer.

(summarize)
Collapse M_MIN +

Retrieves the minimum pixel value from an M_STAT_LIST result buffer.

(summarize)
Collapse M_MIN_ABS +

Retrieves the minimum absolute pixel value from an M_STAT_LIST result buffer.

(summarize)
Collapse M_NB_EVENT +

Retrieves the number of events from an M_EVENT_LIST result buffer. Note that if the result buffer did not have the required number of entries to hold the total number of events that satisfied the condition, the number returned is limited to the number of entries in the result buffer.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_INT
    Array size: only one element is required
    Note: use if M_FLOAT was not added to the ResultType parameter of MimAllocResult() during result buffer allocation.

  • Data type: array of type MIL_FLOAT
    Array size: only one element is required
    Note: use if M_FLOAT was added to the ResultType parameter of MimAllocResult() during result buffer allocation.

Collapse M_NUMBER +

Retrieves the number of pixels from an M_STAT_LIST result buffer.

(summarize)
Collapse M_PERCENTILE_VALUE +

Retrieves the inverse cumulative histogram from a M_HIST_LIST result buffer. Each value retrieved is the pixel value whereby n % of the pixels have a value less than or equal to that value, where n is the index of the user array.

(summarize)
Collapse UserArrayPtr data type info

Data type: array of type MIL_INT
Array size: the array must be at least M_PERCENTILE_VALUE_RESULT_SIZE (101) characters in size.

Collapse M_POSITION_X +

Retrieves the image X-coordinate of each event from an M_EVENT_LIST result buffer.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_INT
    Array size: the same number of elements as number of entries to obtain
    Note: use if M_FLOAT was not added to the ResultType parameter of MimAllocResult() during result buffer allocation.

  • Data type: array of type MIL_FLOAT
    Array size: the same number of elements as number of entries to obtain
    Note: use if M_FLOAT was added to the ResultType parameter of MimAllocResult() during result buffer allocation.

Collapse M_POSITION_Y +

Retrieves the image Y-coordinate of each event from an M_EVENT_LIST result buffer.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_INT
    Array size: the same number of elements as number of entries to obtain
    Note: use if M_FLOAT was not added to the ResultType parameter of MimAllocResult() during result buffer allocation.

  • Data type: array of type MIL_FLOAT
    Array size: the same number of elements as number of entries to obtain
    Note: use if M_FLOAT was added to the ResultType parameter of MimAllocResult() during result buffer allocation.

Collapse M_SCORE +

Retrieves the score attributed to each orientation (angle) value calculated by MimFindOrientation() and stored in an M_FIND_ORIENTATION_LIST result buffer. The scores are represented as percentages relative to the other orientations stored in the result buffer. MIL lists higher scores first.

The first orientation in the buffer will always be the most dominant orientation with a score of 100.

(summarize)
Collapse UserArrayPtr data type info

Data type: array of type MIL_INT
Array size: the same number of elements as the number of entries to obtain (set with MimAllocResult()).

Collapse M_STANDARD_DEVIATION +

Retrieves the pixel standard deviation value from an M_STAT_LIST result buffer.

(summarize)
Collapse M_SUM +

Retrieves the sum of the pixel values from an M_STAT_LIST result buffer.

(summarize)
Collapse M_SUM_ABS +

Retrieves the sum of the absolute pixel values from an M_STAT_LIST result buffer.

(summarize)
Collapse M_SUM_OF_SQUARES +

Retrieves the sum of the squared pixel values from an M_STAT_LIST result buffer.

(summarize)
Collapse M_VALUE +

Retrieves values from an M_HIST_LIST, M_PROJ_LIST, M_EXTREME_LIST, M_EVENT_LIST, or M_COUNT_LIST result buffer.

If an M_EXTREME_LIST type result buffer contains both the minimum and maximum value of an image, the minimum is written first, followed by the maximum.

(summarize)
Collapse UserArrayPtr data type info
Combination constant for M_CUMULATIVE_VALUE; M_VALUE.

You can add the following value to the above-mentioned values to get the requested results as a percentage.

function map For retrieving results as a percentage
CollapseResultType Description
UserArrayPtr
- Possible values returned
Collapse M_PERCENTAGE

Retrieves the histogram values or cumulative histogram values, as a percentage. The values are multiplied by 100 and then divided by the total number of elements in the histogram.

(summarize)
Collapse UserArrayPtr data type info

Data type: array of type MIL_INT
Array size: the same number of elements as the number of entries to obtain (MimAllocResult())

Combination constants for the values listed in For specifying the type of result to retrieve.

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 the ResultType parameter to cast the required results to the requested data type
CollapseResultType Description
UserArrayPtr
- Possible values returned
Collapse M_TYPE_MIL_DOUBLE

Casts the requested results to a MIL_DOUBLE.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_DOUBLE
    Array size: depends on the ResultType parameter, see above
    Note: When multiple results.

  • Data type: MIL_DOUBLE
    Note: When a single result, see above.

Collapse M_TYPE_MIL_FLOAT

Casts the requested results to a MIL_FLOAT.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_FLOAT
    Array size: depends on the ResultType parameter, see above
    Note: When multiple results.

  • Data type: MIL_FLOAT
    Note: When a single result, see above.

Collapse M_TYPE_MIL_INT

Casts the requested results to a MIL_INT.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_INT
    Array size: depends on the ResultType parameter, see above
    Note: When multiple results.

  • Data type: MIL_INT
    Note: When a single result, see above.

Collapse M_TYPE_MIL_INT32

Casts the requested results to a MIL_INT32.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_INT32
    Array size: depends on the ResultType parameter, see above
    Note: When multiple results.

  • Data type: MIL_INT32
    Note: When a single result, see above.

Collapse M_TYPE_MIL_INT64

Casts the requested results to a MIL_INT64.

(summarize)
Collapse UserArrayPtr data type info
  • Data type: array of type MIL_INT64
    Array size: depends on the ResultType parameter, see above
    Note: When multiple results.

  • Data type: MIL_INT64
    Note: When a single result, see above.

Remark
  • [MIL-Lite]
    Note that some of the values listed above are not available in MIL-Lite. See the result's corresponding operation function for MIL-Lite availability.
Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
ANGLE ANGULAR DATA COHERENCE ANGULAR DATA MEAN CUMULATIVE VALUE MAX MAX ABS MEAN MIN MIN ABS NB EVENT NUMBER PERCENTILE VALUE POSITION X POSITION Y SCORE STANDARD DEVIATION SUM SUM ABS SUM OF SQUARES VALUE PERCENTAGE TYPE MIL DOUBLE TYPE MIL FLOAT TYPE MIL INT TYPE MIL INT32 TYPE MIL INT64