这是我的第一篇文章。所以,如果我不能使它成为一个完美的,请原谅我。
我使用 OpenCV 大约 2 个月,现在我想从 GPU 处理开始。因此,我将 OpenCV 2.4.3 的新副本解压缩到另一个位置,并使用带有 CUDA 支持的 CMake 来构建它。我使用了 CUDA 4.2 Toolkit 和 SDK,然后在构建它时使用了它。然后我以完美的方式设置环境变量和包含、目录和二进制属性,如这里许多其他帖子中所述。
但是,当我将 gpu 代码添加到我的项目中时,例如 stereo_match.cpp,我能够成功编译和构建它们,但是当我运行它们时,没有结果。我只是得到一个黑屏,上面写着:
“用法:stereo_match_gpu --left --right #必须纠正 --method #BM | BP | CSBP --ndisp #视差级别数”
程序退出。我尝试阅读代码,但找不到我应该在哪里提供输入图像。我是 CUDA 的菜鸟。所以有人可以告诉我我是否在这里做错了什么。我遵循的构建和运行 GPU 代码的方法是否正确?你能建议我哪里出错了吗?我正在使用带有 OpenCV 2.4.3 的 Visual Studio Ultimate 32 位。GPU 是 NVIDIA GeForce 525M。
附加信息:当我运行构建的代码时,我在控制台中得到以下信息:
'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).