Chapter 2
Getting Measurement-Ready Images
IMAQ Vision for LabWindows/CVI User Manual
2-2
ni.com
3.
Select an image acquisition device that meets your needs. National
Instruments offers several image acquisition (IMAQ) devices, such as
analog color and monochrome IMAQ devices as well as digital
devices. Visit
ni.com/imaq
for more information about IMAQ
devices.
4.
Configure the driver software for your image acquisition device. If
you have a National Instruments image acquisition device, configure
your NI-IMAQ driver software through Measurement & Automation
Explorer (MAX). Open MAX by double-clicking the Measurement &
Automation Explorer icon on your desktop. For more information,
see the
NI-IMAQ User Manual
and the MAX online help.
Calibrate Your Imaging System
After you set up your imaging system, you may want to calibrate your
system. Calibrate your imaging system to assign real-world coordinates to
pixel coordinates and compensate for perspective and nonlinear errors
inherent in your imaging system.
Perspective errors occur when your camera axis is not perpendicular to the
object under inspection. Nonlinear distortion may occur from aberrations
in the camera lens. Perspective errors and lens aberrations cause images to
appear distorted. This distortion misplaces information in an image, but it
does not necessarily destroy the information in the image.
Use simple calibration if you only want to assign real-world coordinates to
pixel coordinates. Use perspective and nonlinear distortion calibration if
you need to compensate for perspective errors and nonlinear lens distortion.
For detailed information about calibration, see Chapter 6,
Create an Image
To create an image in IMAQ Vision for LabWindows/CVI, call
imaqCreateImage()
. This function returns an image reference you can
use when calling other IMAQ Vision functions. The only limitation to the
size and number of images you can acquire and process is the amount of
memory on your computer. When you create an image, specify the type of
the image. Table 2-1 lists the valid image types.