Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

camera calibration MATLAB toolbox

I have to perform re-projection of my 3D points (I already have data from Bundler).

I am using Camera Calibration toolbox in MATLAB to get the intrinsic camera parameters. I got output like this from 27 images (chess board; images are taken from different angles).

Calibration results after optimization (with uncertainties):

Focal Length:     fc = [ 2104.11696  2101.75357 ] ± [ 23.13283  22.92478 ]
Principal point:  cc = [  969.15779   771.30555 ] ± [ 21.98972  15.25166 ]
Skew:        alpha_c = [  0.00000 ] ± [ 0.00000  ]
Distortion:       kc = [  0.11555  -0.55754  -0.00100  -0.00275  0.00000 ] ± 
                       [ >0.05036   0.59076   0.00307   0.00440  0.00000 ]
Pixel error:     err = [  0.71656   0.63306 ]

Note: The numerical errors are approximately three times the standard deviations (for reference).

I am wondering about the numerical errors i.e. Focal length error +- [23.13283 22.92478] , principal point error etc. What these error numbers actually represent and what are their impact??

The pixel error is really less.

So far I use the following matrix from above data for my re-projection:

K=[ 2104.11696 0 969.15779; 0 2101.75357 771.30555;0 0 1]

The above matrix "K" seems right to me. Correct me if I am doing something wrong...

Will be waiting for your replies.

like image 620
user1388142 Avatar asked Oct 02 '12 08:10

user1388142


1 Answers

There are two kinds of errors here.

One is the reprojection errors. Once you calibrate a camera, you use the resulting camera parameters to project the checkerboard points in world coordinates into the image. Then the reprojection erros are the distances between those projected points and the detect checkerboard points. The acceptable value for the reprojection errors depends on your application, but a good rule of thumb is that the mean reprojection error should be less than 0.5 of a pixel.

The other kind of errors are those +/- intervals you get for each estimate parameter. Those are based on the standard errors resulting from the optimization algorithm. The values that the Bouguet's Camera Calibration Toolbox gives you are actually 3 times the standard error, which corresponds to 99.73% confidence interval. In other words, if the Camera Calibration toolbox reports the focal length error as +- [23.13283 22.92478], then the actual focal length is within that interval of your estimate with the probability of 99.73%.

The reprojection errors give you a quick measure of the accuracy of your calibration. The standard errors - let's call them estimation errors - are useful for a more careful analysis of your results. For example, you should try excluding calibration images that have high mean reprojection error. On the other hand, if your estimation errors are high, you can try adding more calibration images.

By the way, the Computer Vision System Toolbox now includes a GUI Camera Calibrator app that makes camera calibration much easier. There is also a good explanation of the reprojection errors in the documentation.

like image 53
Dima Avatar answered Sep 21 '22 18:09

Dima