stereo camera and depth map

asked 2015-08-16 06:37:20 -0500

Yolteotl gravatar image

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!

edit retag flag offensive close merge delete

Comments

With your black and white image is difficult to say something. I can suppose that disparity is 400 for bottle (right image bottle is at x=200 and in left image 600). In your disparity image pixel value must be 400. it should be a 16 bit images

LBerger gravatar imageLBerger ( 2015-08-16 11:35:20 -0500 )edit