Error using fisheye callibration in python binding OpenCV 3.2.0

asked 2017-07-13 03:00:27 -0500

RdlP gravatar image

updated 2017-07-13 03:44:36 -0500

System information (version)

OpenCV => 3.2
Operating System / Platform => Linux / Ubuntu 15.04
Compiler => Python 3.4.3 (default, Mar 26 2015, 22:03:40) [GCC 4.9.2] on linux

When I try the following

ret, mtx, dist, rvecs, tvecs = cv2.fisheye.calibrate(object_points, image_points, gray.shape[::-1],None,None)

I get the next error

OpenCV Error: Assertion failed (objectPoints.type() == CV_32FC3 || objectPoints.type() == CV_64FC3) in calibrate, file /home/angelluis/Descargas/opencv-3.2.0/modules/calib3d/src/fisheye.cpp, line 726
Traceback (most recent call last):
  File "calibrate.py", line 59, in <module>
    ret, mtx, dist, rvecs, tvecs = cv2.fisheye.calibrate(object_points, image_points, gray.shape[::-1],None,None)
cv2.error: /home/angelluis/Descargas/opencv-3.2.0/modules/calib3d/src/fisheye.cpp:726: error: (-215) objectPoints.type() == CV_32FC3 || objectPoints.type() == CV_64FC3 in function calibrate

I know that this error ocurrs a time ago: https://github.com/opencv/opencv/issu... but I think that it was fixed (https://github.com/opencv/opencv/pull...) in addition, when I try the workaround explained in https://github.com/opencv/opencv/issu... it doesn't work

How can I run a fisheye calibration from python? (I don't want to use any extra oficial python wrapper)

Thanks

edit retag flag offensive close merge delete