National Instruments IMAQTM 用户手册

下载
页码 121
Chapter 6
Calibrating Images
© National Instruments Corporation
6-9
Calibration Invalidation
Any image processing operation that changes the image size or orientation 
voids the calibration information in a calibrated image. Examples 
of methods that void calibration information include 
CWIMAQVision.Resample2
CWIMAQVision.Extract2
CWIMAQVision.Unwrap
, and 
CWIMAQImage.ArrayToImage
.
Simple Calibration
When the axis of the camera is perpendicular to the image plane and lens 
distortion is negligible, use simple calibration. In simple calibration, a pixel 
coordinate is transformed into a real-world coordinate through scaling in 
the horizontal and vertical directions. 
Use simple calibration to map pixel coordinates to real-world coordinates 
directly without a calibration grid. The software rotates and scales a pixel 
coordinate according to predefined coordinate reference and scaling 
factors. You can assign the calibration to an arbitrary image using 
CWIMAQVision.SetSimpleCalibration
.
To perform a simple calibration, set a coordinate system (angle, center, 
and axis direction) and scaling factors on the defined axis, as shown in 
Figure 6-7. Express the angle between the x-axis and the horizontal axis 
of the image in degrees. Express the center as the position, in pixels, where 
you want the coordinate system origin. Set the axis direction to direct or 
indirect. Simple calibration also offers a correction table option and a 
scaling mode option.
Use 
CWIMAQSimpleCalibrationOptions.CalibrationAxisInfo
 
to define the coordinate reference. Use 
CWIMAQSimpleCalibrationOptions.GridDescriptor
 
to specify the scaling factors. Use 
CWIMAQSimpleCalibrationOptions.CorrectionScalingMode
 
to set the scaling mode. Set 
CWIMAQSimpleCalibrationOptions.LearnCorrectionTable
 
to
True
 to learn the correction table.