# Destination Rectangle

When the Checkerboard calibration tool warps a run-time image, it takes steps to make sure that all of the information present in the acquired run-time image is also present in the warped image. It does this by performing the image warping in the following steps.

1. It transforms the bounding rectangle of the acquired image using the calibration transformation computed during the Calibration phase. The result of this transformation is a non-rectangular shape.
2. It computes the bounding rectangle that encloses the transformed shape. This becomes the bounds of the destination image.
3. It transforms the center points of each pixel in the destination image (computed in the previous step) to the corresponding point in the run-time image.
4. The tool samples the run-time image at each of these sampling points to compute the pixel values in the warped image.

The following figure shows the image warping process:

Note that as a result of this process, certain pixels in the warped image are undefined or unfilled. That is, there was no corresponding location in the run-time image from which to sample pixels. By default, the tool simply fills these values with an arbitrary pixel value (128), and it also provides you with a mask image that corresponds to these pixels.

Alternatively, the tool lets you specify a destination rectangle for the warping process. This lets you prevent the creation of any regions of undefined pixel values, at the cost of discarding parts of the acquired run-time image. You can specify this rectangle using a warped version of the original calibration image, making it easy to select the correct part of the image, as shown in the following figure:

Regardless of how you generate the warped image, be aware VisionPro does not support images that contain more than 32767 rows or 32767 columns of pixels. Since the warped image size depends on the degree of warping in the calibration image, you might need to experiment with the maximum calibration image size that will not produce a warped image that exceeds 32767 in row or column size.