1
votes

I am using OpenCV for stereo calibration of cameras. I have already performed calibration of individual cameras. And according to this documentation, Specifying pre-calculated camera matrices and distortion coefficients requires one to pass the flag 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.

But how to pass the flags? The values I have tried:

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

I get the following errors (respectively):

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
1
I guess cv2.CALIB_FIX_INTRINSICMiki
@Miki Thanks, that worked.!harshatech2012
Glad it helped. Posted as an answer so we can close the case ;)Miki

1 Answers

2
votes

The correct name is:

cv2.CALIB_FIX_INTRINSIC