Disparity Map missing object?

asked 2015-01-02 14:29:12 -0500

KWer gravatar image

updated 2015-01-05 12:06:55 -0500

Hi,

I'm working on creating a disparity map from a stereo image pair using OpenCV. I'm trying to look at a 3D model of an F-15. The disparity map I'm generating is very noisey and seems to be ignoring the plane altogether (almost creating a shadow of the plane among the noise). Does anyone know what may be causing this?

I can generate clear disparity maps from other images (inclusing the provided example images).

My block-mathing code is: StereoSGBM(min_disparity=80, num_disp=96, sad_window_size=3, uniqueness=15, speckle_window_size=10, speckle_range=2, p1=1, p2-64, max_disparity=124, full_dp=False, settings=None)

depth_map right_image

Update: Thank you to those who responded! To overcome difficulties matching textureless regions, I added a camo pattern to the wings and adjusted the SGBM parameters as suggested in the comments. The resulting disparity map is still poor.

camo_depth_map camo_right_image

StereoSGBM(min_disparity=0, num_disp=96, sad_window_size=9, uniqueness=15, speckle_window_size=10, speckle_range=2, p1=1, p2=64, max_disparity=1, full_dp=False, settings=None)

Any assistance would be greatly appreciated. Thank you!

edit retag flag offensive close merge delete

Comments

My first bet is on missing features on the very homogeneous texture of the plane. Especially the wing is almost a single color with only some small lines on it so it is hard (impossible) to find corresponding features on both images.

FooBar gravatar imageFooBar ( 2015-01-02 15:07:59 -0500 )edit

Every setup is different, but try changing to the following:

min_disparity = 0 sad_window_size = 9 (or even larger) disp12MaxDiff = 1

And as always, it is good idea to read the paper (SGM, Heiko Hirschmuller).

Der Luftmensch gravatar imageDer Luftmensch ( 2015-01-02 16:29:53 -0500 )edit

Thank you for the comments. I've added texture to the wings (in the form of digital camo and traditional camo) but neither seems to improve matching. I've also adjusted my parameters (with window sizes 7-19).

KWer gravatar imageKWer ( 2015-01-05 12:12:28 -0500 )edit

People tend to introduce random noise for each image pair to add more texture altogether and improve the matching. This could be done by applying a random dot pattern for example. Might try that?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-06 07:06:19 -0500 )edit