| MIL 10 Reference
| Customize Help
| Save Settings

MregInquire



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
None.
Synopsis
Inquire information about a registration context, a specified registration element, or a registration result buffer.
Syntax
MIL_INT MregInquire(
MIL_ID ContextOrResultId, //in
MIL_INT Index, //in
MIL_INT64 InquireType, //in
void *UserVarPtr //out
)
Description

This function inquires information about a specified registration context, the registration elements contained therein, or a specified registration result buffer.

Note that for a registration result buffer, this function only retrieves information about result buffer settings (set with MregControl(), for example). To retrieve results from the registration result buffer, use MregGetResult().

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
ContextOrResultId

Specifies either the registration context or registration result buffer about which to inquire information. Both the registration context and the registration result buffer must have been previously allocated on the system using MregAlloc() or MregAllocResult(), respectively.

Index

Specifies that information will be inquired about a registration context, an individual registration element, or a registration result buffer. This parameter should be set to one of the following values:

function map For specifying a registration context, registration element, or registration result buffer
CollapseValue Description
Collapse M_DEFAULT

Specifies the default value.

If an M_STITCHING registration context is specified, this parameter inquires information about registration element 0.

If an M_EXTENDED_DEPTH_OF_FIELD registration context is specified, same as M_CONTEXT.

If a result buffer is specified, same as M_GENERAL.

(summarize)
Collapse M_CONTEXT

Inquires information about a registration context, if one is specified.

Collapse M_GENERAL

Inquires general information about the registration result buffer, if one is specified.

Collapse Value

Inquires information about a registration element, if a registration context is specified. Set the Index parameter to the index of the required registration element.

Note that this parameter is only available for M_STITCHING registration contexts.

(summarize)
InquireType

Specifies the setting about which to inquire. Unless otherwise specified, the possible InquireType values only apply to M_STITCHING registration contexts and M_STITCHING_RESULT result buffers.

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

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

Specifies the address in which to write the requested information. Since the MregInquire() function also returns the requested information, you can set this parameter to M_NULL.

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

For M_CONTEXT or M_GENERAL, the InquireType parameter can be set to one of the following:

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For M_CONTEXT or M_GENERAL
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_NUMBER_OF_ELEMENTS +

Inquires the number of registration elements in the registration context or the number of registration result elements in the result buffer. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 256.

Collapse 1 <= Value < 8192

Specifies the number of registration elements.

Collapse M_OWNER_SYSTEM +

Inquires the identifier of the system on which the specified registration context or registration result buffer was allocated. This value is also available for M_EXTENDED_DEPTH_OF_FIELD_RESULT result buffers and M_EXTENDED_DEPTH_OF_FIELD registration contexts. SET SET

(summarize)
Collapse M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Collapse MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

For correlation contexts, the InquireType parameter can be set to one of the following values.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For inquiring correlation context settings
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_ACCURACY +

Inquires the accuracy of the registration calculation. SET

(summarize)
Collapse M_DEFAULT

Same as M_HIGH.

Collapse M_HIGH

Specifies high accuracy. INFO

Collapse M_LOW

Specifies low accuracy. INFO

Collapse M_LOCATION_DELTA +

Inquires the maximum displacement that will be applied to any pixel in the image during registration, relative to its initial location. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 5%.

Collapse 0 < Value <= 100.0

Specifies the maximum displacement as a percentage. INFO

Collapse M_MIN_OVERLAP +

Inquires the minimum overlap that should exist between an image and its reference image so that the registration calculation can optimize the match in their overlapping region. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 20.0%.

Collapse 0 < Value <= 100.0

Specifies the minimum overlap as a percentage. INFO

Collapse M_SCORE_TYPE +

Inquires the type of score calculated during registration. This calculated score can be retrieved after registration using MregGetResult() with M_SCORE. SET

(summarize)
Collapse M_CORRELATION

Specifies to calculate the score based on the normalized grayscale correlation in the overlapped region.

Collapse M_NONE

Specifies that no score is calculated; it is set to 100%.

Collapse M_TRANSFORMATION_TYPE +

Inquires the type of transformation that the registration calculation will use to optimize the match in the images' overlapping regions. SET

(summarize)
Collapse M_DEFAULT

Same as M_TRANSLATION.

Collapse M_PERSPECTIVE

Specifies that a perspective warping can be performed to optimize the match in the overlapping regions.

Collapse M_TRANSLATION

