Tele-Immersion : EasyCal
Home | People | Research | Publications | Multimedia | Download | Links
  EasyCal Camera Calibration ToolBox

Joao P. Barreto, Kostas Daniilidis, Nikhil Kelshikar, Rana Molana, Xenophon Zabulis
Contact Email: /

Click Here to download the Toolbox and dot extractor. The EasyCal Toolbox can be used to calibrate a large cluster of cameras easily eliminating the need to click tediously on multiple images. The basic idea behind this notion is to propagate the Euclidean calibration obtained using the Camera Calibration Toolbox by Jean-Yves Bouguet from a subset of cameras to a larger number of cameras. A brief mathematical basis is available here.

Image Requirements:
A typical image would look like this. You will need to acquire a sequence of atleast 1000 images (ideally 5000) at a high acquisition rate (>=15fps). To acquire the data set the room lighting should be turned off and images should be acquired. Try and move the point light source so that it covers the entire acquisition area.

Apart from point images we need images using the checkerboard pattern from at least 2 cameras. You should acquire 640x480 size images from two cameras out of the entire cluster. 40 images per camera should be sufficient. Follow the rules for grabbing images for the bouguet calibration toolbox. A thing to note would be that we desire a large baseline between these cameras.

Download the zip file. There are two directories under DotCalib viz.

  1. CalibToolbox
  2. lasercalib

Dot Extractor:
the directory lasercalib contains the Visual Studio Project (.NET 2003) for extracting the dots using the saved PGM files. To execute simply run
Release\lasercalib 50 5000 1 c:\data\lasercalib_ 0
will accept a threshold of 50 for the intensity, which implies any pixel over intensity value 50 will be considered the dot. We save the extent of the dot and use the values to accept / reject its use in calibration. numimages is the number of images in the sequence and camnum is the camera number. prefix is the image name prefix which will be 'c:/data/dot'. camtype = 1 for color images(ppm files), else it will assume grayscale pgm files. Repeat this for all the cameras you wish to calibrate. The program will write a file like c01.txt, c02.txt, etc. for each camera.
We are now ready for the next step which is final calibration.

Under Matlab change to the CalibToolbox directory. You will have to edit the GoCalib script. Following things need to changed in the GoCalib script to adapt to your enviornment:

  1. rootdir Set rootdir variable to point to actual location where the CalibToolbox directory is located. We do this to add the appropriate matlabpath's.
  2. numcams Set numcams to the total number of cameras you wish to calibrate.
  3. cams2cal cams2cal should be reflect the camera numbers of the (2) cameras you will be clicking on to propagate their Euclidean calibration to rest of the cameras. If you use camera numbers 5 and 11 set cams2cal = [5 11].
  4. imageoutputdir Output dir for the Bouguet Calibration parameters
  5. imageinputdir Input dir for the Bouguet Calibration images
  6. imrootname Prefix of the image names cal_ will be the prefix for cal_c04f004.pgm
  7. format_bw Image format for grayscale images
  8. format_col Image format for color images
  9. dX, dY Check size along X and Y axis (same as for old bouguetcal)
  10. inputdir The directory where you have saved all the ouput files from the dot extractors
That should be the settings you need to make and then you are ready for the calibration. Run GoCalib. Happy clicking on the two or more cameras you might have selected. After you are finished clicking it will calibrate the rest and give you the output in a matrix MMCal. This is a collection of all the projection matrices for all the cameras. MMCal is our own format for storing the matrix. You can use the function litem to extract indiviual matrices as follows:

P1 = litem(MMCal,1);
P2 = litem(MMCal,2);
, and so on..
Remember the first and the second rows are interchanged as against the standard format for Projection Matrices. So if you are not used to this particular format you might have to interchange them.

We will be updating this document. Currently we do not estimate radial distortion parameters or account for them. We should be able to do that soon.

Home | People | Research | Publications | Multimedia | Download | Links

Site Managed by Nikhil Kelshikar
Last Updated on 07/03/03.