Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

stereo camera and depth map

Hi guys,

I want to create a little robot with a stereo camera (2x logitech c270). I made single calibration on both cameras (obtaining an error of 0.40 / 0.60 with 40 images each) then a stereo calibration (error of 0.5).

What I don't undestand is that in different tutorials, it is said that using the StereoBM.compute() should give you directly the depth map (example here). But I can't get anything else than the shape of my objects :

image description

My StereoBM parameters are :

stereo = StereoBM.create(224, 7);
            stereo.setPreFilterCap(32);
            stereo.setPreFilterSize(9);
            stereo.setTextureThreshold(1077);
            stereo.setUniquenessRatio(0);

Am I missing something or there is some more work to do to get depth map from disparity mat? Thanks!