Python - OpenCV 模块缺少属性 CV_CALIB_FIX_INTRINSIC

Python - OpenCV module missing attribute CV_CALIB_FIX_INTRINSIC

我正在使用 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呢? 我尝试过的值:

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