| MIL 10 Reference
| Customize Help
| Save Settings

MimTranslate



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
Translate an image in X- and/or Y-displacement.
Syntax
void MimTranslate(
MIL_ID SrcImageBufId, //in
MIL_ID DstImageBufId, //in
MIL_DOUBLE DisplacementX, //in
MIL_DOUBLE DisplacementY, //in
MIL_INT64 InterpolationMode //in
)
Description

This function translates the source image position by the specified amount, writing results to the destination buffer. This function can be used to align images to subpixel accuracy before, for example, subtracting them.

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 source 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 destination 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.

DisplacementX

Specifies the amount by which to displace the source image in the X-direction. This parameter can be set to any positive or negative value.

DisplacementY

Specifies the amount by which to displace the source image in the Y-direction. This parameter can be set to any positive or negative value.

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_BILINEAR + M_OVERSCAN_ENABLE.

Collapse M_BILINEAR +

Specifies bilinear interpolation.

Combination constants for any of the possible values of the InterpolationMode parameter.

You can add one of the following values to the above-mentioned value 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.

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 BILINEAR OVERSCAN CLEAR OVERSCAN DISABLE OVERSCAN ENABLE OVERSCAN FAST