4,246
社区成员
发帖
与我相关
我的任务
分享
#include "highgui.h"
int main(int argc, char **argv)
{
cvNamedWindow("w2", CV_WINDOW_NORMAL);
CvCapture *capture = cvCreateFileCapture("s.avi");
IplImage *frame;
while(1){
frame = cvQueryFrame(capture);
if(!frame){
break;
}
cvShowImage("w2", frame);
char c = cvWaitKey(33);
if(27 == c){
break;
}
cvReleaseCapture(&capture);
cvDestroyWindow("w2");
}
return 0;
}