0

警告:打开文件时出错

c:\users\vp\work\ocv\opencv\modules\highgui\src\cap_ffmpeg.cpp:454

如何消除此错误?

我的程序:

#include<opencv\cv.h>
#include<opencv\highgui.h>
#include<opencv\ml.h>
#include<opencv\cxcore.h>



int main( int argc, char** argv ) {
cvNamedWindow( "DisplayVideo", CV_WINDOW_AUTOSIZE );
CvCapture* capture = cvCreateFileCapture(" E:\softwares\opencv\samples\cpp\tutorial_code\HighGUI\video-input-psnr-ssim\video\Megamind.avi ");
IplImage* frame;
while(1) {
frame = cvQueryFrame( capture );
if( !frame ) break;
cvShowImage( "DisplayVideo", frame );
char c = cvWaitKey(33);
if( c == 27 ) break;
}
cvReleaseCapture( &capture );
cvDestroyWindow("DisplayVideo" );
}
4

1 回答 1

0

使用'/'或'\\',而不是'\'..

CvCapture* capture = cvCreateFileCapture(" E:\\softwares\\opencv\\samples\\cpp\\tutorial_code\\HighGUI\\video-input-psnr-ssim\\video\\Megamind.avi ");
于 2013-10-24T06:31:05.457 回答