Main Content

Prepare Camera and Capture Images For Camera Calibration

Follow the Camera Setup tips and Capture Images instructions to avoid problematic calibration results. If these tips and instructions are not followed or if the calibration images you use are of poor quality, it can result in one or more of these calibration problems:

  • Incorrect image undistortion for single cameras

  • Incorrect image rectifications for stereo cameras

  • Inaccurate estimation of camera parameters, such as focal length, principal point, distortion coefficients, and so on, ...

  • Inaccurate depth estimations using stereo cameras.

Camera Setup

Follow these tips to set up your camera for camera calibration:

  • Capture the images with a fixed focus by disabling the autofocus of the camera. Set the focus of the camera for your application.

  • Place the calibration pattern at such a distance from the camera that at least 20% of the image is covered by pattern.

  • If capturing images using a stereo camera pair, place the pattern in different orientations such that it is fully visible from both cameras of the stereo camera pair.

  • Keep in mind that changing the zoom setting between images, changes the focal length.

Capture Images

For greater calibration accuracy and results, use a minimum of 10 to 20 images of the calibration pattern. The calibrator requires at least three images. Use uncompressed images or images in lossless compression formats such as PNG. For greater calibration accuracy:

  • Check that the calibration pattern was not distorted after printing. For more details about printing a calibration pattern, see Supported Patterns.

  • Place or mount calibration patterns on a rigid surface.

  • Ensure that there is a white border surrounding the calibration pattern. The border should be at least as large as one grid element of the pattern. Failure to ensure the white border might result in unsuccessful detection under certain lighting conditions.

  • Capture the images of the pattern at a distance roughly equal to the distance from your camera to the objects of interest. For example, if you plan to measure objects from 2 meters, keep your pattern approximately 2 meters from the camera.

  • Place the pattern at an angle less than 45 degrees relative to the camera plane.

    Pattern at zero-to-forty-five degrees relative to the camera plane.

  • Do not modify the images For example, do not crop them.

  • Do not use autofocus or change the zoom settings between images.

  • Capture the images of the calibration pattern at different orientations relative to the camera. For more information on calibration patterns, see Calibration Patterns.

  • Capture a variety of images of the pattern to account for as much of the image frame as possible. Lens distortion increases radially from the center of the image, and is not always uniform across the image frame. To capture this lens distortion, the pattern must include areas near the edges of the captured images.

    Checkerboard pattern images, with the calibration pattern covering space near the edged of the images.

The calibrator works with a range of pattern sizes. As a general rule, your pattern should fill at least 20% of the captured image. For example, these images have been taken with a checkerboard square size of 108 mm:

On the left, a diagram of camera position relative to grouped checkerboard images. On the right, eight images of a checkerboard pattern in different orientations, taking up most of the image frame.