Line 99... |
Line 99... |
99 |
cal.frameWidth = calibrationData[0].frame0.cols;
|
99 |
cal.frameWidth = calibrationData[0].frame0.cols;
|
100 |
cal.frameHeight = calibrationData[0].frame0.rows;
|
100 |
cal.frameHeight = calibrationData[0].frame0.rows;
|
101 |
cv::Size frameSize(cal.frameWidth, cal.frameHeight);
|
101 |
cv::Size frameSize(cal.frameWidth, cal.frameHeight);
|
102 |
|
102 |
|
103 |
// determine only k1, k2 for lens distortion
|
103 |
// determine only k1, k2 for lens distortion
|
104 |
int flags = cv::CALIB_FIX_ASPECT_RATIO + cv::CALIB_FIX_PRINCIPAL_POINT + cv::CALIB_FIX_K3;
|
104 |
int flags = cv::CALIB_FIX_ASPECT_RATIO + cv::CALIB_FIX_K3;
|
105 |
// Note: several of the output arguments below must be cv::Mat, otherwise segfault
|
105 |
// Note: several of the output arguments below must be cv::Mat, otherwise segfault
|
106 |
std::vector<cv::Mat> cam_rvecs0, cam_tvecs0;
|
106 |
std::vector<cv::Mat> cam_rvecs0, cam_tvecs0;
|
107 |
cal.cam0_error = cv::calibrateCamera(Q, qc0, frameSize, cal.K0, cal.k0, cam_rvecs0, cam_tvecs0, flags);
|
107 |
cal.cam0_error = cv::calibrateCamera(Q, qc0, frameSize, cal.K0, cal.k0, cam_rvecs0, cam_tvecs0, flags);
|
108 |
|
108 |
|
109 |
// // refine extrinsics for camera 0
|
109 |
// // refine extrinsics for camera 0
|