新人求救打开摄像头问题
opencv吧
全部回复
仅看楼主
level 1
O1882 楼主
代码:
#include <opencv2/opencv.hpp>
using namespace cv;
int main()
{
VideoCapture capture(0); //读入视频,实例化的同时再初始化
//2循环显示每一帧
while(1)
{
Mat frame; //定义一个Mat变量,用于存储每一帧的图像
capture>>frame; //读取当前帧
//若视频播放完成,退出循环
imshow("读取视频",frame); //显示当前帧
waitKey(30); //延时30MS
}
return 0;
}
错误:
“test2.exe”: 已加载“D:\Digital\VC++\OpenCV\practice\test2\Debug\test2.exe”,已加载符号。
“test2.exe”: 已加载“C:\Windows\SysWOW64\ntdll.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\kernel32.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\KernelBase.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\msvcp100d.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\msvcr100d.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“D:\opencvaz\opencv\build\x86\vc10\bin\opencv_highgui2410d.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“D:\opencvaz\opencv\build\x86\vc10\bin\opencv_core2410d.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\user32.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\gdi32.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\ole32.dll”,已加载符号。
“test2.exe”: 已加载“C:\Windows\SysWOW64\combase.dll”,已加载符号。
“test2.exe”: 已加载“C:\Windows\SysWOW64\msvcrt.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\rpcrt4.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\sspicli.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\cryptbase.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\bcryptprimitives.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\sechost.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\oleaut32.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\advapi32.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.10586.0_none_811bc0006c44242b\comctl32.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\msvfw32.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\avifil32.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\shell32.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\avicap32.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\cfgmgr32.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\msacm32.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\windows.storage.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\winmm.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\shlwapi.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\kernel.appcore.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\SHCore.dll”,已加载符号(去除源信息)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\winmmbase.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\powrprof.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\profapi.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\imm32.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\uxtheme.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\clbcatq.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\devenum.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\setupapi.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\ntmarta.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\devobj.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\wintrust.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\msasn1.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\crypt32.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\msdmo.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\qcap.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\version.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\quartz.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\bcrypt.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\msctf.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\dwmapi.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\ksproxy.ax”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\ksuser.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\d3d9.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\policymanager.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\msvcp110_win.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\vidcap.ax”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\Kswdmcap.ax”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\mfc42.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\odbc32.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\dpapi.dll”,Cannot find or open the PDB file
线程 'Win32 线程' (0x1fc8) 已退出,返回值为 0 (0x0)。
“test2.exe”: 已加载“C:\Windows\SysWOW64\qedit.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\comdlg32.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\FirewallAPI.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\
neta
pi32.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.10586.0_none_538a540779726150\GdiPlus.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\davhlpr.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\fwbase.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\ddraw.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\dciman32.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\igdumdim32.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\igdusc32.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\d3dim700.dll”,Cannot find or open the PDB file
“test2.exe”: 已卸载“C:\Windows\SysWOW64\igdusc32.dll”
“test2.exe”: 已卸载“C:\Windows\SysWOW64\igdumdim32.dll”
“test2.exe”: 已加载“C:\Windows\SysWOW64\igdumdim32.dll”,Cannot find or open the PDB file
“test2.exe”: 已加载“C:\Windows\SysWOW64\igdusc32.dll”,Cannot find or open the PDB file
“test2.exe”: 已卸载“C:\Windows\SysWOW64\igdusc32.dll”
“test2.exe”: 已卸载“C:\Windows\SysWOW64\igdumdim32.dll”
“test2.exe”: 已加载“C:\Windows\SysWOW64\msyuv.dll”,Cannot find or open the PDB file
test2.exe 中的 0x7612d8a8 (KernelBase.dll) 处最可能的异常: Microsoft C++ 异常: 内存位置 0x0017f928 处的 cv::Exception。
test2.exe 中的 0x7612d8a8 (KernelBase.dll) 处有未经处理的异常: Microsoft C++ 异常: 内存位置 0x0017f928 处的 cv::Exception。
test2.exe 中的 0x7612d8a8 (KernelBase.dll) 处最可能的异常: Microsoft C++ 异常: 内存位置 0x0017ea10 处的 cv::Exception。
test2.exe 中的 0x7612d8a8 (KernelBase.dll) 处有未经处理的异常: Microsoft C++ 异常: 内存位置 0x0017ea10 处的 cv::Exception。
test2.exe 中的 0x0ffb0ee6 处最可能的异常: 0xC0000005: 读取位置 0x00000018 时发生访问冲突
test2.exe 中的 0x0ffb0ee6 处有未经处理的异常: 0xC0000005: 读取位置 0x00000018 时发生访问冲突
程序“[2864] test2.exe: 本机”已退出,返回值为 -1073741510 (0xc000013a)。
2016年07月30日 02点07分 1
level 1
O1882 楼主

2016年07月30日 08点07分 2
level 1
程序没问题,应该是你的opencv没有配置好,网上找个教程好好配置一下
2016年07月30日 12点07分 3
1