OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Sat, 06 Aug 2016 18:23:20 -0500Distortion camera matrix from real datahttp://answers.opencv.org/question/99689/distortion-camera-matrix-from-real-data/I have a camera for which I have exact empiric data 'image height in mm' vs. 'field angle'.
Field angle(deg) Image Height (mm)
0 0
0.75 0.035
1.49 0.071
2.24 0.106
2.98 0.142
3.73 0.177
...
73.85 3.831
74.60 3.875
Interestingly, the following formula is a good approximation of this set of data (at least until 50 degrees for a 5% maximum error):
height = 5.45 * sin(angle / 2)
I would be interested to know if the presence of "sin" (and not "tan") means a radial or tangential distortion.
*** MY QUESTION ***
Anyway, my problem is that I'm using OpenCV solvePnP so I need to find out the distortion camera matrix. This matrix factors in radial distortion and slight tangential distortion. It's defined by:
[![OpenCV distortion camera matrix][1]][1]
as explained here:
http://docs.opencv.org/2.4/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html
I have guessed this matrix with OpenCV calibrateCamera but the result is not so precise and the coefficients change depending of the calibration image. Therefore, I would like to calculate this intrinsic matrix based on the set of data.
How can I figure out the distortion camera matrix coefficients from this set of real data?
[1]: http://i.stack.imgur.com/qqaCg.pnggregoiregSat, 06 Aug 2016 18:23:20 -0500http://answers.opencv.org/question/99689/