1

I have some images with fisheye distortion and their corresponding CAVHORE calibration files. I want to have the images undistorted, using OpenCV (namely cv2.fisheye.undistortImage) for now, which needs the intrinsic matrix K and distortion coefficients D.

I have been reading about camera models and their conversions. It seems constructing K is pretty easy (Section 2.2.4) when there is no radial distortion, but getting distortion coefficients D and solving for KRCr is not straightforward. Experimentally I played with the image with no radial distortion assumption and constructed K from given H_* and V_* parameters. The result is undistorted but not perfect.

The question is, given a calibration file as below, is there any formula or approximation to obtain the distortion coefficients? Or, is there an easier way to undistort using CAVHORE parameters?

Codebase, formula, pointer, anything is appreciated, thanks.

Example CAVHORE file:

C =     -0.000000     -0.000000     -0.000000
A =      0.000000     -0.000000      1.000000
H =   2080.155870      0.000000   3010.375794
V =     -0.000000   2078.727106   1932.069537
O =      0.000096      0.000068      1.000000
R =      0.000000     -0.040627     -0.004186
E =     -0.003159      0.004129     -0.001279

...

Hs    =   2080.155870
Hc    =   3010.375794
Vs    =   2078.727106
Vc    =   1932.069537
Theta =     -1.570796 (-90.000000 deg)
ilke444
  • 2,641
  • 1
  • 17
  • 31

0 Answers0