我是编程的新手,我使用C ++和openCV陷入了我的视觉工作室,因为当我运行一些代码时,程序会输出:Cannot find or open PDB file
和(opencv_world310.dll) in Project2.exe: 0xC0000005: Access violation reading location 0x00000000056AE000.
我不知道该怎么做,我在互联网上尝试一些解决方案,但不能在一周内解决我的问题:(
这是我的代码:
#include "opencv2/opencv.hpp"
using namespace cv;
using namespace std;
int main(int argc, char* argv[])
{
// Read image
Mat im = imread("cow.jpg");
Mat imout, imout_gray;
// Edge preserving filter with two different flags.
edgePreservingFilter(im, imout, RECURS_FILTER);
imwrite("edge-preserving-recursive-filter.jpg", imout);
edgePreservingFilter(im, imout, NORMCONV_FILTER);
imwrite("edge-preserving-normalized-convolution-filter.jpg", imout);
// Detail enhance filter
detailEnhance(im, imout);
imwrite("detail-enhance.jpg", imout);
// Pencil sketch filter
pencilSketch(im, imout_gray, imout);
imwrite("pencil-sketch.jpg", imout_gray);
// Stylization filter
stylization(im, imout);
imwrite("stylization.jpg", imout);
}
这是我的输出:
'Project2.exe' (Win32): Loaded 'C:\Users\Wu\Documents\Visual Studio 2015\Projects\Project2\x64\Debug\Project2.exe'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Program Files (x86)\AVG\Av\avghooka.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\opencv 3.1.0\build\x64\vc14\bin\opencv_world310.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\lpk.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\usp10.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\comdlg32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.17514_none_a4d6a923711520a9\comctl32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\msvfw32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\avifil32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\msacm32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\avicap32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-runtime-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-ucrt_31bf3856ad364e35_6.1.7601.18878_none_09aa4b40304c91e1\ucrtbase.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-u..rsalcrt-apifwd-win7_31bf3856ad364e35_6.1.7601.18878_none_a9ab111a251a4c49\api-ms-win-core-timezone-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-u..rsalcrt-apifwd-win7_31bf3856ad364e35_6.1.7601.18878_none_a9ab111a251a4c49\api-ms-win-core-file-l2-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-u..rsalcrt-apifwd-win7_31bf3856ad364e35_6.1.7601.18878_none_a9ab111a251a4c49\api-ms-win-core-localization-l1-2-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-u..rsalcrt-apifwd-win7_31bf3856ad364e35_6.1.7601.18878_none_a9ab111a251a4c49\api-ms-win-core-synch-l1-2-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-u..rsalcrt-apifwd-win7_31bf3856ad364e35_6.1.7601.18878_none_a9ab111a251a4c49\api-ms-win-core-processthreads-l1-1-1.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\winsxs\amd64_microsoft-windows-u..rsalcrt-apifwd-win7_31bf3856ad364e35_6.1.7601.18878_none_a9ab111a251a4c49\api-ms-win-core-file-l1-2-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-string-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-heap-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-stdio-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-convert-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-locale-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-math-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-multibyte-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-time-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-filesystem-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-environment-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\api-ms-win-crt-utility-l1-1-0.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\concrt140.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\OpenCL.DLL'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\IntelOpenCL64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\intelocl64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\task_executor64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\ddraw.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\dciman32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\setupapi.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\devobj.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\Wldap32.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\cpu_device64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Program Files (x86)\Common Files\Intel\OpenCL\bin\x64\tbb\tbb.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\igdrcl64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\igdfcl64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\dbghelp.dll'. Symbols loaded.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\igdbcl64.dll'. Cannot find or open the PDB file.
'Project2.exe' (Win32): Loaded 'C:\Windows\System32\igdusc64.dll'. Cannot find or open the PDB file.
Exception thrown at 0x000007FEDB254D61 (opencv_world310.dll) in Project2.exe: 0xC0000005: Access violation reading location 0x00000000056AE000.
The program '[8724] Project2.exe' has exited with code 0 (0x0).
请有人帮我解决这个问题吗? :(
感谢^^
答案 0 :(得分:2)
PDB文件用于调试。您可以通过执行以下操作加载它们:
"cow.jpg"
首先尝试打开您的图片imshow("myWindows",im);
并显示:
{{1}}
查看你的图像是否正确加载并评论其他行。
请记住在以下位置包含opencv依赖项:
项目属性/链接器/输入/补充依赖
添加路径(取决于您的安装)
C:\ OpenCV_31 \的OpenCV \建立\ 64 \ VCl 4 \ lib中\ opencv_world310.lib C:\ OpenCV_31 \ opencv \ build \ x64 \ vc14 \ lib \ opencv_world310d.lib