我想使用openCv校准拖车相机。我使用了自爆代码,但出现此错误
代码:
TERMINATION_CRITERIA = (cv2.TERM_CRITERIA_EPS , 30,0.001)
(_, _, _, _, _, rotationMatrix, translationVector, _, _) = cv2.stereoCalibrate(
objectPoints, leftImagePoints, rightImagePoints,
leftCameraMatrix, leftDistortionCoefficients,
rightCameraMatrix, rightDistortionCoefficients,
imageSize, None, None, None, None,TERMINATION_CRITERIA,
cv2.CALIB_FIX_INTRINSIC)
错误: cv2.CALIB_FIX_INTRINSIC,TERMINATION_CRITERIA) SystemError:新样式的getargs格式,但参数不是元组
答案 0 :(得分:0)
我相信您需要根据documentation
切换最后两个参数TERMINATION_CRITERIA = (cv2.TERM_CRITERIA_EPS , 30,0.001)
(_, _, _, _, _, rotationMatrix, translationVector, _, _) = cv2.stereoCalibrate(
objectPoints, leftImagePoints, rightImagePoints,
leftCameraMatrix, leftDistortionCoefficients,
rightCameraMatrix, rightDistortionCoefficients,
imageSize, None, None, None, None,
TERMINATION_CRITERIA, cv2.CALIB_FIX_INTRINSIC) #switched<>