Bad zero disparities in StereoBM (Bug #395)


Added by Patrick Mihelich over 14 years ago. Updated over 14 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:imgproc, video
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

One of our users had problems using stereo_image_proc with min_disparity set to some positive value - the point cloud produced would intermittently include all the points filtered during stereo correspondence.

It looks like findStereoCorrespondenceBM_SSE2 will sometimes incorrectly assign a zero disparity. With positive min_disparity, this gets interpreted by reprojectImageTo3D as the bad value, and disparities set to FILTERED are kept. I found a simple tweak to stereobm.cpp that seems to fix the problem:

493c493
<             if( 0 < mind && mind < ndisp - 1 )
---
>             if( 0 < mind && mind < ndisp )

All the bad points had mind == ndisp - 1. But I don't know the code well enough to be sure that's correct. Vadim can you look at this? Thanks.


Associated revisions

Revision bed63cc7
Added by Vadim Pisarevsky over 14 years ago

fixed the output disparity at the extreme cases (minDisparity or minDisparity + numOfDisp - 1). Thanks to Patrick Mihelich for the report (trac #395)

Revision e2536f1c
Added by Andrey Kamaev about 12 years ago

Merge pull request #395 from LeonidBeynenson:fix_ml_large_data_bug__2.4

History

Updated by Vadim Pisarevsky over 14 years ago

The problem is fixed in r3271

  • Status changed from Open to Done
  • (deleted custom field) set to fixed

Also available in: Atom PDF