fixstars / libSGM

Stereo Semi Global Matching by cuda
Apache License 2.0
623 stars 189 forks source link

Getting bad disparity for 4k inputs #64

Closed sankarshanmugam closed 3 years ago

sankarshanmugam commented 3 years ago

We get disparity output with lot of holes for 4k input (size:3840x2160). Does any specific parameter has any restriction such as libSGM parameter, .cu file block/thread size, etc. Any help towards this are much appreciated.

atakagi-fixstars commented 3 years ago

Hi, @sankarshanmugam

Could you show the output image?

sotsuka-fixstars commented 3 years ago

We get disparity output with lot of holes for 4k input (size:3840x2160).

When 4k input is used, disparity size maybe insufficient. libSGM supports 64, 128, 256 as disparity size.

We can try followings

We can check parameters of libSGM by

sankarshanmugam commented 3 years ago

We get disparity output with lot of holes for 4k input (size:3840x2160).

When 4k input is used, disparity size maybe insufficient. libSGM supports 64, 128, 256 as disparity size.

We can try followings

  • shrinking input image size (recommended)
  • maximizing disparity size by --disp_size=256 option [when sample/image/stereo_test used]
  • disabling uniqueness check by --uniqueness=1.0 option [when sample/image/stereo_test used]
  • disabling LR check by --LR_max_diff=-1 option [when sample/image/stereo_test used]

We can check parameters of libSGM by

Thank you for your support, we are able to get the better Disparity output for disp_size=256

sankarshanmugam commented 3 years ago

Hi, @sankarshanmugam

Could you show the output image?

Thank you for your aid, we are able to fix the issue with @sotsuka-fixstars suggestion.

sotsuka-fixstars commented 3 years ago

@sankarshanmugam

we are able to fix the issue

Then, we will close this issue. If we faced with related this issue, reopen it.