(Write me!)
See also the documentation from Willow Garage's OpenCV for cv::stereoRectify()
The following video (view on YouTube) illustrates the effects of each of these parameters:
See docs for the class: mrpt::vision::CStereoRectifyMap
mrpt::vision::CStereoRectifyMap rectify_map;
// Set options as desired:
// rectify_map.setAlpha(...);
// rectify_map.enableBothCentersCoincide(...);
while (true) {
// Grab stereo observation from wherever
mrpt::slam::CObservationStereoImagesPtr obs_stereo = ...
// Only once, construct the rectification maps:
if (!rectify_map.isSet())
rectify_map.setFromCamParams(*obs_stereo);
// Rectify in place:
unmap.rectify(*obs_stereo);
// Rectified images are now in: obs_stereo->imageLeft & obs_stereo->imageRight
}
See the example: <MRPT>/samples/stereoRectify