CxDivide Method

NI Vision for Visual Basic

CxDivide Method

Syntax

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

Return Type

Long

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

Purpose

Divides 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

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

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

' Divide the image in Viewer1 by i. Store the result in i
CWIMAQVision1.CxDivide CWIMAQViewer1.Image, i, i