gpt4 book ai didi

visual-studio-2010 - OpenCV GPU程序未运行

转载 作者:行者123 更新时间:2023-12-02 17:52:55 25 4
gpt4 key购买 nike

这是我的第一篇文章。因此,如果我没有使它成为一个完美的,请原谅。

我正在使用OpenCV大约2个月,现在我想开始进行GPU处理。因此,我将OpenCV 2.4.3的新副本解压缩到其他位置,并使用带有CUDA支持的CMake来构建它。我使用CUDA 4.2工具包和SDK,然后在构建它时使用。然后,按照此处许多其他文章中所述,以一种完美的方式设置环境变量并包括目录和二进制属性。

但是,当我向项目中添加gpu代码(例如,stereo_match.cpp)时,我能够成功编译并构建它们,但是当我运行它们时,没有任何结果。我只得到一个黑屏,说:

“用法:stereo_match_gpu-左-右#必须纠正-方法#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).

最佳答案

我认为错误消息只是在说您必须将一些参数传递给程序,该程序告诉它在哪里可以找到图像。首先,您将需要2张经过整流的图像,例如left.jpgright.jpg。然后,您必须指示Visual Studio在启动程序时为其传递正确的参数。有关传递参数的信息,请参见here

您需要的参数可能类似于

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

请注意,我用实际的图像名称替换了 <left-view><right-view>,删除了解释每个参数的注释( # comments start with hash),并为其他参数选择了一些明智的选择。

请注意,如果仅提供文件名,则文件必须与VS用于启动可执行文件的工作目录位于同一目录中。您也可以根据需要提供相对路径或完整路径,或者可能告诉VS使用图像所在的文件夹作为工作目录。

关于visual-studio-2010 - OpenCV GPU程序未运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15859513/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com