Camera Calibration Toolbox for Matlab
Doing your own calibration
In order to run your own camera calibration, you need to execute the following preliminary steps:
- Generate the calibration rig: Generate
and print a checkboard pattern. Then paste it on a flat panel. You
may want to make the pattern yourself or download our pattern file in
either eps or pdf
format. In this pattern, each square is 30mm x 30mm. Yet, after
printing, the actual printed squares may not be of that size (due to
distortions induced by the printer). Therefore, we HIGHLY recommend
you to measure the X and Y sizes of the printed squares, and use
those figures during calibration. To make the program use those
measured sizes by default, you may want to change the values of the variables
dX_default and dX_default in the matlab files
click_calib.m and click_calib_no_read.m (in the TOOLBOX_calib folder).
This is optional however.
- Generate the calibration
images: Acquire any number of images (no maximum number),
and save them in a common folder in either format: ras, bmp, pgm, ppm,
tif or jpg. The image file names must start with a common basename,
followed by a number (all numbers must be in sequence with step one),
and the file extension (ras, bmp, pgm,
ppm, tif or jpg).
Example: If 15 tif images are used for calibration, with basename camera_calib, then the file names may be:
The first image number may be anything (1, 0 or anything else). We recommend however to use '1' for the first image.
Another numbering may be used if one chooses to reserve a fixed number of character spaces for the numbers.
For example, if two fixed slots are reserved in the previous case, the file names become:
More slots may be used as well. For example, the following file names would still work:
Yet, another valid naming scheme for the 15 calibration images could be:
- Calibrate: Run the matlab calibration tool as it is presented in the first example.
Back to main calibration page