用OpenCV显示视频时遇到问题
刚刚接触OpenCV,运行了书上的例程,程序编译没有问题,在视频显示快要结束时遇到了下面的问题,代码在后面

#include "stdafx.h"
#include <opencv2\highgui\highgui.hpp>
#include <opencv2\video\tracking.hpp>
using namespace cv;
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
	//读入视频
	VideoCapture capture("111.avi");
	//循环显示每一帧
	while(1)
	{
		Mat frame;//定义一个Mat变量,用于存储每一帧的图像
		capture>>frame;//读取当前帧
		imshow("读取视频",frame);//显示当前帧
		waitKey(10);//延时30ms
	}
	return 0;
}
 
                    
                
 
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号