I am using opencv library to do stereo reconstruction. I am testing the rectification and stereo matching currently. I used stereoRectify function from the opencv 2.4.9 and i made it work fine. I used test data from this site : http://vision.middlebury.edu/mview/data/ They have images along with camera matrix, rotation and translation matrices. The problem is that stereoRectify returns a vertically aligned images (Vertical stereo) so the epipolar lines are vertical. I could not make stereoBM produce any good disparity image (tried a lot of parameter tuning), and I am not sure if it can work with vertical stereo. Does anyone have similar experience with this? Is there a way (some parameter maybe?) to make stereoBM or stereoSGBM work with vertically rectified images?
1 Answers
2
votes
Last time I checked the code neither StereoBM nor StereoSGBM supported vertical stereo pairs (the implementation assumes a horizontal stereo pair). You can however rotate by 90 degrees your images so that they form a horizontal stereo pair. Then compute a disparity map with either method and rotate it by 90 degrees in the opposite direction so that you get a disparity map for your input vertical stereo pair.