Disparity Map missing object?
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)
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.
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!
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.
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).
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).
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?