Ask Your Question

Revision history [back]

A possible solution is to initialise the variables before calling cv::fisheye::calibrate():

rvecs.resize(imagePoints.size(), cv::Mat(1, 1, CV_64FC3));
tvecs.resize(imagePoints.size(), cv::Mat(1, 1, CV_64FC3));

A sample of the undistortion after calibration:

original

undistorted