你好,我刚开始学习OpenCV。在播放AVI视频时,同样出现了运行时,窗口一闪而过的现象。如何解决,求指点!

2025-12-18 01:22:08
推荐回答(3个)
回答1:

1,你没做循环
2,你的循环没有写好

IplImage* img=NULL;
CvCapture* capture=cvCreateFileCapture(0);//cvCreateFileCapture('...')
whlie(1){
img=cvQueryFrame(capture);
cvShowImage('...',img);
...
if(cvWaitKey(33)==27) break;
}
...//relesae

回答2:

在opencv论坛主页上有类似的代码,你要每隔多长时间播放一帧图像才行。

回答3:

没有安装Xvid解码器