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 |
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).
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).
Specifies the transformation type to perform the warping.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_REVERSE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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)Specifies to perform a forward transformation. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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)Specifies to perform a reverse transformation. (more details...) |
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.
Specifies the address of the array that contains the source X-coordinates.
Specifies the address of the array that contains the source Y-coordinates.
Specifies the address of the array in which to store the destination X-coordinates.
Specifies the address of the array in which to store the destination Y-coordinates.
Header | Include mil.h. |
Library | Use mil.lib; milim.lib. |
DLL | Requires mil.dll; milim.dll. |