| MIL 10 Reference
| Customize Help
| Save Settings

MimArithMultiple



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Partially supported on:
Partially supported on Matrox GPU processing driver

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 Radient eCL
Fully supported on Matrox Radient eV-CXP
Fully supported on Matrox Solios eA/XA
Fully supported on Matrox Solios ecl/xcl/ev-cl
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
Perform a point-to-point arithmetic operation using multiple source images.
Syntax
void MimArithMultiple(
MIL_DOUBLE Src1ImageBufId, //in
MIL_DOUBLE Src2ImageBufIdOrConst, //in
MIL_DOUBLE Src3ImageBufIdOrConst, //in
MIL_DOUBLE Src4Const, //in
MIL_DOUBLE Src5Const, //in
MIL_ID DstImageBufId, //in
MIL_INT64 Operation, //in
MIL_INT64 OperationFlag //in
)
Description

This function performs the specified point-to-point operation using multiple images, images and constants, or constants, storing results in the specified destination image buffer. Note that this function does not take 1-bit buffers in any of its parameters.

You can limit this function's results to a region of an image buffer using a region of interest (ROI) set using MbufSetRegion(). The ROI must be defined in raster format (M_RASTER or M_VECTOR_AND_RASTER). An error is generated if the ROI is only in vector format (M_VECTOR). If you specify multiple image buffers with an ROI, results are limited to the portion of the ROIs that intersect.

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
Src1ImageBufId

Specifies the data source of the first operand; this parameter must be given an image buffer identifier. If you specify an image buffer that has an ROI associated with it, the ROI must be in raster format; otherwise, you will get an error.

[Matrox GPU processing driver]

The data source of the first operand must be an unsigned, monochrome 8- or 16-bit, or an M_BGR32 packed image buffer.

See the Parameter associations section for possible values that can be specified.

Src2ImageBufIdOrConst

Specifies the data source of the second operand; this parameter can be given an image buffer identifier or a constant. If you specify an image buffer that has an ROI associated with it, the ROI must be in raster format; otherwise, you will get an error.

[Matrox GPU processing driver]

The data source of the second operand must be an unsigned, monochrome 8- or 16-bit, or an M_BGR32 packed image buffer.

See the Parameter associations section for possible values that can be specified.

Src3ImageBufIdOrConst

Specifies the data source of the third operand; this parameter can be given an image buffer identifier or a constant. If you specify an image buffer that has an ROI associated with it, the ROI must be in raster format; otherwise, you will get an error.

[Matrox GPU processing driver]

If the data source of the third operand is an image buffer, it must be an unsigned, monochrome 8- or 16-bit, or M_BGR32 packed image buffer. If the data source is a constant, it can be any floating-point value.

See the Parameter associations section for possible values that can be specified.

Src4Const

Specifies the data source of the fourth operand; this parameter must be given a constant.

Set this parameter to M_NULL if not used.

[Matrox GPU processing driver]

The constant can be any floating-point value.

See the Parameter associations section for possible values that can be specified.

Src5Const

Specifies the data source of the fifth operand; this parameter must be given a constant.

Set this parameter to M_NULL if not used.

[Matrox GPU processing driver]

The constant can be any floating-point value.

See the Parameter associations section for possible values that can be specified.

DstImageBufId

Specifies the identifier of the destination of the results; this parameter must be given an image buffer identifier. If you specify an image buffer that has an ROI associated with it, the ROI must be in raster format; otherwise, you will get an error.

[Matrox GPU processing driver]

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

Operation

Specifies the operation to perform.

See the Parameter associations section for possible values that can be specified.

OperationFlag

Reserved for future expansion. Must be set to M_DEFAULT.

The table below lists possible values for the Src1ImageBufId, Src2ImageBufIdOrConst, Src3ImageBufIdOrConst, Src4Const, Src5Const, and Operation parameters.

Note that any unused parameters should be set to M_NULL.

function map For the Operation, Src1ImageBufId, Src2ImageBufId, Src3ImageBufId, Src4ImageBufId, and Src5ImageBufId parameters
CollapseOperation Description
MIL system-specific
tooltip (†)
Src1ImageBufId
Src2ImageBufIdOrConst
Src3ImageBufIdOrConst
Src4Const
Src5Const
Collapse M_MULTIPLY_ACCUMULATE_1 +

Performs a point-to-point multiply and accumulate 1 operation using the equation that follows.

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

Specifies the image buffer identifier required for the first operand.

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

Specifies the constant required for the second operand.

Note that the constant is cast to the same type as the buffer specified for the first operand.

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

Specifies the constant required for the third operand.

Note that the constant is cast to the same type as the buffer specified for the first operand.

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

Specifies the constant required for the fourth operand; this constant must be a power of 2.

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

Performs a point-to-point multiply and accumulate 2 operation using the equation that follows.

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

Specifies the image buffer identifier required for the first operand.

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

Specifies the constant required for the second operand.

Note that the constant is cast to the same type as the buffer specified for the first operand.

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

Specifies the image buffer identifier required for the third operand.

Note that the image buffer's data type must either match that of the first operand, or it must be of type M_FLOAT.

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

Specifies the constant required for the fourth operand.

Note that the constant is cast to the same type as the buffer specified for the third operand.

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

Specifies the constant required for the fifth operand; this constant must be a power of 2.

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

Performs a per-pixel gain and offset correction operation using the equation that follows.

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

Supports mixed-sign buffers.

d
Collapse Src1ImageBufId

Specifies the image buffer identifier required for the first operand.

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

Specifies the image buffer identifier required for the second operand.

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

Specifies the image buffer identifier required for the third operand.

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

Specifies the constant required for the fourth operand; this constant must be a power of 2.

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

Performs a weighted average operation using the equation that follows.

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

Specifies the image buffer identifier required for the first operand.

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

Specifies the constant required for the second operand; this constant must be a power of 2.

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

Specifies the image buffer identifier required for the third operand.

Note that the image buffer's data type must either match that of the first operand, or it must be of type M_FLOAT.

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

You can add the following value to the above-mentioned values to specify that the operation result should be saturated if necessary.

function map For the Operation parameter
CollapseCombination value Description
Collapse M_SATURATION

Forces the operation to saturate any resulting pixel values that overflow or underflow the possible range of the destination buffer. The pixel values are clipped to fit within the buffer's range, rather than wrapped around the range.

If you do not specify M_SATURATION and there is an overflow or underflow, the resulting pixel values are either clipped (saturated) or wrapped around the buffer's range (not saturated), depending on which is faster for your hardware.

(summarize)
Compilation information
Header Include mil.h.
Library Use mil.lib; milim.lib.
DLL Requires mil.dll; milim.dll.
PROC VECTOR MULTIPLY ACCUMULATE 1 PROC VECTOR MULTIPLY ACCUMULATE 2 PROC VECTOR FLOAT PROC VECTOR OFFSET GAIN PROC VECTOR PROC VECTOR PROC VECTOR WEIGHTED AVERAGE PROC VECTOR FLOAT PROC VECTOR SATURATION