National Instruments NI-IMAQdx Automobile Accessories User Manual


 
Chapter 4 Using NI-IMAQdx in LabVIEW
© National Instruments Corporation 4-4 NI-IMAQdx User Manual
Buffer Management
The IMAQ Create VI and IMAQ Dispose VI manage image buffers in
LabVIEW.
IMAQ Create, shown in Figure 4-1, allocates an image buffer. Image
Name is a label for the buffer created. Each buffer must have a unique
name. Image Type specifies the type of image being created. Use
Grayscale (U8) for 8-bit monochrome images, Grayscale (I16) for 16-bit
monochrome images, and RGB (U32) for RGB color images.
Note If Image Type is set to a value incompatible with the current video mode,
NI-IMAQdx automatically changes the value to a compatible one when acquiring images.
New Image contains pointer information to the buffer, which is initially
empty. When you wire New Image to the Image in input of an image
acquisition VI, the image acquisition VI allocates the correct amount of
memory for the acquisition. If you are going to process the image, you
might need to provide a value for Border Size. Border Size is the width,
in pixels, of a border created around an image. Some image processing
functions, such as labeling or morphology, require a border.
Figure 4-1. IMAQ Create
IMAQ Dispose, shown in Figure 4-2, frees the memory allocated for the
image buffer. Call this VI only after the image is no longer required for
processing.
Figure 4-2. IMAQ Dispose