Open
Description
When using calibrate_cameras I was getting such an error:
cv2.error: OpenCV(3.4.3) C:\projects\opencv-python\opencv\modules\calib3d\src\calibration.cpp:1318: error: (-211:One of arguments' values is out of range) image width and height must be positive in function 'cvCalibrateCamera2Internal'
I found that #16 was a fix for similar issue. I reverted that change, placed self.image_size after calib.dist_coefs["right"] and everything is ok now.
So this piece of code look at the moment like that in my project:
calib = StereoCalibration()
(calib.cam_mats["left"], calib.dist_coefs["left"],
calib.cam_mats["right"], calib.dist_coefs["right"],
calib.rot_mat, calib.trans_vec, calib.e_mat,
calib.f_mat) = cv2.stereoCalibrate(self.object_points,
self.image_points["left"],
self.image_points["right"],
calib.dist_coefs["left"],
calib.cam_mats["right"],
calib.dist_coefs["right"],
self.image_size,
calib.rot_mat,
calib.trans_vec,
calib.e_mat,
calib.f_mat,
criteria=criteria,
flags=flags)[1:]
Metadata
Metadata
Assignees
Labels
No labels