# Image Warping

When you use the Checkerboard calibration tool in nonlinear mode, the tool computes a mathematical representation of any perspective, radial, and aspect ratio distortion present in the calibration image. Because other VisionPro tools can only make use of linear transformations, the Checkerboard calibration tool does not attempt to add these nonlinear transformations to the run-time image's coordinate space tree. Instead, the tool warps the acquired image itself, so that the effect of the nonlinear distortion is removed.

The following figure shows the effect of typical optical distortion on an acquired image of a checkerboard-style calibration plate:

The Checkerboard calibration tool works by locating tile vertices in the supplied image. A tile vertex is the point where the corners of four tiles meet. Using tile vertices provides more accurate calibration results than using the centers of dots or other image features which can themselves become distorted.

At calibration time, the tool computes the nonlinear transformation between the tile vertices in raw calibrated space (the real-world locations based on the tile size you specify and the plate origin) and the tile vertices located in the acquired image. At run time it uses this transformation to warp the pixels in the acquired run-time image to remove the distortion, as shown in the following figure:

In addition to warping the run-time image, the Checkerboard calibration tool also optionally constructs a CogTransform2DPerspectiveAndRadial object that represents the nonlinear transformation. While you should not add this transformation to a coordinate space tree, you can use it to map points between the selected space of the input image and raw calibrated space.