【发布时间】:2019-01-30 16:28:54
【问题描述】:
我正在尝试使用Opencv 和Python 做fish-eye stereo calibration,起初我已经完成了单相机的立体校准
print("Calibrating left fisheye camera...")
rms, _, _, _, _ = cv2.fisheye.calibrate(objectPoints,leftImagePoints,imageSize, K_left,D_left,R,T,flags,(cv2.TERM_CRITERIA_EPS+cv2.TERM_CRITERIA_MAX_ITER, 30, 1e-6))
print("calibrating right fisheye camera...")
rms, _, _, _, _ = cv2.fisheye.calibrate(objectPoints,rightImagePoints, imageSize,K_right,D_right,R,T,flags, (cv2.TERM_CRITERIA_EPS+cv2.TERM_CRITERIA_MAX_ITER, 30, 1e-6))
但在下一步我尝试做stereofisheye calibration时:
print("calibrating both fisheye cameras together...")
(rms,K1, D1, K2, D2, R, T) = cv2.fisheye.stereoCalibrate(
objectPoints,
leftImagePoints,
rightImagePoints,
K_left,
D_left,
K_right,
D_right,
imageSize)
它正在抛出一个错误:
Traceback(最近一次调用最后一次): 文件“fisheye_calib1.py”,第 177 行,在 图片尺寸) cv2.error: OpenCV(4.0.0-pre) /home/compute/OpenCV-tmp/opencv- 3/modules/core/src/arithm.cpp:683: error: (-5:Bad argument) 当加/减/乘/除函数中的输入数组有 不同的类型,输出数组类型必须在 函数'arithm_op'
因为我是 OpenCV 的新手。我真的很困惑我应该采取什么步骤来避免这个错误。
【问题讨论】:
标签: python opencv camera-calibration fisheye