Getting shifted depth map from StereoSGBM
What I have done so far is calibrating these camera and extract a depth map from it.
There is a problem in the depth map. The correspondence points are shifted and I do not know why.
My code is not special at all and I tried many variations of stereo(gb)bm parameters.
StereoSGBM sgbm;
sgbm.numberOfDisparities = 5*16;
sgbm.SADWindowSize = 5;
// sgbm.disp.... and so on
remap(left, rleft, rmap[0][0], rmap[0][1], CV_INTER_LINEAR);
remap(right, rright, rmap[1][0], rmap[1][1], CV_INTER_LINEAR);
sgbm(rleft, rright, disparity);
I also thought that after stereoRectify the minimum disparity could be zero but I get better results (still worse) if I use negative values.
Here is the image (just one example):
My input images (left, right, remapped left, remapped right):
链接地址: http://www.djcxy.com/p/30626.html下一篇: 从StereoSGBM获取移位的深度图