Ask Your Question

Revision history [back]

How to increase the quality of Disparity Map?

I am working on stereo images. After doing camera calibration and everything, I am trying to get a depth image. But depth image depends on the disparity map and I am not getting proper disparity map.

Here is a screenshot of my Disparity Map. (It shows only one image, but I have two images from two diff webcams separated by around 3cms)

image description

I am using StereoBM and following are the values that I have set.

StereoBM sbm;
sbm.state->SADWindowSize = 25;
sbm.state->numberOfDisparities = 64;
sbm.state->preFilterSize = 27;
sbm.state->preFilterCap = 63;
sbm.state->minDisparity = 0;
sbm.state->textureThreshold = 20;
sbm.state->uniquenessRatio = 9;
sbm.state->speckleWindowSize = 0;
sbm.state->speckleRange = 4;

I want Disparity Map generation to be real time. Graph Cut algorithm seems to take a lot of time. Is there any method by which I can increase the quality of Disparity Map?