3

I am building a disparity map with OpenCV's SGBM implementation. In particular, I'm using the OpenCV version 2.4.9. Currently, I am working with the following parameters:

int numberOfDisparities = 64;
sgbm.preFilterCap = 25;
sgbm.SADWindowSize = 14;
sgbm.P1 = 8*sgbm.SADWindowSize*sgbm.SADWindowSize;
sgbm.P2 = 32*sgbm.SADWindowSize*sgbm.SADWindowSize;
sgbm.minDisparity = 0;
sgbm.numberOfDisparities = numberOfDisparities; 
sgbm.uniquenessRatio = 10;
sgbm.speckleWindowSize = 100;
sgbm.speckleRange = 2;
sgbm.disp12MaxDiff = 1;
sgbm.fullDP = false;

However, the result is not as good as I need: Stripped ground disparity As you can see, the ground appears striped, which causes problems with the obstacle detection algorithm I am using, which is an implementation of the paper Fast and reliable obstacle detection and segmentation for cross-country navigation. The problem is that, as these strips have a rather constant disparity, which means that teorically they are almost perpendicular to the ground, the algorithm clasifies them as obstacles.

I played a little bit with the smoothing parameters P1 and specially P2, testing if increasing P2 improved it, but it doesn't seem to solve the problem, so I just left as recommended by the OpenCV sample.

The images are from the KITTI dataset and I downloaded them already rectified, so I discarded a bad calibration or camera alignment.

I wonder if it can be due to an untextured ground, although I hope not, since if that's the case it means I would have to change the obstacle detection algorithm.

Any ideas?

agregorio
  • 91
  • 1
  • 11
  • I worked with 96 as numdisparities (it should help with closer object). I also use (experimenting differnts values from those propesed by the official documentation) a lower speckle window size (20), higher specklerange(15) and a bit higher uniqueness ratio (15). Try it (I think that untexutred groud causes some noise and you spread it too much with too higher speckle values). Maybe I am wrong, but you can make a some tries on these values too on your own, not only playing with smoothing values. – marcoresk Jan 12 '17 at 16:48

0 Answers0