I'm doing a stereovision setup, with 2 cameras mounted above a wing. The left camera is tilted a few degree inwards while the right camera in parallel with the wing. All images available here
Then using (cut and pasted, but does not compile as is)
// performing stereocalibration given imagePoint_leftcamera and rightcamera
Flea3.reproj_error = stereoCalibrate(objectPoints,imagePoints_left,imagePoints_right,cameraMatrix_left,
distCoeffs_left,cameraMatrix_right,distCoeffs_right,imageSize, Flea3.R, Flea3.T, Flea3.E, Flea3.F,
TermCriteria(CV_TERMCRIT_ITER+CV_TERMCRIT_EPS, 100, 1e-5),
CV_CALIB_FIX_INTRINSIC );
// Peform stereorectification
stereoRectify(cameraMatrix_left, distCoeffs_left, cameraMatrix_right, distCoeffs_right, imageSize, Flea3.R, Flea3.T, Flea3.R1, Flea3.R2, Flea3.P1, Flea3.P2, Flea3.Q, CALIB_ZERO_DISPARITY, -1, Size(), &Flea3.validRoi_left, &Flea3.validRoi_right);
//computes undistort and rectify maps
initUndistortRectifyMap(cameraMatrix_left, distCoeffs_left, R1, P1, imageSize, CV_16SC2, rmap[0][0], rmap[0][2]);
initUndistortRectifyMap(cameraMatrix_right, distCoeffs_right, R2, P2, imageSize, CV_16SC2, rmap[1][0], rmap[1][3]);
remap(src_left, img_left, rmap[0][0], rmap[0][4], CV_INTER_LINEAR);
remap(src_right, img_right, rmap[1][0], rmap[1][5], CV_INTER_LINEAR);
Shouldn't the black region be on the right in the right image? Since the right camera should be tilted right?
Also, the ROI (denoted by red box) is clearly wrong, though the stereorectification appears to work!
Is my calibration any good? BTW my re-projection error returned by cv::stereocalibrate is 0.6004