Fisheye undistortion with python error
Could someone please explain me what is the -215 error? I get this error trying to call cv2.fisheye.calibrate() This is the output: cv2.error: /home/dima/OpenCV/opencv/modules/calib3d/src/fisheye.cpp:695: error: (-215) objectPoints.type() == CV_32FC3 || objectPoints.type() == CV_64FC3 in function calibrate
Also I would appreciate if one could show me any example of doing fisheye routines in python. Thanks a lot for any help!
Yes, I'm looking for the same kind of examples of how to use the fisheye camera model calibration in Python. I was looking at the source code in version 3 RC1 in the github master branch and the python bindings seem to be exposed for those functions in the header file at
opencv/modules/calib3d/include/opencv2/calib3d.hpp
. I will confirm later when I install the latest head from source.I tried adding a bracket around my image_points and object_points to change their imensions. That gave another error.
I would really like to see a working python-opencv3.0 example of fisheye calibration.
I'm experiencing the same problem here. I tried the brackets [] like TAX has, and it gets the function past the CV_ASSERT block. But causes it to fail elsewhere
(a_size.width == len) in cv::gemm in core\src\matmul.cpp
- which makes me suspect that brackets aren't a real solution.My finger is pointed at the opencv python bindings in
opencv/modules/python/src2/cv2.cpp
. I suspect the numpy ndarrays not being converted correctly. But then again, why does non-fisheye calibration still work with these same bindings?I'd really appreciate someone with python-c++ binding experience to weigh in.
Following the comments in issue 5534 I wrote a small wrapper around the python bindings that seems to give a workaround. You can try it: pyfisheye.