| Customize Help
| Save Settings

MimWarpList



Function Map
Synopsis
Applies a warping matrix to a list of coordinates.
Syntax
void MimWarpList(
MIL_ID WarpParamBufId, //in
MIL_INT64 TransformType, //in
MIL_INT NumPoints, //in
const MIL_DOUBLE *SrcCoordXArrayPtr, //in
const MIL_DOUBLE *SrcCoordYArrayPtr, //in
MIL_DOUBLE *DstCoordXArrayPtr, //out
MIL_DOUBLE *DstCoordYArrayPtr, //out
MIL_INT64 ControlFlag //in
)
Description

This function transforms a list of coordinates (points) using the specified warping matrix and stores the resulting coordinates in the destination arrays (M_REVERSE). Alternatively, this function can transform the coordinates using the inverse of the specified matrix (M_FORWARD).

When this function transforms the coordinates using the warping matrix as is (M_REVERSE), it is referred to as a reverse warping transformation because this is how MimWarp() associates each pixel position of its destination buffer, (xd, yd ), with a specific point in its source buffer, (xs, ys ). Therefore, you can use MimWarpList() to establish which points in a source image MimWarp() associates with destination pixels when using the same matrix. When this function transforms the coordinates using the inverse of the specified warping matrix (M_FORWARD), it is referred to as a forward warping transformation; you can use a forward warping transformation, for example, to see if a specific pixel in the source image of MimWarp() is actually mapped to a destination buffer pixel.

You can only specify the coefficients for a 3x3 or 3x2 matrix; this allows you to perform a first-order polynomial warping or a perspective polynomial warping.

Perform a first-order polynomial warping by passing a 3x3 matrix, where the third row has the coefficients [0,0,1], or by passing a 3x2 matrix, the last row is assumed to be [0,0,1]. Perform a perspective polynomial warping by passing a 3x3 matrix, where the third row does not have the coefficients [0,0,1]. The matrix is applied as follows:

x d = (a0 x s + a1 y s + a2)/(c0 x s + c1 y s + c2).

y d = (b0 x s + b1 y s + b2)/(c0 x s + c1 y s + c2).

If a 3x2 matrix, or a 3x3 matrix whose third row has the coefficients of [0,0,1] is specified (for a first-order polynomial warping operation), the denominator resolves to 1, effectively leaving only the numerator. The coefficients can be automatically generated using MgenWarpParameter(), MimResize(), MimRotate(), or MimTranslate(), or can be user-established.

Note that MimWarpList() will internally invert the coefficients matrix (a0...a2, b0...b2, c0...c2 ) for a forward transfomation (M_FORWARD).

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
WarpParamBufId

Specifies the buffer containing the warp matrix coefficients.

The coefficients must be in a single-band, 32-bit floating-point buffer that has an M_ARRAY attribute and that has dimensions 3x2 or 3x3. The first row specifies the a n coefficients, the second row specifies the b n coefficients, and the third row specifies the c n coefficients. If the buffer is 3x2, the third row is assumed to be (0, 0, 1).

TransformType

Specifies the transformation type to perform the warping.

function map For specifying the transformation type.
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_REVERSE.

Click to summarize M_FORWARD

Specifies to perform a forward transformation. A forward transformation uses the inverse of the specified warping matrix to transform the source X- and Y-coordinates.

(summarize)
Click to summarize M_REVERSE

Specifies to perform a reverse transformation. A reverse transformation uses the specified warping matrix as is to transform the source X- and Y-coordinates.

(summarize)
NumPoints

Specifies the number of points in the arrays.

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 SrcCoordXArrayPtr or SrcCoordYArrayPtr parameter.

SrcCoordXArrayPtr
Accepts the address of one of the following:
  • array of type MIL_DOUBLE [optionally, in C++: a reference to a constant std::vector<MIL_DOUBLE> ] (and a maximum array rank for C# of 1)
    Required array size:(NumPoints)

Specifies the address of the array that contains the source X-coordinates.

SrcCoordYArrayPtr
Accepts the address of one of the following:
  • array of type MIL_DOUBLE [optionally, in C++: a reference to a constant std::vector<MIL_DOUBLE> ] (and a maximum array rank for C# of 1)
    Required array size:(NumPoints)

Specifies the address of the array that contains the source Y-coordinates.

DstCoordXArrayPtr
Accepts the address of one of the following:
  • array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] (and a maximum array rank for C# of 1)
    Required array size:(NumPoints)

Specifies the address of the array in which to store the destination X-coordinates.

DstCoordYArrayPtr
Accepts the address of one of the following:
  • array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] (and a maximum array rank for C# of 1)
    Required array size:(NumPoints)

Specifies the address of the array in which to store the destination Y-coordinates.

ControlFlag

Reserved for future expansion. This parameter must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
FLOAT DEFAULT FORWARD REVERSE