Chapter2 GettingMeasurement-Ready Images
©NationalInstruments Corporation 2-5 IMAQVision for LabWindows/CVI User Manual
•imaqAdd(myImageA,myImageA, myImageB);
Thisfunct ion adds twosou rcei mages and stores the result in the first
sourceimage.
•imaqAdd(myImageB,myImageA, myImageB);
This function adds two source images and stores the result in the
second source image.
Mostoperations between twoimages require that the images have the
same type and size. However,some arithmetic operations can work
between twod ifferenttypes of images (for example, 8-bi t and 16-bit).
Some functions perform operations that populate an image. Examples of
this type of operation include reading a file, acquiring an image from an
IMAQdevice, or transforming a 2D array into an image. This type of
functioncan modify the size of an image.
Some functions take an additional mask parameter.The presence of a
maskparameter indicates that the processing or analysisis dependent on
the contents of another image (the image mask). The only pixels in the
sourcei mage that are processed are those whose corresponding pixels in
the image mask arenon-zero. If an image mask pixel is 0, the
correspondingsource image pixel is not processed or analyzed. The image
mask must be an 8-bit image.
Ify ou wantto appl y ap rocessing or analysis function to the entire image,
passNULL for the image mask. Passing the same image toboth the source
imageand image mask also gives the same effect as passing NULL for the
image mask, exceptin this case the source image must be an 8-bit image.
AcquireorReadanImageAfteryou create an image reference, you can acquire an image into your
imaging systemin three ways. You can acquire an image with a camera
throughyour image acquisition device, load an image from a file stored on
yourcomputer, or convert the data stored in a 2D array to an image.
Functionsthat acquire images, load images from file,or convert data from
a2D arrayautomatically allocate the memory space required to
accommodate the image data.