National Instruments IMAQTM Digital Camera User Manual


 
Chapter 6 Calibrating Images
© National Instruments Corporation 6-3 IMAQ Vision for Visual Basic User Manual
Defining a Reference Coordinate System
To express measurements in real-world units, you must define a
coordinate system in the image of the grid. Use
CWIMAQLearnCalibrationOptions.CalibrationAxisInfo
to define a coordinate system by its origin, angle, and axis direction.
The origin, expressed in pixels, defines the center of the coordinate system.
The angle specifies the orientation of the coordinate system with respect to
the angle of the topmost row of dots in the grid image. The calibration
procedure automatically determines the direction of the horizontal axis in
the real world. The vertical axis direction can either be indirect, as shown
in Figure 6-2a, or direct, as shown in Figure 6-2b.
Figure 6-2. Axis Direction in the Image Plane
If you do not specify a coordinate system, the calibration process defines a
default coordinate system. If you specify a grid for the calibration process,
the software defines the following default coordinate system, as shown in
Figure 6-3:
1. The origin is placed at the center of the left, topmost dot in the
calibration grid.
2. The angle is set to 0°. This aligns the x-axis with the first row of dots
in the grid, as shown in Figure 6-3b.
3. The axis direction is set to indirect using
CWIMAQCoordinateSystem.AxisOrientation=
cwimaqAxisOrientationIndirect
. This aligns the y-axis to the
first column of the dots in the grid, as shown in Figure 6-3b.
X
Y
X
Y
a. b.