| MIL 10 Reference
| Customize Help
| Save Settings

MimGetResult



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 type of result(s) from an image processing result buffer.
Syntax
void MimGetResult(
MIL_ID ResultImId, //in
MIL_INT64 ResultType, //in
void *UserArrayPtr //out
)
Description

This function retrieves all the results of the specified type from the specified result buffer and stores them in the specified one-dimensional destination user array. Results are only available after calling MimCountDifference(), MimFindExtreme(), MimHistogram(), MimLocateEvent(), MimProject(), MimStat(), or MimWaveletTransform().

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, MimGetResult() 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 retrieve results.

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 a result buffer
CollapseResultType Description
UserArrayPtr
- Possible values returned
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_HIST_REAL_SIZE +

Retrieves the number of values (entries) used by the histogram, from an M_HIST_LIST result buffer.

(summarize)
Collapse UserArrayPtr data type info

Data type: array of type MIL_INT
Array size: 1

Collapse M_HIST_VALUE_OFFSET +

Retrieves the intensity value in the source that corresponds to the first bin (entry 0) in the histogram, from an M_HIST_LIST result buffer. This result depends on the specified histogram mode, set using MimControl() with M_HIST_BIN_SIZE_MODE. This result returns an error if you set the mode to M_REGULAR.

(summarize)
Collapse UserArrayPtr data type info

Data type: array of type MIL_INT
Array size: 1

Collapse M_HIST_VALUE_RANGE +

Retrieves the number of intensity values in the source that were used to generate the histogram, from an M_HIST_LIST result buffer. This result depends on the specified histogram mode, set using MimControl() with M_HIST_BIN_SIZE_MODE. This result returns an error if you set the mode to M_REGULAR.

(summarize)
Collapse UserArrayPtr data type info

Data type: array of type MIL_INT
Array size: 1

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 or the number of images, depending on the type of result buffer.

For an M_STAT_LIST result buffer, M_NUMBER retrieves the number of pixels that satisfied the condition specified when calling MimStat().

For an M_STAT_MULTIPLE_RESULT result buffer, M_NUMBER retrieves the number of images used to calculate the current result. This does not include images that have previously been removed from the calculation.

(summarize)
Collapse M_NUMBER_OF_LEVELS +

Retrieves the total number of transformation levels calculated by the wavelet transformation, from an M_WAVELET_TRANSFORM_RESULT result buffer.

(summarize)
Collapse M_ORIGINAL_IMAGE_SIZE_X +

Retrieves the unaltered width of the image used by the wavelet transformation, from an M_WAVELET_TRANSFORM_RESULT result buffer.

(summarize)
Collapse M_ORIGINAL_IMAGE_SIZE_Y +

Retrieves the unaltered height of the image used by the wavelet transformation, from an M_WAVELET_TRANSFORM_RESULT result buffer.

(summarize)
Collapse M_PERCENTILE_VALUE +

Retrieves the inverse cumulative histogram from an 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 pixel 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
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
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_TOTAL_NUMBER +

Retrieves the total number of images that have ever been used to calculate the results in an M_STAT_MULTIPLE_RESULT result buffer. This number is the sum of M_NUMBER and all the images that have previously been removed from the calculation using MimStatMultiple() with M_REMOVE.

(summarize)
Collapse M_TRANSFORMATION_DOMAIN +

Retrieves whether the mathematical domain of the resulting wavelet transformation values consist of complex numbers or only real numbers, from an M_WAVELET_TRANSFORM_RESULT result buffer. Complex numbers have an imaginary part (imaginary numbers), in addition to a real part (real numbers).

(summarize)
Collapse M_COMPLEX

Specifies that the mathematical domain of the values consist of real and imaginary numbers. Such transformations come from using a complex type of wavelet filter (MimControl() with M_WAVELET_TYPE), or a custom wavelet filter containing real and imaginary numbers (MimWaveletSetFilter()).

(summarize)
Collapse M_REAL

Specifies that the mathematical domain of the values consist of only real numbers. Such transformations come from using a non-complex type of wavelet filter (MimControl() with M_WAVELET_TYPE), or a custom wavelet filter containing real numbers only (MimWaveletSetFilter()).

(summarize)
Collapse M_TRANSFORMATION_MODE +

Retrieves the wavelet transformation mode, from an M_WAVELET_TRANSFORM_RESULT result buffer.

(summarize)
Collapse M_DEFAULT

Same as M_DYADIC.

Collapse M_DYADIC

Specifies a dyadic wavelet transformation. INFO

Collapse M_UNDECIMATED +

Specifies an undecimated wavelet transformation. INFO

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
Collapse M_WAVELET_DRAW_SIZE_X +

Retrieves the width required to draw, for every level calculated, all wavelet coefficient results (diagonal, horizontal, vertical, and the approximation), from an M_WAVELET_TRANSFORM_RESULT result buffer. You can perform the related drawing operation using MimDraw() with M_DRAW_WAVELET.

(summarize)
Collapse M_WAVELET_DRAW_SIZE_X_WITH_PADDING +

Retrieves the width required to draw, for every level calculated, all wavelet coefficient results (diagonal, horizontal, vertical, and the approximation), from an M_WAVELET_TRANSFORM_RESULT result buffer. You can perform the related drawing operation using MimDraw() with M_DRAW_WAVELET_WITH_PADDING.

(summarize)
Collapse M_WAVELET_DRAW_SIZE_Y +

Retrieves the height required to draw, for every level calculated, all wavelet coefficient results (diagonal, horizontal, vertical, and the approximation), from an M_WAVELET_TRANSFORM_RESULT result buffer. You can perform the related drawing operation using MimDraw() with M_DRAW_WAVELET.

