Managing Buffers in LabVIEW

NI IMAQ

Managing Buffers in LabVIEW

IMAQ Create and IMAQ Dispose manage image buffers in LabVIEW. IMAQ Create allocates an image buffer. The following diagram illustrates the IMAQ Create VI.

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 8 bits for 8-bit monochrome images, 16 bits for 10-, 12-, and 14-bit monochrome images, RGB for RGB color images, and HSL for HSL color images. If you do not know the image type at design time, you can get the image type programmatically from the session with the LabVIEW property node.

When you acquire into a buffer, the image type of the buffer is coerced to match the type of the acquired image.

New Image contains information about 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 wire to Border Size. Border Size is the width, in pixels, created around an image. Some image processing functions, such as labeling and morphology, require a border.

IMAQ Dispose frees the memory allocated for the image buffer. Call this VI only after the image is no longer required for processing. The following diagram illustrates the IMAQ Dispose VI.