| MIL 10 Reference
| Customize Help
| Save Settings

MregGetResult



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) from a registration result buffer.
Syntax
void MregGetResult(
MIL_ID RegResultId, //in
MIL_INT ResultIndex, //in
MIL_INT64 ResultType, //in
void *ResultArrayPtr //out
)
Description

This function retrieves the result(s) of the specified type from a registration result buffer.

The result(s) that can be retrieved from an M_STITCHING_RESULT result buffer are only available after calling MregCalculate() with an M_STITCHING registration context. Result(s) from an M_EXTENDED_DEPTH_OF_FIELD_RESULT can only be retrieved after calling MregCalculate() with an M_EXTENDED_DEPTH_OF_FIELD registration context.

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
RegResultId

Specifies the identifier of the registration result buffer from which to retrieve results.

ResultIndex

Specifies which results to get. This parameter can be set to one of the following values:

function map For retrieving results
CollapseValue Description
Collapse M_DEFAULT

Specifies the default value.

For an M_STITCHING_RESULT result buffer, same as M_ALL.

For an M_EXTENDED_DEPTH_OF_FIELD_RESULT result buffer, same as M_GENERAL.

(summarize)
Collapse M_ALL

Specifies to retrieve the results of the specified type for all registration result elements. This setting is only available for M_STITCHING_RESULT result buffers.

(summarize)
Collapse M_GENERAL

Specifies to retrieve a result relating to the entire registration result buffer.

Collapse 0 <= Value <= M_NUMBER_OF_ELEMENTS-1

Specifies the registration result element's index. This setting is only available for M_STITCHING_RESULT result buffers.

(summarize)
ResultType

Specifies the type of result to retrieve.

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

ResultArrayPtr
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
  • MIL_DOUBLE
  • MIL_ID
  • MIL_INT
  • MIL_INT32
  • MIL_INT64

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

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

To retrieve a general result or the result for one or all registration result elements of an M_STITCHING_RESULT result buffer, the ResultType parameter can be set to one of the following values.

Unless otherwise specified, for one registration result element or M_GENERAL, the following values require that you pass the ResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to 1. For M_ALL, the following values require that you pass the ResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to MregInquire() with M_NUMBER_OF_ELEMENTS.

function map For general results or registration result element results from an M_STITCHING_RESULT result buffer
CollapseResultType Description
ResultArrayPtr
- Possible values returned
Collapse M_RESULT +

Retrieves whether the registration calculation (MregCalculate()) was successful.

When using M_GENERAL, and the calculation of one registration result element fails, M_RESULT returns a fail as well.

(summarize)
Collapse M_FAILURE

Specifies that the registration calculation failed.

Collapse M_SUCCESS

Specifies that the registration calculation was successful.

Collapse M_SCORE +

Retrieves the score of the registration calculation (MregCalculate()). To determine the type of score to calculate, use MregControl() with M_SCORE_TYPE.

When using M_GENERAL, the score is an average of the scores of all result elements together.

(summarize)
Collapse 0.0 <= Value <= 100.0

Specifies the score of the registration calculation. The lower the value, the less optimal the alignment. For example, 0.0 equals no alignment and 100.0 equals a perfect alignment. Note that image noise can also adversely affect the score.

(summarize)

To retrieve a general result from an M_STITCHING_RESULT result buffer, the ResultType parameter can be set to one of the following values:

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

function map For general results from an M_STITCHING_RESULT result buffer
CollapseResultType Description
ResultArrayPtr
- Possible values returned
Collapse M_MOSAIC_OFFSET_X +

Retrieves the horizontal offset that will exist between the origin of the mosaic's coordinate system and the left side of the destination image buffer, when you compose the mosaic.

(summarize)
Collapse M_MOSAIC_OFFSET_Y +

Retrieves the vertical offset that will exist between the origin of the mosaic's coordinate system and the top of the destination image buffer, when you compose the mosaic.

(summarize)
Collapse M_MOSAIC_SIZE_X +

Retrieves the width that the mosaic will have when it is composed. This value can be used to allocate an image buffer large enough to hold the entire mosaic composed by MregTransformImage().

(summarize)
Collapse M_MOSAIC_SIZE_Y +

Retrieves the height that the mosaic will have when it is composed. This value can be used to allocate an image buffer large enough to hold the entire mosaic composed by MregTransformImage().

(summarize)

To retrieve the result from one or all the registration result elements of an M_STITCHING_RESULT result buffer, the ResultType parameter can be set to one of the following values:

Unless otherwise specified, for one registration result element, the following values require that you pass the ResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to 1. For multiple registration result elements (M_ALL), the following values require that you pass the ResultArrayPtr parameter the address of an array of type MIL_DOUBLE with a size equal to M_NUMBER_OF_ELEMENTS.

function map For results from one or all registration result elements of an M_STITCHING_RESULT result buffer
CollapseResultType Description
ResultArrayPtr
- Possible values returned
Collapse M_POSITION_X +

Retrieves the X-coordinate of the registration result element image's origin in the global/reference coordinate system.

(summarize)
Collapse M_POSITION_Y +

