I have been trying to get OpenCV camera calibration working for several months now, but I have been unsuccessful so far. I am at the point where I can get a low re-projection error (below 0.5 pixels), but when I examine the images output by stereoRectify
they are clearly not rectified correctly. Corresponding points are not aligned horizontally. The noticeable effects of the rectification are to rotate one image slightly and zoom the other image in. Disparity maps generated by the rectification are noisy and simply not correct (using both StereoSGBM and StereoVar).
I have tried using several different sets of calibration images, ranging from 20 to 80 frames. I have tried various combinations of checkerboard size, distance, and rotation, all to no avail. In each case I get the different results, but all with the type of useless disparity maps described above.
MATLAB stereo calibration produces much better results on the same videos, but MATLAB is unfortunately not available as a long-term solution in my case. I do not understand why OpenCV believes it's finding a good stereo rectification when it so clearly is not. Am I missing something about how to calibrate cameras? Has anyone else encountered such an issue?