CxMultiply Method

NI Vision for Visual Basic

CxMultiply Method

Syntax

CWIMAQVision.CxMultiply SourceImage, DestImage, ImageOrReal [, Imaginary]

Return Type

Long

On success, this method returns 0. On failure, this method returns a negative number.

Purpose

Multiplies a complex image by an image or a constant.

Remarks

SourceImage and DestImage must be Complex images.

If ImageOrReal is an image, it must be a U8, I16, SGL, or Complex image.

Parameters

SourceImage As CWIMAQImage

The first input image.

DestImage As CWIMAQImage

The resulting image.

ImageOrReal As Variant

Either the second input image or the real part of the constant.

Imaginary As Variant

[Optional] The imaginary part of the constant.

Example

' Multiply a constant 10-20i by the image in Viewer1
Dim i As New CWIMAQImage
i.Type = cwimaqImageTypeComplex

CWIMAQVision1.CxMultiply CWIMAQViewer1.Image, i, 10, -20

' Multiply the image in i by Viewer1.  Store the result in i
CWIMAQVision1.CxMultiply CWIMAQViewer1.Image, i, i