Retrieves the Y-coordinate of the registration result element image's origin in the global/reference coordinate system.

(summarize)
Collapse M_REVERSE_TRANSFORMATION_MATRIX +

Retrieves the 9 elements of the 3x3 transformation matrix that performs a reverse transformation.

The transformation matrix can transform any position in the specified image (xs , ys ) with a position in the global/reference coordinate system (xg , yg ).

(summarize)
Collapse ResultArrayPtr data type info
  • Data type: array of type MIL_DOUBLE
    Array size: 9
    Note: for 1 registration result element

  • Data type: array of type MIL_DOUBLE
    Array size: 9 x M_NUMBER_OF_ELEMENTS
    Note: for M_ALL

Collapse M_REVERSE_TRANSFORMATION_MATRIX_ID +

Retrieves the identifier of the MIL array buffer containing the 3x3 transformation matrix that performs a reverse transformation.

The transformation matrix can transform any position in the specified image (xs , ys ) with a position in the global/reference coordinate system (xg , yg ).

Note that you cannot free the retrieved buffer.

(summarize)
Collapse M_TRANSFORMATION_MATRIX +

Retrieves the 9 elements of the 3x3 transformation matrix.

The transformation matrix can transform any position in the global/reference coordinate system (xg , yg ) with a position in the specified image (xs , ys ).

You can put the matrix data into a MIL buffer (MbufPut()) and pass the matrix (buffer) to MimWarp() to transform the source image to the global/reference coordinate system.

(summarize)
Collapse ResultArrayPtr data type info
  • Data type: array of type MIL_DOUBLE
    Array size: 9
    Note: for 1 registration result element

  • Data type: array of type MIL_DOUBLE
    Array size: 9 x M_NUMBER_OF_ELEMENTS
    Note: for M_ALL

Collapse M_TRANSFORMATION_MATRIX_ID +

Retrieves the identifier of the MIL array buffer containing the 3x3 transformation matrix.

The transformation matrix can transform any position in the global/reference coordinate system (xg , yg ) with a position in the specified image (xs , ys ).

You can pass the matrix to MimWarp() to transform the source image to the global/reference coordinate system.

Note that you cannot free the retrieved buffer.

(summarize)
Collapse M_TRANSFORMED_BL_X +

Retrieves the X-coordinate of the bottom left corner of the specified registration result element's image. This coordinate is with respect to the global/reference coordinate system.

(summarize)
Collapse M_TRANSFORMED_BL_Y +

Retrieves the Y-coordinate of the bottom left corner of the specified registration result element's image. This coordinate is with respect to the global/reference coordinate system.

(summarize)
Collapse M_TRANSFORMED_BR_X +

Retrieves the X-coordinate of the bottom right corner of the specified registration result element's image. This coordinate is with respect to the global/reference coordinate system.

(summarize)
Collapse M_TRANSFORMED_BR_Y +

Retrieves the Y-coordinate of the bottom right corner of the specified registration result element's image. This coordinate is with respect to the global/reference coordinate system.

(summarize)
Collapse M_TRANSFORMED_UL_X +

Retrieves the X-coordinate of the upper left corner of the specified registration result element's image. This coordinate is with respect to the global/reference coordinate system.

(summarize)
Collapse M_TRANSFORMED_UL_Y +

Retrieves the Y-coordinate of the upper left corner of the specified registration result element's image. This coordinate is with respect to the global/reference coordinate system.

(summarize)
Collapse M_TRANSFORMED_UR_X +

Retrieves the X-coordinate of the upper right corner of the specified registration result element's image. This coordinate is with respect to the global/reference coordinate system.

(summarize)
Collapse M_TRANSFORMED_UR_Y +

Retrieves the Y-coordinate of the upper right corner of the specified registration result element's image. This coordinate is with respect to the global/reference coordinate system.

(summarize)

You can add one of the following values to the above-mentioned values to get the requested results with respect to the required coordinate system.

function map For specifying the coordinate system
CollapseCombination value Description
Collapse M_REFERENCE

Retrieves the results with respect to the reference coordinate system. The reference coordinate system is associated with the registration element that was specified in the Target parameter of MregSetLocation().

(summarize)
Collapse M_REGISTRATION_GLOBAL

Retrieves the results with respect to the global pixel coordinate system.

This is the default value.

(summarize)

To retrieve a general result from an M_EXTENDED_DEPTH_OF_FIELD_RESULT result buffer, the result type parameter can be set to one of the following values:

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

function map For general results from an M_EXTENDED_DEPTH_OF_FIELD_RESULT result buffer
CollapseResultType Description
ResultArrayPtr
- Possible values returned
Collapse M_CIRCLE_OF_CONFUSION_RADIUS_MAX +

Retrieves the radius of the maximum circle of confusion (blurring circle) used during calculations, in pixels.

(summarize)
Collapse M_EDOF_IMAGE_SIZE_BAND +

Retrieves the number of bands of the EDoF image (or the expected EDoF image, in the case of M_ACCUMULATE). This value can be used to allocate an image buffer large enough to hold the entire EDoF image drawn using MregDraw().

