| MIL 10 Reference
| Customize Help
| Save Settings

MimRotate



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Partially supported on:
Partially supported on Matrox GPU processing driver
Partially supported on Matrox Radient eCL
Partially supported on Matrox Radient eV-CXP
Partially supported on Matrox Solios eA/XA
Partially supported on Matrox Solios ecl/xcl/ev-cl

Fully supported on:
Fully supported on Host system
Fully supported on Matrox CronosPlus
Fully supported on Matrox GigE Vision driver
Fully supported on Matrox IEEE 1394 IIDC driver
Fully supported on Matrox Iris GT
Fully supported on Matrox Morphis
Fully supported on Matrox Morphis QxT
Fully supported on Matrox Orion HD
Fully supported on Matrox USB3 Vision driver (requires Update 19)
Fully supported on Matrox Vio

For any information regarding a MIL system added during a MIL Update, see the MIL system’s release note

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Rotate an image.
Syntax
void MimRotate(
MIL_ID SrcImageBufId, //in
MIL_ID DstImageBufId, //in
MIL_DOUBLE Angle, //in
MIL_DOUBLE SrcCenX, //in
MIL_DOUBLE SrcCenY, //in
MIL_DOUBLE DstCenX, //in
MIL_DOUBLE DstCenY, //in
MIL_INT64 InterpolationMode //in
)
Description

This function rotates an image by the specified angle of rotation, using the specified interpolation mode. The center of rotation in the source image is determined by the specified X- and Y-source rotation-center coordinates. The rotated image will then be clipped to fit the destination buffer. It will be placed in the destination buffer with its center positioned at the specified X- and Y-destination center coordinates.

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
SrcImageBufId

Specifies the identifier of the data source of the operation. This parameter must be given an image buffer identifier.

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.

[Matrox GPU processing driver]

The source image buffer must be unsigned monochrome 8- or 16-bit, or M_BGR32 packed.

DstImageBufId

Specifies the identifier of the destination of the results. This parameter must be given an image buffer identifier.

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.

Note that after performing the operation, the destination image will not be calibrated, even if the source image was calibrated.

[Matrox GPU processing driver]

The destination image buffer must be unsigned monochrome 8- or 16-bit, or M_BGR32 packed.

Angle

Specifies the angle of rotation, in degrees. When a positive angle is specified, the function rotates the image in a counter-clockwise direction.

SrcCenX

Specifies the X-coordinate to use as the center of rotation in the source image. This parameter must be set to one of the values below.

function map For specifying the X-coordinate (source)
CollapseValue Description
Collapse M_DEFAULT

Causes the image to rotate about its true center.

Collapse Value

Specifies the X-coordinate.

SrcCenY

Specifies the Y-coordinate to use as the center of rotation in the source image. This parameter must be set to one of the values below.

function map For specifying the Y-coordinate (source)
CollapseValue Description
Collapse M_DEFAULT

Causes the image to rotate about its true center.

Collapse Value

Specifies the Y-coordinate.

DstCenX

Specifies the X-coordinate in the destination buffer to which the specified center of the rotated source image will be mapped. This parameter must be set to one of the values below.

function map For specifying the X-coordinate (destination)
CollapseValue Description
Collapse M_DEFAULT

Causes the true center of the destination buffer to be used.

Collapse Value

Specifies the X-coordinate.

DstCenY

Specifies the Y-coordinate in the destination buffer to which the specified center of the rotated source image will be mapped. This parameter must be set to one of the values below.

function map For specifying the Y-coordinate (destination)
CollapseValue Description
Collapse M_DEFAULT

Causes the true center of the destination buffer to be used.

Collapse Value

Specifies the Y-coordinate.

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
MIL system-specific
tooltip (†)
Collapse M_DEFAULT

Specifies nearest neighbor interpolation while using pixels from the source buffer's ancestor buffer. This is the same as M_NEAREST_NEIGHBOR + M_OVERSCAN_ENABLE.

(summarize)
a b c d e f g h i j k l m n o p q r s
Collapse M_BICUBIC +

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

(summarize)
a b c e f g h i j k l m n o p q r s
Collapse M_BILINEAR +

Specifies bilinear interpolation. No saturation is performed.

(summarize)
a b c d e f g h i j k l m n o p q r s
Collapse M_NEAREST_NEIGHBOR +

Specifies nearest neighbor interpolation. No saturation is performed.

(summarize)
a b c d e f g h i j k l m n o p q r s
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 how to determine the value of a destination pixel when its associated point falls outside the source buffer.

function map For overscan
CollapseCombination value Description
MIL system-specific
tooltip (†)
Collapse M_OVERSCAN_CLEAR

Sets the destination pixel to 0.

a b c d e f g h i j k l m n o p q r s
Collapse M_OVERSCAN_DISABLE

Leaves the destination pixel as is.

a b c d e f g h i j k l m n o p q r s
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 the ancestor buffer, leave the destination pixel as is. Points falling outside the source image are undefined.

This is the default value.

(summarize)
a b c d e f g h i j k l m n o p q r s
MIL system specific

Points falling outside the source image are undefined.

d j k l m p q r
Collapse M_OVERSCAN_FAST

Specifies that MIL will automatically select the overscan that optimizes speed, according to the specified operation and the target system. The overscan could be hardware-specific thereby having a different behavior than the other supported overscan modes.

Note that when using M_OVERSCAN_FAST, the destination pixels in the overscan area are undefined. The pixels can therefore contain different values from one function call to the next, even if the function's parameter values are the same.

(summarize)
a b c d e f g h i j k l m n o p q r s
Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
PROC NONE PROC NONE DEFAULT DEFAULT DEFAULT DEFAULT DEFAULT BICUBIC BILINEAR NEAREST NEIGHBOR OVERSCAN CLEAR OVERSCAN DISABLE OVERSCAN ENABLE OVERSCAN FAST