Справочник Пользователя для National Instruments IMAQ Vision for LabWindows TM /CVI

Скачать
Страница из 119
© National Instruments Corporation
6-1
6
Calibrating Images
This chapter describes how to calibrate your imaging system, save 
calibration information, and attach calibration information to an image.
After you set up your imaging system, you may want to calibrate your 
system. If your imaging setup is such that the camera axis is perpendicular 
or nearly perpendicular to the object under inspection and your 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 your camera axis is not perpendicular to the object under inspection, use 
perspective calibration to calibrate your system. If your lens is distorted, 
use nonlinear distortion calibration.
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 your imaging 
system if you need to compensate for perspective errors or nonlinear lens 
distortion.
Complete the following general steps to calibrate your imaging system:
1.
Define a calibration template.
2.
Define a reference coordinate system.
3.
Learn the calibration information.
After you calibrate your imaging system, you can attach the calibration 
information to an image. Refer to the 
section of this chapter for more information. Then, depending on your 
needs, you can do one of the following:
Use the calibration information to 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.