LogDiff Method

NI Vision for Visual Basic

LogDiff Method

Syntax

CWIMAQVision.LogDiff SourceImage, Operand, DestImage

Return Type

Long

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

Purpose

Completes the following operation for each pixel (x,y): DestImage(x,y) = SourceImage(x,y) AND NOT Operand

Remarks

Use this method with U8, I16, RGB32, and HSL32 images. All of the images you pass to this method must be of the same type.

This method is optimized for MMX.

Parameters

SourceImage As CWIMAQImage

The first input image.

Operand As Variant

Either the second input image or a constant.

DestImage As CWIMAQImage

The resulting image. It can be one of the source images.

Example

Dim i As New CWIMAQImage

' Logical Difference operation between a constant and an image
' in Viewer1.
' Store the result in i
CWIMAQVision1.LogDiff CWIMAQViewer1.Image, 128, i

' Find the Logical Difference of image i with the image in Viewer1.
' Do the addition in-place (store the result in i)
CWIMAQVision1.LogDiff CWIMAQViewer1.Image, i, i