opencv 2-2

#include "highgui.h"


int main(int argc,char*argv[])
{
	char* avi = "D:\\demo.avi";
	cvNamedWindow("Example",CV_WINDOW_AUTOSIZE);
	CvCapture* capture = cvCreateFileCapture(avi);
	IplImage* frame;
	while(1)
	{
		frame = cvQueryFrame(capture);
		if(!frame) break;
		cvShowImage("Example", frame);
		char c = cvWaitKey(33);
		if(c==27) break;
	}
	cvReleaseCapture(&capture);
	cvDestroyWindow("Example");
	return 0;
}

©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页