National Instruments IMAQTM 用户手册

下载
页码 121
© National Instruments Corporation
6-1
6
Calibrating Images
This chapter describes how to calibrate the imaging system, save 
calibration information, and attach calibration information to an image.
After you set up the imaging system, you may want to calibrate the system. 
If the imaging setup is such that the camera axis is perpendicular or nearly 
perpendicular to the object under inspection and the lens has no distortion, 
use simple calibration. With simple calibration, you do not need to learn a 
template. Instead, you define the distance between pixels in the horizontal 
and vertical directions using real-world units.
If the camera axis is not perpendicular to the object under inspection or the 
lens is distorted, use perspective and nonlinear distortion calibration to 
calibrate the system.
Perspective and Nonlinear Distortion Calibration
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. Calibrate the imaging 
system if you need to compensate for perspective errors or nonlinear lens 
distortion.
Follow these general steps to calibrate the imaging system:
1.
Define a calibration template.
2.
Define a reference coordinate system.
3.
Learn the calibration information.
After you calibrate the imaging setup, you can attach the calibration 
information to an image. Refer to the 
section of this chapter for more information. Depending on your needs, you 
can either apply calibration information in one of the following ways:
Convert pixel coordinates to real-world coordinates without correcting 
the image
Create a distortion-free image by correcting the image for perspective 
errors and lens aberrations