
Chapter6 Calibration
IMAQVision for LabWindows/CVI User Manual 6-10 ni.com
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
imaqWriteVisionFile()to save the image of the grid and its associated
calibrationi nformation to a file. To read the file containing the calibration
informationuse imaqReadVisionFile(). For more information a bout
attaching the calibration information you read from another image, see the
Attach Calibration Information section.
Attach Calibration InformationNow that you have calibrated your setup correctly, you can apply
the calibration settings to images that you acquire. Use
imaqCopyCalibrationInfo()to attach the calibratio ni nformation of
thecurrent setup to each image you acquire. This function takes in a source
image containing the calibration information and a destination image that
youwant to calibrate. The destination imag ei s your inspection image with
the calibration information attached to it.
Usingthe calibration information attached to the image, you can accurately
convertpixel coordinates to real-world coordinates to make any of the
analytic geometry measurements with
imaqTransformPixelToRealWorld().If your application requires that
you makeshape m easurements, correct the image by removing distortion
withimaqCorrectImage().
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
imagerotation function) void the calibration information. Use imaqWriteVisionFile()
to savethe image and all of the attached calibration informat ion to a file.