(summarize)
Collapse M_WAVELET_DRAW_SIZE_Y_WITH_PADDING +

Retrieves the height required to draw, for every level calculated, all wavelet coefficient results (diagonal, horizontal, vertical, and the approximation), from an M_WAVELET_TRANSFORM_RESULT result buffer. You can perform the related drawing operation using MimDraw() with M_DRAW_WAVELET_WITH_PADDING.

(summarize)
Collapse M_WAVELET_SIZE +

Retrieves the size of the wavelet transformation, from an M_WAVELET_TRANSFORM_RESULT result buffer.

(summarize)
Collapse M_WAVELET_TYPE +

Retrieves the type of the wavelet transformation, from an M_WAVELET_TRANSFORM_RESULT result buffer.

(summarize)
Collapse M_DEFAULT

Same as M_HAAR.

Collapse M_CUSTOM

Specifies a custom wavelet processing.

Collapse M_DAUBECHIES_1

Specifies a Daubechies wavelet filter that uses 1 vanishing moment and real coefficients.

Collapse M_DAUBECHIES_2

Specifies a Daubechies wavelet filter that uses 2 vanishing moments and real coefficients.

Collapse M_DAUBECHIES_3

Specifies a Daubechies wavelet filter that uses 3 vanishing moments and real coefficients.

Collapse M_DAUBECHIES_3_COMPLEX

Specifies a Daubechies wavelet filter that uses 3 vanishing moments and complex coefficients.

Collapse M_DAUBECHIES_4

Specifies a Daubechies wavelet filter that uses 4 vanishing moments and real coefficients.

Collapse M_DAUBECHIES_5

Specifies a Daubechies wavelet filter that uses 5 vanishing moments and real coefficients.

Collapse M_DAUBECHIES_5_COMPLEX

Specifies a Daubechies wavelet filter that uses 5 vanishing moments and complex coefficients.

Collapse M_DAUBECHIES_6

Specifies a Daubechies wavelet filter that uses 6 vanishing moments and real coefficients.

Collapse M_DAUBECHIES_7

Specifies a Daubechies wavelet filter that uses 7 vanishing moments and real coefficients.

Collapse M_DAUBECHIES_7_COMPLEX

Specifies a Daubechies wavelet filter that uses 7 vanishing moments and complex coefficients.

Collapse M_DAUBECHIES_8

Specifies a Daubechies wavelet filter that uses 8 vanishing moments and real coefficients.

Collapse M_HAAR

Specifies a Haar wavelet filter. INFO

Collapse M_SYMLET_1

Specifies a Symlet wavelet filter that uses 1 vanishing moment and real coefficients.

Collapse M_SYMLET_2

Specifies a Symlet wavelet filter that uses 2 vanishing moments and real coefficients.

Collapse M_SYMLET_3

Specifies a Symlet wavelet filter that uses 3 vanishing moments and real coefficients.

Collapse M_SYMLET_4

Specifies a Symlet wavelet filter that uses 4 vanishing moments and real coefficients.

Collapse M_SYMLET_5

Specifies a Symlet wavelet filter that uses 5 vanishing moments and real coefficients.

Collapse M_SYMLET_6

Specifies a Symlet wavelet filter that uses 6 vanishing moments and real coefficients.

Collapse M_SYMLET_7

Specifies a Symlet wavelet filter that uses 7 vanishing moments and real coefficients.

Collapse M_SYMLET_8

Specifies a Symlet wavelet filter that uses 8 vanishing moments and real coefficients.

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 number of entries to obtain (MimAllocResult())

Combination constant for M_UNDECIMATED (when ResultType=M_TRANSFORMATION_MODE and UserArrayPtr=M_UNDECIMATED).

The following value might be combined with the above-mentioned value to determine if undecimated wavelet transformations are centered.

function map For specifying whether undecimated wavelet transformations are centered
CollapseCombination value Description
Collapse M_CENTER

Specifies undecimated wavelet transformations that are centered. INFO

Combination constants for the values listed in For a result buffer.

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
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.
ANGULAR DATA COHERENCE ANGULAR DATA MEAN CUMULATIVE VALUE HIST REAL SIZE HIST VALUE OFFSET HIST VALUE RANGE MAX MAX ABS MEAN MIN MIN ABS NB EVENT NUMBER NUMBER OF LEVELS ORIGINAL IMAGE SIZE X ORIGINAL IMAGE SIZE Y PERCENTILE VALUE POSITION X POSITION Y STANDARD DEVIATION SUM SUM ABS SUM OF SQUARES TOTAL NUMBER TRANSFORMATION DOMAIN COMPLEX REAL TRANSFORMATION MODE DEFAULT DYADIC UNDECIMATED VALUE WAVELET DRAW SIZE X WAVELET DRAW SIZE X WITH PADDING WAVELET DRAW SIZE Y WAVELET DRAW SIZE Y WITH PADDING WAVELET SIZE WAVELET TYPE DEFAULT CUSTOM DAUBECHIES 1 DAUBECHIES 2 DAUBECHIES 3 DAUBECHIES 3 COMPLEX DAUBECHIES 4 DAUBECHIES 5 DAUBECHIES 5 COMPLEX DAUBECHIES 6 DAUBECHIES 7 DAUBECHIES 7 COMPLEX DAUBECHIES 8 HAAR SYMLET 1 SYMLET 2 SYMLET 3 SYMLET 4 SYMLET 5 SYMLET 6 SYMLET 7 SYMLET 8 PERCENTAGE CENTER TYPE MIL DOUBLE TYPE MIL FLOAT TYPE MIL INT TYPE MIL INT32 TYPE MIL INT64