# One-Step or Two-Step Calibration and Fixturing

Vision applications often involve performing both calibration and fixturing. You almost always calibrate an image so that you can report results in real-world values. You may also create a fixtured space that tracks object features so that you can make subsequent measurements of them. If you need only an approximate calibration or if you know the exact dimensions of the part you intend to inspect, you can perform calibration and fixturing in either one or two steps. The following sections describe one- and two-step calibration and fixturing.

In one-step calibration and fixturing, you use the geometric fixturing method to create a fixtured space in physical units. Unfixtured points are typically expressed in a pixel-based space and raw fixtured points are provided in physical units. You supply known geometric measurements or coordinates of your object features, available to you from a schematic (CAD) drawing or physical model. You also enable all degrees of freedom for the fixturing calculation. A new fixtured space is recalculated from the given real-world points each time the tool runs. Because you have enabled all DOFs, the tool considers scaling and skew in the calculation: it treats the known geometric measurements as equivalent to the scaling factor that would be computed by the first step of the calibration process.

One-step calibration and fixturing works for situations where you track and test for the presence or absence of an object feature. For example, you may simply want to fixture a ROI relative to the read-only tab of a 3.5-inch computer disk. You then run a Histogram tool to analyze the brightness levels of the region and determine whether the tab is in the read-only position or not. If the ROI changes in scale, this method keeps the fixtured space always relative to the feature's location.

Note, however, that you should not attempt to measure feature distances or sizes with the one-step calibration and fixturing method, unless you are absolutely certain about the physical position of the features used for fixturing. Suppose, for instance, that you accidentally acquire an image of a 5.25-inch floppy disk. Because you have enabled all DOFs (including scaling, aspect, and skew) and supplied object-local, physical coordinates for a 3.5-inch disk, the tool adjusts the scaling factor of the resulting fixture to allow the 5.25-inch floppy to be 3.5 fixture-units in size. This may still create a fixtured space that tracks a read-only tab, but you cannot validly measure the size of the 5.25-inch floppy. If you did, the floppy would appear to have the same dimensions as the 3.5-inch disk, which obviously does not correspond to the physical size of the floppy. It does not make sense, in this case, to try to measure the physical sizes and distances between object features that were initially used to define the meaning of physical space.

Although you will rarely use one-step calibration and fixturing, you might choose it if you have not already calibrated your input image; you know the physical dimensions of your object; and you only need an approximate calibration. This last criteria may apply if you want to work in (approximate) physical units and:

- You are making only relative measurements (for example, measuring whether the disk hub is centered between the left and right edges of your floppy diskette).
- You are making nongeometric measurements (such as image brightness).

By using two-step calibration and fixturing, you can avoid the drawbacks of the one-step method. In two-step calibration and fixturing, you first perform calibration using the N-point calibration tool to map image to real-world units. You then feed the resulting output image, which has a newly attached calibrated coordinate space, to the N-point fixturing tool and use either geometric or reference fixturing to create a fixtured space. By default, the fixturing tool uses only rotation and translation to calculate the fixtured space. You have already supplied the scaling or skew factors from the calibration tool. You typically choose two-step calibration and fixturing if you need an accurate way to map image features to physical space; have previously calibrated an input image; intend to make measurements in physical space; or want to keep the calibration and fixturing operations separate, performing calibration only once at set-up time.