Specifies that a translation can be performed to optimize the match in the overlapping regions.

Collapse M_TRANSLATION_ROTATION

Specifies that a translation and a rotation can be performed to optimize the match in the overlapping regions.

Collapse M_TRANSLATION_ROTATION_SCALE

Specifies that a translation, a rotation, and a scale operation can be performed to optimize the match in the overlapping regions.

For one or all registration elements in a correlation context or a correlation result buffer, the InquireType parameter can be set to one of the following values.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For registration elements of correlation contexts and correlation result buffers
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_OPTIMIZE_LOCATION +

Inquires whether the optimization step of the registration calculation will be performed. SET

(summarize)
Collapse M_DEFAULT

Same as M_ENABLE.

Collapse M_DISABLE

Specifies not to perform the optimization calculation.

Collapse M_ENABLE

Specifies to perform the optimization calculation.

Collapse M_REFERENCE_X +

Inquires the X-coordinate of the origin of the image's pixel coordinate system. SET

(summarize)
Collapse M_DEFAULT

Specifies that the default X-coordinate of the origin will be used. INFO

Collapse M_CENTER_ELEMENT

Specifies the X-coordinate of the origin to be at the center of the image.

Collapse Value

Specifies the X-coordinate of the origin, in pixels. INFO

Collapse M_REFERENCE_Y +

Inquires the Y-coordinate of the origin of the image's pixel coordinate system. SET

(summarize)
Collapse M_DEFAULT

Specifies that the default Y-coordinate of the origin will be used. INFO

Collapse M_CENTER_ELEMENT

Specifies the Y-coordinate of the origin to be at the center of the image.

Collapse Value

Specifies the Y-coordinate of the origin, in pixels. INFO

Collapse M_SET_LOCATION_PARAM_1 +

Inquires the first attribute of the transformation used to set the rough location of the registration element's image. If the first attribute was set to a MIL identifier, this identifier cannot be returned; M_NULL is returned instead. This is the case when the rough location was set using MregSetLocation() with, for example, M_COPY_REG_CONTEXT or M_COPY_REG_RESULT. SET

(summarize)
Collapse M_NULL

Specifies that the first attribute was set to a MIL identifier.

Collapse Value

Specifies the X-coordinate.

Collapse M_SET_LOCATION_PARAM_2 +

Inquires the second attribute of the transformation used to set the rough location of the registration element's image. SET

(summarize)
Collapse M_DEFAULT

Specifies the default index. INFO

Collapse 0 <= Value <= Number of source elements-1

This value can have multiple meanings, as indicated below.

(summarize)

Specifies the registration element's index.

Specifies the registration result element's index.

Collapse Value

Specifies the Y-coordinate.

Collapse M_SET_LOCATION_PARAM_3 +

Inquires the third attribute of the transformation used to set the rough location of the registration element's image. SET

(summarize)
Collapse M_DEFAULT

Specifies that the target registration result element's index is the same as the one that is specified in the Target parameter.

Collapse M_REGISTRATION_GLOBAL

Specifies that the target registration result element's reference is the global pixel coordinate system.

Collapse 0.0 <= Value <= 360.0

Specifies the angle of the image in its reference coordinate system.

Collapse Value >= 0

Specifies the target registration result element's index.

Collapse M_SET_LOCATION_PARAM_TYPE +

Inquires the type of transformation used to set the rough location of the registration element's image. SET

(summarize)
Collapse M_COPY_REG_CONTEXT

Specifies that the rough locations are copied from another registration context.

Collapse M_COPY_REG_RESULT

Specifies that the transformation between two registration result elements is copied.

Collapse M_POSITION_XY

Specifies the coordinates of the origin of the registration element's image in the coordinate system of its reference. INFO

Collapse M_POSITION_XY_ANGLE

Specifies the coordinates of the origin and the angle of the registration element's image in the coordinate system of its reference. INFO

Collapse M_WARP_4_CORNER

Specifies the transformation that transforms an arbitrary quadrilateral in the current image's pixel coordinate system into a rectangle in its reference coordinate system. INFO

Collapse M_WARP_4_CORNER_REVERSE

Specifies the transformation that transforms a rectangle in the current image's pixel coordinate system into an arbitrary quadrilateral in its reference coordinate system. INFO

Collapse M_WARP_POLYNOMIAL

Specifies the transformation matrix that transforms points in the reference coordinate system into points in the current image's pixel coordinate system.

Collapse M_SET_LOCATION_TARGET +

