Camera Calibration Toolbox for Matlab

|
This is a release of a Camera Calibration Toolbox for Matlab® with a complete documentation. This document may also be used as a tutorial on camera calibration since it includes general information about calibration, references and related links. Please report bugs/questions/suggestions to Jean-Yves Bouguet at jean-yves.bouguet@intel.com.
The C implementation of this toolbox is included in the Open Source Computer Vision library distributed by Intel and freely available online.
System requirements
This toolbox works on Matlab 5.x and Matlab 6.x (up to Matlab 6.5) on Windows, Unix and Linux systems (platforms it has been fully tested) and does not require any specific Matlab toolbox (for example, the optimization toolbox is not required). The toolbox should also work on any other platform supporting Matlab 5.x and 6.x.
Getting started
- Go to the download page, and retrieve the latest version of the complete camera calibration toolbox for Matlab.
- Store the individual matlab files (.m files) into a unique folder TOOLBOX_calib (default folder name).
- Run Matlab and add the location of the folder TOOLBOX_calib to the main matlab path. This procedure will let you call any of the matlab toolbox functions from anywhere. Under Windows, this may be easily done by using the path editing menu. Under Unix or Linux, you may use the command path or addpath (use the help command for function description).
- Run the main matlab calibration function calib_gui (or calib).
A mode selection window appears on the screen:
 This selection window lets you choose between two modes of operation of the toolbox: standard or memory efficient. In standard mode, all the images used for calibration are loaded into memory once and never read again from disk. This minimizes the overall number of disk access, and speeds up all image processing and image display functions. However, if the images are large, or there are a lot of them, then the OUT OF MEMORY error message may be encountered. If this is the case, the new memory efficient version of the toolbox may be used. In this mode, every image is loaded one by one and never stored permanently in memory. If you choose to run the standard version of the toolbox now, you can always switch to the other memory efficient mode later in case the OUT OF MEMORY error message is encountered. The two modes of operation are totally compatible (for input and output) and interchangeable.
Since both modes have the exact same user interface, in the context of this documentation, let us select the standard mode by clicking on the top button of the window. The main calibration toolbox window appears on the screen (replacing the mode selection window):
 Note that the mode selection step can be bypassed altogether by directly running calib_gui(0) for the normal mode or calib_gui(1) for the memory efficient mode (try help calib_gui for more information).
- You are now ready to use the toolbox for calibration.
Calibration examples
-
This section takes you through a complete calibration example based on a total of 20 (and 25) images of a planar checkerboard. This example lets you learn how to use all the features of the toolbox: loading calibration images, extracting image corners, running the main calibration engine, displaying the results, controlling accuracies, adding and suppressing images, undistorting images, exporting calibration data to different formats... This example is highly recommended for someone who is just starting using the toolbox.
-
This section shows you how to use the main calibration engine on Zhengyou Zhang's data in a scripting mode. After going through that example, you will also know how to change the intrinsic camera model by choosing which parameters to optimize. This example is highly recommended for someone who intends to use the main calibration engine in their own matlab script files.
-
Another calibration example on Heikkil䧳 data that demonstrates that the main optimization engine also works when the calibration rig is non-planar. Try it, it takes only 30 seconds to run!
-
Another similar calibration example that runs the main optimization engine on Bakstein and Halir's data. Try it!
-
This example shows how to use the toolbox for calibrating a stereo system (intrinsically and extrinsically), rectifying stereo images, and performing 3D stereo triangulation. A new stereo toolbox called by stereo_gui is demonstrated.

-
This example gives a quick demonstration of the script merge_two_datasets.m that lets you easily combine two calibration datasets of the same camera created independently.
After calibration, the list of parameters may be stored in the matlab data file Calib_Results.mat by clicking on Save. This section gives a detailed description of all the calibration parameters (Intrinsic and Extrinsic) and their corresponding matlab variable names. In addition, one to one correspondences between our notation and Heikkil䧳 and Willson's notations are given.
This sections gives a short description of all the main functions in the calibration toolbox.
This section contains some information regarding the initial steps of calibration: designing the calibration rig, naming the calibration images, image formats to use,... Very useful to get started. For the lazy ones, a calibration pattern is even provided!
This section contains a list of features that have been added to the toolbox since the first release of the documentation.
A list of reference papers that were used to design that toolbox.
A short list of links related to camera calibration.
Jean-Yves Bouguet MRL - Intel Corp. Last updated August 10th, 2005
Back to main page |