Figure 6-7. defining a simple calibration, Save calibration information, Attach calibration information – National Instruments IMAQTM User Manual

Page 95

Advertising
background image

Chapter 6

Calibrating Images

IMAQ Vision for Visual Basic User Manual

6-10

ni.com

Figure 6-7. Defining a Simple Calibration

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

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 Information

When you finish calibrating the setup, you can apply the calibration
settings to images that you acquire. Use

CWIMAQVision.SetCalibrationInformation

to attach the

calibration information of the current setup to each image you acquire.
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 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

1

Origin

X

Y

dy

1

dx

Advertising