Inquires the reference of the registration element's image. SET

(summarize)
Collapse M_DEFAULT

Same as M_PREVIOUS.

Collapse M_NEXT

Specifies the reference to be the image associated with the registration element whose index follows the specified registration element's index. INFO

Collapse M_PREVIOUS

Specifies the reference to be the image associated with the registration element whose index precedes the specified registration element's index. INFO

Collapse M_REGISTRATION_GLOBAL

Specifies that the reference is the global pixel coordinate system.

Collapse 0 <= Value <= Number of source elements-1

Specifies the index of the registration element of the reference image.

For inquiring correlation result buffers with the index set to M_GENERAL, the InquireType parameter can be set to one of the following values.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For correlation result buffers
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_MOSAIC_COMPOSITION +

Inquires which image's pixel values to use when composing the mosaic and two or more images overlap. SET

(summarize)
Collapse M_DEFAULT

Same as M_LAST_IMAGE.

Collapse M_AVERAGE_IMAGE

Specifies to use the average value of the images' pixels in the overlapping region.

Collapse M_FIRST_IMAGE

Specifies to use the pixels of the image associated with the registration result element with the lowest index.

Collapse M_FUSION_IMAGE

Specifies to fuse the images by progressively blending overlapping pixels. INFO

Collapse M_LAST_IMAGE

Specifies to use the pixels of the image associated with the registration result element with the highest index.

Collapse M_SUPER_RESOLUTION

Specifies to use a super-resolution algorithm to create the mosaic. INFO

Collapse M_MOSAIC_OFFSET_X +

Inquires the X-offset between the origin of the coordinate system used to compose the mosaic and the left side of the destination image buffer. SET

(summarize)
Collapse M_DEFAULT

Same as M_ALIGN_LEFT.

Collapse M_ALIGN_LEFT

Specifies that the X-offset (in pixels) will be calculated such that the left-most part of the mosaic will be aligned with the left side of the destination image buffer.

Collapse Value

Specifies the X-offset, in pixels.

Collapse M_MOSAIC_OFFSET_Y +

Inquires the Y-offset between the origin of the coordinate system used to compose the mosaic and the top of the destination image buffer. SET

(summarize)
Collapse M_DEFAULT

Same as M_ALIGN_TOP.

Collapse M_ALIGN_TOP

Specifies that the Y-offset (in pixels) will be calculated such that the top-most part of the mosaic will be aligned with the top of the destination image buffer.

Collapse Value

Specifies the Y-offset, in pixels.

Collapse M_MOSAIC_SCALE +

Inquires the scaling factor used on images while creating the mosaic. SET

(summarize)
Collapse 0.0 < Value <= 10.0

Specifies the scale factor.

Collapse M_MOSAIC_STATIC_INDEX +

Inquires the element whose coordinate system is used when generating the mosaic. If the coordinate system of one of the images is used, the index of its corresponding registration element is returned. If the coordinate system which minimizes changes to the images or the global pixel coordinate system is used, M_ALL or M_REGISTRATION_GLOBAL will be returned, respectively. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value. INFO

Collapse M_ALL

Specifies that the coordinate system will be chosen such that the minimum change is done on all images during the mosaic composition. INFO

Collapse M_REGISTRATION_GLOBAL

Specifies that the mosaic will be composed with respect to the global pixel coordinate system.

Collapse 0 <= Value <= NumberOfElements-1

Specifies the index of the registration result element whose image's pixel coordinate system will be used as the reference coordinate system.

Collapse M_SR_PSF_RADIUS +

Inquires the radius of the M_CIRCULAR or M_GAUSSIAN point-spread functions (PSF). For M_GAUSSIAN, the radius corresponds to the standard deviation. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 0.5pixels.

Collapse Value >= 0.0

Specifies the radius of the PSF, in pixel units at the scale of the source images.

Collapse M_SR_PSF_TYPE +

Inquires the type of point-spread function (PSF) to use during super-resolution calculations to model the blurring in source images. SET

(summarize)
Collapse M_DEFAULT

Same as M_GAUSSIAN.

Collapse M_CIRCULAR

Specifies to assume a PSF that models blurring of single points of light into uniform circles in the image.

Collapse M_DISABLE

Specifies that no PSF should be assumed during super-resolution calculations.

Collapse M_GAUSSIAN

Specifies to assume a PSF that models blurring of single points of light into radially symmetric gaussian functions in the image.

Collapse M_SQUARE

