Camera calibration for distortion correction

asked 2015-10-26 05:47:52 -0600

Hello everybody, First, I figured out some problems in understanding the distortion correction in openCV. In different sources one can find different formulas to discribe the distortion: http://docs.opencv.org/doc/tutorials/... http://docs.opencv.org/master/dc/dbb/...

The first 4 equations in both tutorials are different from each other, as one describes the corrected pixel coordinates and the other one describes the distorted ones. This discrepancy can also be found in different books, theses and dissertations. Can anyone explain where it comes from?

Second, I am wondering what are typical values for the distortion vector in just slightly distortet pictures? The distortion in my picture is not visible - it matters for measurements anyways. Nevertheless the calculated distortion vector elements vary between 10^-2 and 10^+4! I am wondering how theses values can be that big. Any ideas?

Furthermore, there is another issue for me in understanding the camera matrix as reportet in both links: f_x and f_y are almost identical in my case, but far far away from the real focal length in mm. Is there any scalining factor to compare both in order to validate the matrix result? Passing the matrix to calibrationMatrixValues() gives me a focal length about 3 times bigger than the actual focal length of my camera.

I'd be really greatful for answers on any of the issues above :) Best regards Daniel

edit retag flag offensive close merge delete

Comments

  • It seems for me that the correct formulation is x_d = x * (dist_tangential) (same for the radial distorsion) as it is the formulation in A Flexible New Technique for Camera Calibration and someone has submitted a possible erratum.

  • 10^4 is definitely not correct for a standard camera. Some example of intrinsic parameters (for the Kinect, for a GoPro).

  • Did you check the value and the unit you used for the size of a square in the calibration pattern ?
Eduardo gravatar imageEduardo ( 2015-10-26 12:53:35 -0600 )edit