Hello!
I use OpenCV-3.0 for correct fisheye image.
Follow my code
cv::Mat in(height * 3 / 2, width, CV_8UC1, pBuf);
cv::Mat out;
cv::Mat _rgb;
cv::cvtColor(in, out, CV_YUV2RGB_YV12);
cv::Matx33d K(_coefficient.fx, 0, _coefficient.cx, 0, _coefficient.fy, _coefficient.cy, 0, 0, 1);
cv::Vec4d D(_coefficient.k1, _coefficient.k2, _coefficient.k3, _coefficient.k4);
cv::fisheye::undistortImage(out, _rgb, K, D);
Unfortunately code exit with assert
OpenCV Error: Assertion failed ((P.depth() == CV_32F || P.depth() == CV_64F) && (R.depth() == CV_32F || R.depth() == CV_64F)) in initUndistortRectifyMap, file /opencv/modules/calib3d/src/fisheye.cpp, line 409
I not understand reason this assert because I think what I set correct K and D variables.
How can I solve this problem?
Thank you and excuse my bad english.