Specifies to assume a PSF that models blurring of single points of light into symmetric square functions in the image.

Collapse M_SR_SMOOTHNESS +

Inquires the smoothness value used during super-resolution calculations. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 50.0.

Collapse 0.0 <= Value <= 100.0

Specifies the smoothness value.

For inquiring extended depth of field contexts, the InquireType parameter can be set to one of the following values.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_DOUBLE.

function map For M_EXTENDED_DEPTH_OF_FIELD contexts
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_CIRCLE_OF_CONFUSION_RADIUS_MAX +

Inquires the radius of the maximum circle of confusion (blurring circle), among the input images. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 8pixels.

Collapse 1 <= Value <= 256

Specifies the maximum radius of the circle of confusion (blurring circle) in pixels.

Collapse M_MODE +

Inquires the computation mode of the registration operation. SET

(summarize)
Collapse M_DEFAULT

Same as M_RECONSTRUCTION.

Collapse M_FAST

Specifies a faster computation mode. INFO

Collapse M_RECONSTRUCTION

Specifies a computation mode that favors the quality of the extended depth of field (EDoF) image. INFO

Collapse M_TRANSLATION_TOLERANCE +

Inquires the maximum distance 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, among the input images. SET

(summarize)
Collapse M_DEFAULT

Specifies the default value; the default value is 1pixel.

Collapse 1 <= Value <= 4

Specifies the maximum translation distance of a point between two images, in pixels.

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

function map For specifying the data type
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_TYPE_MIL_DOUBLE

Casts the requested information to a MIL_DOUBLE.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_DOUBLE

Collapse M_TYPE_MIL_ID

Casts the requested information to a MIL_ID. Note that M_TYPE_MIL_ID should only be used with M_OWNER_SYSTEM.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_ID

Collapse M_TYPE_MIL_INT

Casts the requested information to a MIL_INT.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_INT

Collapse M_TYPE_MIL_INT32

Casts the requested information to a MIL_INT32.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_INT32

Collapse M_TYPE_MIL_INT64

Casts the requested information to a MIL_INT64.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_INT64

Return value
The returned value is the requested information, cast to a MIL_INT.
Compilation information
Header Include mil.h.
Library Use mil.lib; milreg.lib.
DLL Requires mil.dll; milreg.dll.
DEFAULT CONTEXT GENERAL NUMBER OF ELEMENTS DEFAULT OWNER SYSTEM DEFAULT HOST ACCURACY DEFAULT HIGH LOW LOCATION DELTA DEFAULT MIN OVERLAP DEFAULT SCORE TYPE CORRELATION NONE TRANSFORMATION TYPE DEFAULT PERSPECTIVE TRANSLATION TRANSLATION ROTATION TRANSLATION ROTATION SCALE OPTIMIZE LOCATION DEFAULT DISABLE ENABLE REFERENCE X DEFAULT CENTER ELEMENT REFERENCE Y DEFAULT CENTER ELEMENT SET LOCATION PARAM 1 NULL SET LOCATION PARAM 2 DEFAULT DEFAULT SET LOCATION PARAM 3 DEFAULT REGISTRATION GLOBAL SET LOCATION PARAM TYPE COPY REG CONTEXT COPY REG RESULT POSITION XY POSITION XY ANGLE WARP 4 CORNER WARP 4 CORNER REVERSE WARP POLYNOMIAL SET LOCATION TARGET DEFAULT NEXT PREVIOUS REGISTRATION GLOBAL MOSAIC COMPOSITION DEFAULT AVERAGE IMAGE FIRST IMAGE FUSION IMAGE LAST IMAGE SUPER RESOLUTION MOSAIC OFFSET X DEFAULT ALIGN LEFT MOSAIC OFFSET Y DEFAULT ALIGN TOP MOSAIC SCALE MOSAIC STATIC INDEX DEFAULT ALL REGISTRATION GLOBAL SR PSF RADIUS DEFAULT SR PSF TYPE DEFAULT CIRCULAR DISABLE GAUSSIAN SQUARE SR SMOOTHNESS DEFAULT CIRCLE OF CONFUSION RADIUS MAX DEFAULT MODE DEFAULT FAST RECONSTRUCTION TRANSLATION TOLERANCE DEFAULT TYPE MIL DOUBLE TYPE MIL ID TYPE MIL INT TYPE MIL INT32 TYPE MIL INT64 CONTEXT GENERAL DEFAULT GENERAL CONTEXT