(summarize)
Collapse M_EDOF_IMAGE_SIZE_X +

Retrieves the width of the EDoF image (or the expected EDoF image, in the case of M_ACCUMULATE). This value can be used to allocate an image buffer large enough to hold the entire EDoF image drawn using MregDraw().

(summarize)
Collapse M_EDOF_IMAGE_SIZE_Y +

Retrieves the height of the EDoF image (or the expected EDoF image, in the case of M_ACCUMULATE). This value can be used to allocate an image buffer large enough to hold the entire EDoF image drawn using MregDraw().

(summarize)
Collapse M_EDOF_IMAGE_TYPE +

Retrieves the type of the EDoF image (or the expected EDoF image, in the case of M_ACCUMULATE). This value can be used to allocate an image buffer with the appropriate settings to hold the EDoF image drawn using MregDraw().

(summarize)
Collapse depth value + M_FLOAT

Specifies the data depth and that the data type is floating-point.

Collapse depth value + M_SIGNED

Specifies the data depth and that the data type is signed.

Collapse depth value + M_UNSIGNED

Specifies the data depth and that the data type is unsigned.

Collapse M_EDOF_STATUS +

Retrieves whether the EDoF image is available.

(summarize)
Collapse M_ACCUMULATE

Specifies that the result buffer has been filled with some preprocessing information, but the EDoF image is not yet available. The EDoF image can be calculated using MregCalculate() with M_ACCUMULATE_AND_FUSION.

(summarize)
Collapse M_COMPLETE

Specifies that the EDoF image is available and can be retrieved using MregDraw().

Collapse M_EMPTY

Specifies that the result buffer is empty.

Collapse M_MODE +

Retrieves the computation mode used.

(summarize)
Collapse M_FAST

Specifies that the extended depth of field registration operation used the fast computation mode. This mode favored reducing computation time over accuracy.

(summarize)
Collapse M_RECONSTRUCTION

Specifies that the extended depth of field registration operation used the reconstruction computation mode. This mode favored accuracy over reducing computation time.

(summarize)
Collapse M_NUMBER_OF_IMAGES +

Retrieves the number of images used to calculate the results that are stored in the result buffer.

(summarize)
Collapse M_TRANSLATION_TOLERANCE +

Retrieves the maximum distance, used during calculations, between a point of an object that is in focus in one image, and the same point in an image in which the object is out of focus, in pixels.

(summarize)

You can add the following value to the above-mentioned values to determine if the requested result type is available.

You should always check the availability of a result type with M_AVAILABLE before getting the actual result. Otherwise, if the requested result type is unavailable, getting the result will cause an error.

function map For requesting availability
CollapseResultType Description
ResultArrayPtr
- Possible values returned
Collapse M_AVAILABLE +

Retrieves whether the requested result type is available for retrieval.

(summarize)
Collapse ResultArrayPtr data type info

Data type: MIL_DOUBLE

Collapse M_FALSE

Specifies that the requested result type is not available.

Collapse M_TRUE

Specifies that the requested result type is available.

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
ResultArrayPtr
- Possible values returned
Collapse M_TYPE_MIL_DOUBLE

Casts the requested results to a MIL_DOUBLE.

(summarize)
Collapse ResultArrayPtr data type info
  • Data type: array of type MIL_DOUBLE
    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 ResultArrayPtr data type info
  • Data type: array of type MIL_ID
    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 ResultArrayPtr data type info
  • Data type: array of type MIL_INT
    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 ResultArrayPtr data type info
  • Data type: array of type MIL_INT32
    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 ResultArrayPtr data type info
  • Data type: array of type MIL_INT64
    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; milreg.lib.
DLL Requires mil.dll; milreg.dll.
DEFAULT ALL GENERAL NUMBER OF ELEMENTS-1 RESULT FAILURE SUCCESS SCORE MOSAIC OFFSET X MOSAIC OFFSET Y MOSAIC SIZE X MOSAIC SIZE Y POSITION X POSITION Y REVERSE TRANSFORMATION MATRIX REVERSE TRANSFORMATION MATRIX ID TRANSFORMATION MATRIX TRANSFORMATION MATRIX ID TRANSFORMED BL X TRANSFORMED BL Y TRANSFORMED BR X TRANSFORMED BR Y TRANSFORMED UL X TRANSFORMED UL Y TRANSFORMED UR X TRANSFORMED UR Y REFERENCE REGISTRATION GLOBAL CIRCLE OF CONFUSION RADIUS MAX EDOF IMAGE SIZE BAND EDOF IMAGE SIZE X EDOF IMAGE SIZE Y EDOF IMAGE TYPE FLOAT SIGNED UNSIGNED EDOF STATUS ACCUMULATE COMPLETE EMPTY MODE FAST RECONSTRUCTION NUMBER OF IMAGES TRANSLATION TOLERANCE AVAILABLE FALSE TRUE TYPE MIL DOUBLE TYPE MIL ID TYPE MIL INT TYPE MIL INT32 TYPE MIL INT64 GENERAL GENERAL DEFAULT GENERAL ALL DEFAULT ALL