0

This is my first post. So please excuse me if I dont make it a perfect one.

I am using OpenCV for around 2 months and now I wanted to start with GPU processing. So I unzipped a fresh copy of OpenCV 2.4.3 to a different location and used CMake with CUDA Support to buid it. I used CUDA 4.2 Toolkit and SDK and then when I built it. Then I set the environment variables and include, directory and binary properties in a perfect manner as described in many other posts here.

However, when I add a gpu code to my project, for example stereo_match.cpp, I am able to compile and build them successfully, but when I run them, there is no result. I just get a black screen that says :

"Usage: stereo_match_gpu --left --right # must be rectified --method # BM | BP | CSBP --ndisp # number of disparity levels"

and the program exits. I tried reading the code but couldn't find where I should be giving input images. I am a total noob in CUDA. So can someone please tell me if I am doing something wrong here. Is the method that I am following to build and run the GPU code right? Can you please suggest where I am going wrong? I am using Visual Studio Ultimate 32 bit with OpenCV 2.4.3. GPU is NVIDIA GeForce 525M.

Additional Info : When I run the built code, I get the following in the console :

'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\gpu\x86\vc10\bin\opencv_core243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.2\bin\cudart32_42_9.dll', Binary was not built with debug information.
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\nvcuda.dll', Binary was not built with debug information.
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\user32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\lpk.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\usp10.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\sechost.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\ole32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\devobj.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\shell32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.2\bin\npp32_42_9.dll', Binary was not built with debug information.
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcp100.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\msvcr100.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\gpu\x86\vc10\bin\opencv_gpu243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_imgproc243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_flann243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_features2d243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_calib3d243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_objdetect243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_highgui243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_ec83dffa859149af\comctl32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\avifil32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\winmm.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\msacm32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\msvfw32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\avicap32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\version.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\opencv\build\x86\vc10\bin\opencv_video243.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\nvcuvid.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\nvcuvenc.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v4.2\bin\cufft32_42_9.dll', Binary was not built with debug information.
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\imm32.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\msctf.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\WINDOWS\SysWOW64\nvinit.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\Program Files (x86)\NVIDIA Corporation\coprocmanager\detoured.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\Program Files (x86)\NVIDIA Corporation\coprocmanager\Nvd3d9wrap.dll', Cannot find or open the PDB file
'CV_Base.exe': Loaded 'C:\Program Files (x86)\NVIDIA Corporation\coprocmanager\nvdxgiwrap.dll', Cannot find or open the PDB file
The program '[1568] CV_Base.exe: Native' has exited with code 1 (0x1).
talonmies
  • 70,661
  • 34
  • 192
  • 269

1 Answers1

1

I think the error message is just saying that you have to pass in some parameters to the program which tell it where to find images. First, you will need 2 rectified images, say left.jpg and right.jpg. Then you have to instruct Visual Studio to pass the program the right parameters when it launches it. See here for info on passing arguments.

The arguments you need are probably something like

--left left.jpg --right right.jpg --method BM --ndisp 32

Note that I replaced <left-view> and <right-view> with actual image names, stripped the comments explaining each parameter (# comments start with hash), and chose some sensible options for the other parameters.

Note that if you just give the file names, the files have to be in the same directory as the working directory that VS uses to launch your executable. You can also give relative or full paths if you wish, or probably tell VS to use the folder with your images as the working directory.

Community
  • 1
  • 1
Nicu Stiurca
  • 8,747
  • 8
  • 40
  • 48