Acquire or read an image, Acquire or read an image -5 – National Instruments IMAQ Vision for Measurement Studio User Manual

Page 18

Advertising
background image

Chapter 2

Getting Measurement-Ready Images

© National Instruments Corporation

2-5

IMAQ Vision for LabWindows/CVI User Manual

imaqAdd(myImageA, myImageA, myImageB);

This function adds two source images and stores the result in the first
source image.

imaqAdd(myImageB, myImageA, myImageB);

This function adds two source images and stores the result in the
second source image.

Most operations between two images require that the images have the
same type and size. However, some arithmetic operations can work
between two different types of images (for example, 8-bit 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
IMAQ device, or transforming a 2D array into an image. This type of
function can modify the size of an image.

Some functions take an additional mask parameter. The presence of a
mask parameter indicates that the processing or analysis is dependent on
the contents of another image (the image mask). The only pixels in the
source image that are processed are those whose corresponding pixels in
the image mask are non-zero. If an image mask pixel is 0, the
corresponding source image pixel is not processed or analyzed. The image
mask must be an 8-bit image.

If you want to apply a processing or analysis function to the entire image,
pass NULL for the image mask. Passing the same image to both the source
image and image mask also gives the same effect as passing NULL for the
image mask, except in this case the source image must be an 8-bit image.

Acquire or Read an Image

After you create an image reference, you can acquire an image into your
imaging system in three ways. You can acquire an image with a camera
through your image acquisition device, load an image from a file stored on
your computer, or convert the data stored in a 2D array to an image.
Functions that acquire images, load images from file, or convert data from
a 2D array automatically allocate the memory space required to
accommodate the image data.

Advertising