在python绑定OpenCV 3.2.0中使用鱼眼校准时出错

2024-09-30 22:19:41 发布

您现在位置:Python中文网/ 问答频道 /正文

系统信息(版本)

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

当我尝试以下方法时

^{pr2}$

我得到下一个错误

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

我知道这个错误是很久以前出现的:https://github.com/opencv/opencv/issues/5534但是我认为它已经被修复了(https://github.com/opencv/opencv/pull/6454),另外,当我尝试https://github.com/opencv/opencv/issues/5534中解释的解决方法时,它不起作用

如何从python运行鱼眼校准?(我不想使用任何额外的官方python包装器)


Tags: 方法inhttpsgithubcomhometype错误