# How to verify the correctness of calibration of a webcam

i am totaly new to camera calibration techniques...i am using OpenCV chessboard technique...i am using a webcam from Quantum...here are my observations and steps...

1. i have kept each chess square side = 3.5 cm. It is a 7 x 5 chessboard with 6 x 4 internal corners. i am taking total of 10 images in differnet views/poses at a distance of 1 to 1.5 mtr from the webcam
2. i am following the C code in Learning OpenCV by Bradski for the calibration. my code for calibration is cvCalibrateCamera2(object_points,image_points,point_counts,cvSize(640,480),intrinsic_matrix,distortion_coeffs,NULL,NULL,CV_CALIB_FIX_ASPECT_RATIO);
3. before calling this function i am making the first and 2nd element along the diagonal of the intrinsic matrix as one to keep the ratio of focal lengths constant and using CV_CALIB_FIX_ASPECT_RATIO
4. with the change in distance of the chess board from the webcam the fx and fy are changing with fx:fy almost equal to 1. there are cx and cy values in order of 200 to 400. the fx and fy are in the order of 300 - 700 when i change the distance.
5. presently i have put all the distortion coeficients to zero because i didnot get good result including distortion coeffs. my original image looked handsome than the undistorted one!!

am i doing the calibration correctly? will i use any other option than CV_CALIB_FIX_ASPECT_RATIO? if yes which one?

edit retag close merge delete

Sort by » oldest newest most voted

Well,well,well. I am also a totally new to camera calibration techniques.But I still hope my words can help you.

1. Learning OpenCV is an older edition ,based on OpenCV 1.0. If you want to use the new OpenCV functions, I think you should follow the online documentions. And you also can find it in ../build/doc/.(but I dont know why, I cant find it in the OpenCV 3.0);
2. The function calirateCamera() returns a value , called rms(reprojection error) which can tell you your calibration precision. The rms should be between 0.1~1,with best something <0.5.
3. And there are some calibration samples in ../opencv/sources/samples/cpp,you can try it first when you write your own code.
4. There are some tips @StevenPuttemans gave me, and I think it may be useful to you.
• Make sure the dimensions of your calibration pattern are uneven.
• Make sure you have enough calibration images, using 2 images will never yield a good camera calibration.
• Be sure to calibrate every single region of your camera range, if not, you will have large deformations towards the non calibrated areas.
more

Hi, There are some methods reported in literature for example try googling: A Comparative Review Of Camera Calibrating Methods with Accuracy Evaluation and you can also refer Accuracy assesment section of Tsai's seminal paper were he proposes such tests: A versatile camera calibration technique for high accuracy 3d machine vision metrology using off-the-shelf tv cameras and lenses (1987). Further, you can refer section-2 in paper : Accuracy Improvement in Camera Calibration by FaJie Li, Qi Zang and Reinhard Klette, which also mentions some approaches for evaluating camera calibration accuracy.

more

Official site

GitHub

Wiki

Documentation