Chapter2 GettingMeasurement-Ready Images
IMAQVision for LabWindows/CVI User Manual 2-4 ni.com
Source and Destination ImagesSome IMAQ Vision functions that modify the contents of an image have
sourceimage and destination image input parameters. The source image
receivest he image to process. The destination image receivesthe
processingresults. The destination image can receive either another image
orthe original, depending on y our goals. If you do not want the contents of
the original image to change, use separate source and destination images.
Ifyou want to replace the original image with the processed image, pass the
same image as both the source and destination.
Dependingon the functi on, the image type of the destination image can be
thesame or different than the image type of the source image. The function
descriptions in the IMAQVision for LabWindows/CVI function reference
helpinclude the type of images you can use as image inputs and outputs.
IMAQVision resizes the destination image to hold the result if the
destination is not the appropriate size.
The followingexamples illustrate source and destin ation images with
imaqTranspose():
•imaqTranspose(myImage,myImage);
Thisfunction creates a transposed image using the same image for the
sourceand d estination. The contents of myImage change.
•imaqTranspose(myTransposedImage,myImage);
Thisfunction creates a transposedimage and stores itin a d estination
differentfrom the source. The myImage image remains unchanged,
and myTransposedImagecontains the result.
Functions that perform arithmetic or logical operations between two
imageshave two source images and a destination image. You can perform
an operation betweentwo images and then either store the result in a
separatedestination image or in one of the two source images. In the
latter case, makesure you no l onger need the original data in the source
image before storing the result over the data.
The followingexamples show the possible combin ations using
imaqAdd():
•imaqAdd(myResultImage,myImageA, myImageB);
Thisfunction adds two source images (myImageA and myImageB)and
stores the result in a third image (myResultImage). Both source
imagesremain intactafter p rocessing.