| MIL 10 Reference
| Customize Help
| Save Settings

MregTransformImage



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
Next
Synopsis
Composes a mosaic from the specified source images and stores it in the destination image buffer.
Syntax
void MregTransformImage(
MIL_ID RegResultId, //in
const MIL_ID *ImageArrayPtr, //in
MIL_ID DestImageBufId, //in
MIL_INT NumImages, //in
MIL_INT64 InterpolationMode, //in
MIL_INT64 ControlFlag //in
)
Description

This function composes a mosaic from the specified source images and stores it in the destination image buffer. The source images are transformed according to the results, stored in the registration result buffer, that were calculated during the MregCalculate() operation.

Each image in the image array is associated with the registration result element with the same index (for example, the third image in the array is associated with the third registration result element). Note that for the image to appear at the correct location in the mosaic, its index in the array must match the index of the registration result element containing the image's transformation.

It is possible to use some images and omit others when composing the mosaic. In this case, replace the images that you want to omit by M_NULL in the image array. It can be useful to omit images from a mosaic if you want to add images to a preexisting mosaic, for example. In this case, replace all the images in the array by M_NULL, except the ones to add, and call MregTransformImage() with the preexisting mosaic passed in DestImageBufId.

When composing the mosaic, you can control how it will appear in the destination image buffer. You can specify which image to place first, using M_MOSAIC_STATIC_INDEX. This image will be placed upright and will not be scaled. The other images in the mosaic will be positioned relative to this image's pixel coordinate system. In addition, you can also adjust the vertical and horizontal offsets between the origin of the mosaic's coordinate system and the origin of the destination image buffer, using MregControl() with M_MOSAIC_OFFSET_X and M_MOSAIC_OFFSET_Y.

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 with which to perform the mosaicing operation. The registration result buffer must have been previously allocated or restored on the required system using MregAllocResult() or MregRestore(), respectively.

ImageArrayPtr

Specifies the address of the array containing the identifiers of the image buffers. To omit images from the mosaic, replace their identifiers with M_NULL in the array.

These images must not have a region of interest (ROI) associated with them. Using images with an ROI will cause an error.

DestImageBufId

Specifies the destination image buffer that will contain the mosaic after the MregTransformImage() operation is performed.

This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

NumImages

Specifies the number of images in the image array.

InterpolationMode

Specifies the interpolation mode. This parameter must be set to one of the values below.

function map For specifying the interpolation mode
CollapseValue Description
Collapse M_DEFAULT

Same as M_NEAREST_NEIGHBOR + M_OVERSCAN_ENABLE.

Collapse M_BICUBIC +

Specifies bicubic interpolation. Saturation is performed according to the type of the destination buffer.

(summarize)
Collapse M_BILINEAR +

Specifies bilinear interpolation. No saturation is performed.

(summarize)
Collapse M_NEAREST_NEIGHBOR +

Specifies nearest neighbor interpolation. No saturation is performed.

(summarize)
Combination constants for any of the possible values of the InterpolationMode parameter.

You can add one of the following values to the above-mentioned values to specify the type of overscan to use for a destination pixel when its associated point falls outside the source buffers.

function map For overscan
CollapseCombination value Description
Collapse M_OVERSCAN_CLEAR

Sets the destination pixel to 0.

Collapse M_OVERSCAN_DISABLE

Leaves the destination pixel as is.

Collapse M_OVERSCAN_ENABLE

Uses pixels from the source buffer's ancestor buffer. If the source buffer is not a child buffer or if the point falls outside all of the ancestor buffers, leave the destination pixel as is.

This is the default value.

(summarize)
ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; milreg.lib.
DLL Requires mil.dll; milreg.dll.
NONE NONE DEFAULT BICUBIC BILINEAR NEAREST NEIGHBOR OVERSCAN CLEAR OVERSCAN DISABLE OVERSCAN ENABLE