National Instruments IMAQ Vision for LabWindows TM /CVI Network Card User Manual


 
Chapter 2 Getting Measurement-Ready Images
© National Instruments Corporation 2-7 IMAQ Vision for LabWindows/CVI User Manual
Use imaqReadVisionFile() to open an image file containing additional
information, such as calibration information, template information for
pattern matching, or overlay information. For more information about
pattern matching templates and overlays, refer to Chapter 5, Performing
Machine Vision Tasks.
You can also use
imaqGetFileInfo() to retrieve image
properties—such as image size, recommended image type, and
calibration units—without actually reading all the image data.
Converting an Array to an Image
Use imaqArrayToImage() to convert a 2D array to an image. You can
also use
imaqImageToArray() to convert an image to a 2D array.
Display an Image
Display an image in an external window using imaqDisplayImage().
You can display images in 16 different external windows. Use the other
display functions to configure the appearance of each external window.
Properties you can set include whether the window has scroll bars, a title
bar, and whether it is resizable. You can also use
imaqMoveWindow() to
position the external image window at a particular location on you monitor.
Refer to the IMAQ Vision for LabWindows/CVI Function Reference for a
complete list of Display functions.
Note Image windows are not LabWindows/CVI panels. They are managed directly by
IMAQ Vision.
You can use a color palette to display grayscale images by applying a color
palette to the window. Use
imaqSetWindowPalette() to set predefined
color palettes. For example, if you need to display a binary image—an
image containing particle regions with pixel values of 1 and a background
region with pixel values of 0—apply the predefined binary palette. For
more information about color palettes, refer to Chapter 2, Display, of the
IMAQ Vision Concepts Manual.
Note At the end of your application, close all open external windows using
imaqCloseWindow().