Practical Notes on Camera Calibration

By A. Maghami — Nov 12, 2022

Calibration pattern

The accuracy of calibration highly depends on the accuracy of the calibration pattern/board. A good target has very accurate features in terms of geometry and distancing. It also must be perfectly flat.

Calibration distance

Calibration must be performed in the working distance of the camera. First fix the camera focus distance by adjusting the lens to get the maximum focus/sharpness in the image. Then capture calibration images by putting the target at the working distance and moving it to cover the field of view.

Calibration images

You need to capture at least 8 images from the calibration board. If you are using a wide lens, for example 8mm or lower, you will need to increase the number of images. It is safe to say between 10 to 20 images is normally enough depending on the accuracy requirements and lens complexity.

Image angles

We need two types of images from calibration board, parallel and tilted. For parallel images, move the calibration board parallel to the image plane at the working distance. You must capture enough images to cover the field of view. These images are mainly helpful for discovering the lens distortion. For tilted images, use the calibration board with an angle with respect to the image plane. The angle for checkerboard pattern can be between -45 to +45 degrees. The tilted images are crucial for finding the focal length accurately. Make sure that all images are captured at the working distance and there is no relative motion (or vibration) between the camera and the calibration board.

Lighting

The calibration board must be well lit so that the calibration algorithm can easily find the features in images with minimum noise. The light must be uniformly distributed on the calibration board. Nonuniform lighting can shift the features’ location in the image and reduce the accuracy of calibration. It is also best if the sensor exposure is set to the final value before calibrating the camera. Changing the sensor exposure after calibration can potentially reduce the accuracy.

Filters or glasses

Adding a protective glass or filter can easily change the camera parameters after calibration. Therefore, it’s best if the calibration is done after adding the filters or protective glasses.