校准立体相机时出错
Error while calibrating stereo camera
我想使用 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)
error:
cv2.CALIB_FIX_INTRINSIC,TERMINATION_CRITERIA)
SystemError: new style getargs format but argument is not a tuple
我认为您需要根据 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<>
我想使用 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)
error: cv2.CALIB_FIX_INTRINSIC,TERMINATION_CRITERIA) SystemError: new style getargs format but argument is not a tuple
我认为您需要根据 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<>