Ask Your Question
0

Python Camera Calibration Square Size Seems To Have No Effect

asked 2014-08-14 17:20:52 -0600

Shiania White gravatar image

updated 2014-08-16 12:16:26 -0600

In OpenCV 2.4.9, I'm using the Python camera calibration script (samples/python2/calibrate.py) to calibrate my camera. I've noticed though that the optional "square_size" parameter has no effect on the results. Am I just doing something wrong so that I'm getting no changes based on the square_size setting? Or is it just not used in this script. If so, why is it even an option? Thanks.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2014-08-16 22:58:41 -0600

updated 2014-08-17 03:04:46 -0600

Actually, camera matrix and distortion coefficients don't depend on square size. It makes sense: they are intrinsic parameters of a camera and they don't depend on particular images which you show to the camera. However, poses of the camera do depend on square size. Again it makes sense: if a chessboard filled the whole image but square size is very small then it means the camera is very close to the pattern. But if square size is large then it means the camera is farther from the pattern.

You can check it yourself by adding

print tvecs

to the end of the calibrate.py, which will print translational component of the poses.

So, if you want to get just intrinsics (camera matrix and distortion) it doesn't matter which square size you specify (you can use just the default value). If you want to get extrinsics (rvecs and tvecs, that is poses of a camera) then you should specify accurate square size to get valid results.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-08-14 17:20:52 -0600

Seen: 1,857 times

Last updated: Aug 17 '14