calibrateCamera fails with large world coordinates

asked 2017-11-08 09:45:12 -0500

Ibex gravatar image


I'm trying to use the calibrateCamera method. I have a guess on the intrinsics parameters and a set of corresponding 3D-2D points.

When I use 3D points that are in the range of [0:100] the method is working well and gives good results.

Now I have a set of points which X and Y values of 3D points are around 1e6 and Z around 2000 (like Lambert 93 coordindates), the method fails and give irrelevant calibration. It looks like there is no data normalization in calibrateCamera.

I tried to apply a simple normalization to the 3d coordinates by applying a similarity matrix U (scaling and translating 3D coordinates), then compute calibration and multiply the similarity matrix by the projection matrix (given by calibrateCamera) to get the final projection matrix which transforms the raw 3D points (This is something described in Hartley and Zisserman's book but for the dlt) . But this is not working.

Do I have to modify the given distortion coefficient? Should I apply another type of data normalization?

Thank you!

edit retag flag offensive close merge delete


Try centering the data. Just subtract the average world point value from all of them, then add it back to the tvec.

Tetragramm gravatar imageTetragramm ( 2017-11-08 18:34:56 -0500 )edit