How to make fisheye undistort getting the full image?

asked 2018-10-01 03:47:33 -0500

arc gravatar image

I am having the same issue with https://stackoverflow.com/questions/3...

But did not get the correct result from the answers.

I tried:

cv::fisheye::undistortImage(distort,
                            undistort,
                            intrinsicMatrix,
                            distortionCoeffs,
                            intrinsicMatrix);

and

cv::fisheye::initUndistortRectifyMap(intrinsicMatrix,
                                     distortionCoeffs,
                                     cv::Matx33d::eye(),
                                     intrinsicMatrix,
                                     distort.size(),
                                     CV_16SC2,
                                     map1,
                                     map2);

cv::remap(distort, undistort, map1, map2, cv::INTER_LINEAR);

I find increase distort.size() did work, scale the output image. But I want to display the complete image(not adjust the size). Is there a standard official demo for fisheye? or a normal default way to undistort the entire image not only the centre part.

BTW What is parameter R Rectification transformation of initUndistortRectifyMap?

edit retag flag offensive close merge delete