| Customize Help
| Save Settings

MimArithMultiple



Function Map
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.

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.

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.

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.

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.

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.

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
Click to summarizeOperation Description
Src1ImageBufId
Src2ImageBufIdOrConst
Src3ImageBufIdOrConst
Src4Const
Src5Const
Click to summarize M_MULTIPLY_ACCUMULATE_1 +

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

(summarize)
Click to summarize Src1ImageBufId

Specifies the image buffer identifier required for the first operand.

(summarize)
Click to summarize 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)
Click to summarize 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)
Click to summarize Src4Const

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

Click to summarize M_MULTIPLY_ACCUMULATE_2 +

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

(summarize)
Click to summarize Src1ImageBufId

Specifies the image buffer identifier required for the first operand.

(summarize)
Click to summarize 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)
Click to summarize 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)
Click to summarize 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)
Click to summarize Src5Const

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

Click to summarize M_OFFSET_GAIN +

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

(summarize)
Click to summarize Src1ImageBufId

Specifies the image buffer identifier required for the first operand.

(summarize)
Click to summarize Src2ImageBufIdOrConst

Specifies the image buffer identifier required for the second operand.

(summarize)
Click to summarize Src3ImageBufIdOrConst

Specifies the image buffer identifier required for the third operand.

(summarize)
Click to summarize Src4Const

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

Click to summarize M_WEIGHTED_AVERAGE +

Performs a weighted average operation using the equation that follows.

(summarize)
Click to summarize Src1ImageBufId

Specifies the image buffer identifier required for the first operand.

(summarize)
Click to summarize Src2ImageBufIdOrConst

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

Click to summarize 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)

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
Click to summarizeCombination value Description
Click to summarize 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