Chapter 6 Calibrating Images
IMAQ Vision for Visual Basic User Manual 6-10 ni.com
Figure 6-7. Defining a Simple Calibration
Save Calibration InformationAfter you learn the calibration information, you can save it so that you
do not have to relearn the information for subsequent processing. Use
CWIMAQVision.WriteImageAndVisionInfo to save the image of
the grid and its associated calibration information to a file. To read the
file containing the calibration information use
CWIMAQVision.ReadImageAndVisionInfo. For more information
about attaching the calibration information you read from another image,
refer to the Attach Calibration Information section.
Attach Calibration InformationWhen you finish calibrating the setup, you can apply the calibration
settings to images that you acquire. Use
CWIMAQVision.SetCalibrationInformation toattach the
calibration information of the current setup to each image youacquire.
This method takes in a source image containing the calibration information
and a destination image that you want to calibrate. The output image is the
inspection image with the calibration information attached toit.
Using the calibration information attached to the image, you can
accuratelyconvert pixel coordinates to real-world coordinates to
makeany of the analytic geometry measurements with
1Origin
X
Y
dy
1
dx