Automatic camera pose estimation from dot pattern

George Vogiatzis and Carlos Hernández

This is a simple but convenient set of matlab scripts for calibrating an image sequence for use in multi-view stereo algorithms. It is based on the use of a planar pattern that can be printed and placed in the scene below the object that will be reconstructed. The pattern, shown below consists of black dots randomly placed on a sheet of A4. It has been especially designed to be detectable under significant occlusion and hence is very useful for obtaining camera pose in a MVS sequence without sacrificing too many pixels, or manually clicking on any points.

To use our method, just print out this pdf file and put it on a table. Then place your object on the pattern and take photographs from around the object, like those shown below.

You can then run our script to obtain camera intrinsics and pose on each image in your sequence. The script also produces visualisation of the pattern detection in each frame, as well as a plot of the whole 3d structure of the scene in the end.

The file patterncalib.zip contains a set of matlab scripts that perform fully automatic calibration (camera pose and intrinsics) from a set of images of a planar pattern (included as a pdf file).

The main calibration routine is calibseq. Its input is a filename pattern that determines which images should be operated on, as well as some optional parameter values. The output is a bundle adjusted estimate of camera intrinsics and pose per image, as well as the refined 3d positions of the dots. Due to this refinement the method can tolerate some non planarity of the pattern and the only real constraint is constant focal length througout the sequence. This will probably be relaxed in future releases.

Our calibration method also relies on J.-Y. Bouguet's Calibration Toolbox for the initial estimate of camera pose and intrinsics. You can find a version of that toolbox that has been tested with our method here, even though it will probably work with more recent versions that you can find on his website.

Finally, we have included a set of test images for you to try out here. Just unzip the file somewhere, say in "myimages", and do

      C=calibseq("myimages/house*.png");

to see the calibration method in action. At the end of the process the output variable C is a structure that contains all calibration parameters such as the calibration matrix K , camera rotation (in a 3x3 matrix R as well as a 4x1 quaternion representation Q) and translation (t) per camera as well as the homography (Hs) corresponding to each planar pattern. Also included is the refined 3d structure (pts3d) corrsponding to the optimized 3d positions of the pattern dots as well as the centers of the detected ellipses (pts2d) and the 2d-3d correspondences (matches) per image.

Installation instructions

1. Download patterncalib.zip and unzip in to some directory MYDIR

2. From within Matlab, execute

      addpath MYDIR/patterncalib

3. Download and unzip into MYDIR, J.-Y. Bouguet's Calibration Toolbox from his website. A version that we have already tested against can be found here.

4. From within Matlab, execute

      addpath MYDIR/TOOLBOX_calib

5. To test the software, download a test sequence from here and unzip the file in some directory, say "myimages".

6. From within matlab execute

      C=calibseq("myimages/house*.png");

7. To find out about syntax and options for calibseq, do

      help calibseq;

Enjoy ...

 

 

 

Copyright (2010) George Vogiatzis and Carlos Hernández Esteban