#include "stdafx.h"
#include <cv.h>
#include<highgui.h>
using namespace std;
using namespace cv;
int main()
{
cvNamedWindow("example",0);
CvCapture*capture=cvCreateFileCapture("D:\\opencvxiti\\test.avi");
IplImage*image;
while(1){
image=cvQueryFrame(capture);
if(!image)break;
cvShowImage("example", image);
// cvWaitKey(0);
char c=cvWaitKey(33);
if(c==27)
break;
}
cvReleaseCapture(&capture);
cvDestroyWindow("example");
return 0;
}