Camera Calibration Toolbox for Matlab
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:
camera_calib1.tif
camera_calib2.tif
camera_calib3.tif
camera_calib4.tif
camera_calib5.tif
camera_calib6.tif
camera_calib7.tif
camera_calib8.tif
camera_calib9.tif
camera_calib10.tif
camera_calib11.tif
camera_calib12.tif
camera_calib13.tif
camera_calib14.tif
camera_calib15.tif
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:
camera_calib01.tif
camera_calib02.tif
camera_calib03.tif
camera_calib04.tif
camera_calib05.tif
camera_calib06.tif
camera_calib07.tif
camera_calib08.tif
camera_calib09.tif
camera_calib10.tif
camera_calib11.tif
camera_calib12.tif
camera_calib13.tif
camera_calib14.tif
camera_calib15.tif
More slots may be used as well. For example, the following file names would still work:
camera_calib0001.tif
camera_calib0002.tif
camera_calib0003.tif
camera_calib0004.tif
camera_calib0005.tif
camera_calib0006.tif
camera_calib0007.tif
camera_calib0008.tif
camera_calib0009.tif
camera_calib0010.tif
camera_calib0011.tif
camera_calib0012.tif
camera_calib0013.tif
camera_calib0014.tif
camera_calib0015.tif
Yet, another valid naming scheme for the 15 calibration images could be:
camera_calib00123.tif
camera_calib00124.tif
camera_calib00125.tif
camera_calib00126.tif
camera_calib00126.tif
camera_calib00128.tif
camera_calib00129.tif
camera_calib00130.tif
camera_calib00131.tif
camera_calib00132.tif
camera_calib00133.tif
camera_calib00134.tif
camera_calib00135.tif
camera_calib00136.tif
camera_calib00137.tif
- Calibrate: Run the matlab calibration tool as it is presented in the first example.
Back to main calibration page