Ask Your Question
2

How to verify the correctness of calibration of a webcam

asked 2012-10-09 07:35:38 -0600

rotating_image gravatar image

updated 2012-10-11 07:08:44 -0600

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 flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2012-12-08 06:29:32 -0600

pranav gravatar image

updated 2013-01-02 05:29:21 -0600

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.

edit flag offensive delete link more
3

answered 2016-01-30 09:42:07 -0600

german_iris gravatar image

updated 2016-01-30 10:02:13 -0600

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.
edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2012-10-09 07:35:38 -0600

Seen: 4,379 times

Last updated: Jan 30 '16