GPU StereoConstantSpaceBP produces garbage output (Bug #1367)


Added by Markus Moll over 13 years ago. Updated almost 13 years ago.


Status:Done Start date:
Priority:High Due date:
Assignee:Anatoly Baksheev % Done:

0%

Category:gpu (cuda)
Target version:2.4.0
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

I ran a very simple test program (attached) on the Middlebury teddy data. When using cv::gpu::StereoConstantSpaceBP, the output most of the time contains artifacts and generally looks buggy (see attachment). I have made a few observations that lead me to think that it has to do with improper initialization:

1. Sometimes it just works, and once it does, it usually does for the rest of the session.
2. Yesterday, when I run StereoBeliefPropagation first (in the same program), then StereoConstantSpaceBP, the latter seemed to work just fine. However, I cannot reproduce this behavior today. (StereoBeliefPropagation itself runs just fine)
3. When some other GPU code is run before, it also seems to work (this was only in one program, and I did not try to reproduce it)

I am running Fedora 15 with a GeForce GTX 470 (nvidia driver 280.13) and Cuda 4.0 (gcc 4.4)

However, the same behavior could be observed on two other machines, one of which is equipped with a GeForce 9600 GT.

I do not have a good enough overview of the OpenCV GPU code to further pin down the error.


output_csbp_only.png - The output of the stereo_broken program (110 kB) Markus Moll, 2011-09-13 01:00 pm

stereo_broken.cc - Simple test program (503 Bytes) Markus Moll, 2011-09-13 01:00 pm

imL.png - Middlebury teddy left image (input) (334 kB) Markus Moll, 2011-09-13 01:01 pm

imR.png - Middlebury teddy right image (input) (335.3 kB) Markus Moll, 2011-09-13 01:01 pm


Associated revisions

Revision a22641aa
Added by Anatoly Baksheev almost 13 years ago

fixed bug #1367 in CSBP

History

Updated by Gustav Karlsson over 13 years ago

I have reproduced this as well today with top of tree code. If I power cycle system and run my code the StereoConstantSpaceBP routine retuns garbled disparity image. If I call StereoBM_GPU then StereoConstantSpaceBP the correct disparity image is returned. The two functions are not using the same source images. I can then remove the StereoBM_GPU call and StereoConstantSpaceBP will continue to work correctly. I have dual GTX 470's with driver 280.26.

Updated by Gustav Karlsson over 13 years ago

I discovered that the artifacts are only available when you use the CV_32FC1 msg_type. if you use the CV_16SC1 msg_type then the output is correct.

Updated by Alexander Shishkov about 13 years ago

  • Description changed from I ran a very simple test program (attached) on the Middlebury teddy data. Whe... to I ran a very simple test program (attached) on the Middlebury teddy data. Whe... More

Updated by Vladislav Vinogradov about 13 years ago

  • Status deleted (Open)
  • Assignee changed from Anatoly Baksheev to Vladislav Vinogradov

Updated by Alexander Shishkov almost 13 years ago

  • Target version set to 2.4.0

Updated by Alexander Shishkov almost 13 years ago

  • Status set to Open

Updated by Anatoly Baksheev almost 13 years ago

Fixed in r7786. There was wrong similar step assumption.

  • Status changed from Open to Done
  • Assignee changed from Vladislav Vinogradov to Anatoly Baksheev

Also available in: Atom PDF