gpt4 book ai didi

Python - OpenCV 模块缺少属性 CV_CALIB_FIX_INTRINSIC

转载 作者:太空宇宙 更新时间:2023-11-03 22:48:52 28 4
gpt4 key购买 nike

我正在使用 OpenCV 对相机进行立体校准。我已经对各个相机进行了校准。根据这个 documentation , 指定预先计算的相机矩阵和畸变系数需要通过标志CV_CALIB_FIX_INTRINSIC

If the intrinsic parameters can be estimated with high accuracy for each of the cameras individually (for example, using calibrateCamera() ), you are recommended to do so and then pass CV_CALIB_FIX_INTRINSIC flag to the function along with the computed intrinsic parameters.

但是如何传递标志?我尝试过的值:

flags="CV_CALIB_FIX_INTRINSIC"
flags=cv2.CV_CALIB_FIX_INTRINSIC
flags=CV_CALIB_FIX_INTRINSIC

我收到以下错误(分别):

TypeError: an integer is required (got type str)
Missing: module cv2 has no attribute CV_CALIB_FIX_INTRINSIC
NameError: name 'CV_CALIB_FIX_INTRINSIC' is not defined

最佳答案

正确的名字是:

cv2.CALIB_FIX_INTRINSIC

关于Python - OpenCV 模块缺少属性 CV_CALIB_FIX_INTRINSIC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42864070/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com