|
咳咳,我是个新手加上超级菜鸟,今天才开始,看了几集视频教程后就准备照抄程序来完成摄像头的读取,下面是我照抄的源代码
#include "highgui.h"
int main(int argc, char* argv[])
{
cvNamedWindow("avi");
//CvCapture* capture = cvCreateFileCapture("视频文件路径");
CvCapture* capture = cvCreateCameraCapture(-1);
IplImage* frame;
while(1)
{
frame = cvQueryFrame(capture);
if(!frame)break;
cvShowImage("avi", frame);
char c = cvWaitKey(33);
if(c==27)
break;
}
cvReleaseCapture(&capture);
cvDestroyWindow("avi");
return 0;
}
编译的时候会出现如下报错:
“Opencv.exe”: 已加载“E:\visual studio 2010\Projects\Opencv\Debug\Opencv.exe”,已加载符号。
“Opencv.exe”: 已加载“C:\Windows\System32\ntdll.dll”,Cannot find or open the PDB file
“Opencv.exe”: 已加载“C:\Windows\System32\kernel32.dll”,Cannot find or open the PDB file
“Opencv.exe”: 已加载“C:\Windows\System32\KernelBase.dll”,Cannot find or open the PDB file
“Opencv.exe”: 已加载“D:\Program Files\opencv\build\x86\vc10\bin\opencv_highgui248d.dll”,Cannot find or open the PDB file
“Opencv.exe”: 已加载“C:\Windows\System32\user32.dll”,Cannot find or open the PDB file
“Opencv.exe”: 已加载“C:\Windows\System32\gdi32.dll”,Cannot find or open the PDB file
“Opencv.exe”: 已加载“C:\Windows\System32\lpk.dll”,Cannot find or open the PDB file
“Opencv.exe”: 已加载“C:\Windows\System32\usp10.dll”,Cannot find or open the PDB file
“Opencv.exe”: 已加载“C:\Windows\System32\msvcrt.dll”,Cannot find or open the PDB file
“Opencv.exe”: 已加载“C:\Windows\System32\ole32.dll”,Cannot find or open the PDB file
接下来一些也和这个差不多
但是能够编译通过,然后他弹窗
我选择确定之后他就运行结束了,请各位大神指教,谢谢您的帮助
|
|