Chapter 6
IMAQ Vision for LabWindows/CVI User Manual
6-10
ni.com
Save Calibration Information
After you learn the calibration information, you can save it so that you do
not have to relearn the information for subsequent processing. Use
imaqWriteVisionFile()
to save the image of the grid and its associated
calibration information to a file. To read the file containing the calibration
information use
imaqReadVisionFile()
. For more information about
attaching the calibration information you read from another image, see the
Attach Calibration Information
section.
Attach Calibration Information
Now that you have calibrated your setup correctly, you can apply
the calibration settings to images that you acquire. Use
imaqCopyCalibrationInfo()
to attach the calibration information of
the current setup to each image you acquire. This function takes in a source
image containing the calibration information and a destination image that
you want to calibrate. The destination image is your inspection image with
the calibration information attached to it.
Using the calibration information attached to the image, you can accurately
convert pixel coordinates to real-world coordinates to make any of the
analytic geometry measurements with
imaqTransformPixelToRealWorld()
. If your application requires that
you make shape measurements, correct the image by removing distortion
with
imaqCorrectImage()
.
Note
Because calibration information is part of the image, it is propagated throughout
the processing and analysis of the image. Functions that modify the image size (such as an
image rotation function) void the calibration information. Use
imaqWriteVisionFile()
to save the image and all of the attached calibration information to a file.