Can someone provide me with a (correct and working) stereo calibration full example code in C++? I used so far Martin Peris's stereo calibration (here) but it is in C which it quite difficult for me to understand. I also found stereo calibration by Jay Rambhia (blog post, code) which is C++ but probably has a bug (does not write YML to disk for me and also the final rectified images do not look correct).