cunzhangdaren 2015-01-17 02:48 采纳率: 50%
浏览 2061

关于opencv程序一运行就出错,帮帮我啊

图片说明
#include"highgui.h"
int main(int argc,char** argv)
{
cvNamedWindow("Example2",CV_WINDOW_AUTOSIZE);
CvCapture* capture=cvCreateFileCapture(argv[1]);
IplImage* frame;
while(1){
frame=cvQueryFrame(capture);
if(!frame)break;
cvShowImage("Example2",frame);
char c=cvWaitKey(33);
if(c==27)break;
}
cvReleaseCapture(&capture);
cvDestroyWindow("Example2");
}
这是教材上程序

  • 写回答

4条回答 默认 最新

  • threenewbee 2015-01-17 03:24
    关注

    如果是VC,不要ctrl+f5运行程序,要用f5运行。遇到错误点调试程序。
    贴出具体错误发生的行和错误的消息。

    评论

报告相同问题?