Ask Your Question

Revision history [back]

Camera calibration for distortion correction

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/calib3d/camera_calibration/camera_calibration.html http://docs.opencv.org/master/dc/dbb/tutorial_py_calibration.html#gsc.tab=0

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