| Customize Help
| Save Settings

MregTransformImage



Function Map
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 which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
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
Accepts the address of one of the following:
  • array of type MIL_ID [optionally, in C++: a reference to a constant std::vector<MIL_ID> ] (and a maximum array rank for C# of 1)
    Required array size:(NumImages)

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.

When using a standard vector (std::vector) overload function in C++, you can pass M_DEFAULT to this parameter and MIL will automatically determine the size based on the number of items in the vector passed to the ImageArrayPtr parameter.

InterpolationMode

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

function map For specifying the interpolation mode
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_NEAREST_NEIGHBOR + M_OVERSCAN_ENABLE.

Click to summarize M_BICUBIC +

Specifies bicubic interpolation. The new value is determined by taking a weighted average of the 16 values (4x4) that surround the source point. Note that the sum of the weights used for bicubic interpolation might be greater than one. If this occurs and the result reflects an overflow or underflow, the result is saturated according to the depth and data type of the destination buffer.

(summarize)
Click to summarize M_BILINEAR +

Specifies bilinear interpolation. The new value is determined by taking a weighted average of the 4 values (2x2) that surround the source point.

(summarize)
Click to summarize M_NEAREST_NEIGHBOR +

Specifies nearest neighbor interpolation. The new value is that of the pixel closest to the source point.

(summarize)
Combination values 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
Click to summarizeCombination value Description
Click to summarize M_OVERSCAN_CLEAR

Sets the destination pixel to 0.

Click to summarize M_OVERSCAN_DISABLE

Leaves the destination pixel as is.

Click to summarize 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, it leaves 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