littlecat
littlecat

Reputation: 51

FishEye lens calibration with OpenCv 3.0

I have to calibrate my camera with a Fisheye lens.

First I used OpenCv 2.4 with the flag CV_CALIB_RATIONAL_MODEL to get better results but it wasn't enough. After, I have seen that OpenCv 3.0 have fisheye function for calibration.

I compute my objectPoints and get my imagePoints with findChessboardCorners(), they seem correct.

My problem is after, with fisheye::calibrate. My returned values such as reprojection error, intrinsic matrix and distorted coefficients are wrong. They are -nan values.

Does anyone have any idea what I'm doing wrong?

Thanks

Upvotes: 4

Views: 7079

Answers (1)

James Johnston
James Johnston

Reputation: 9492

For new OpenCV 3.0 fisheye functions, I found I did not get a usable intrinsic calibration unless cv::fisheye::CALIB_RECOMPUTE_EXTRINSIC flag was specified (e.g. 38 pixel reprojection error). Also, I was specifying cv::fisheye::CALIB_FIX_SKEW. Of course, you should specify as many cv::fisheye::CALIB_FIX_Kx flags as you can.

For my lens, which is a very simple, miniature lens but with big radial distortion, the normal OpenCV rectification functions did not yield accurate rectifications. I was able to get good results with the above flags and fixing K2=K3=K4=0.

Upvotes: 3

Related Questions