小编use*_*272的帖子

在openCV中打开文件(/home/vaibhav/opencv/modules/highgui/src/cap_ffmpeg_impl.hpp:553)时出错

我正在使用OpenCV来显示我的代码为的视频

#include<opencv2/highgui.hpp>
#include<cv.h>
#include<opencv/cv.hpp>
#include<opencv2/opencv.hpp>
#include<cvaux.h>
#include<cxcore.h>
#include<stdio.h>
#include<highgui.h>
#include<stdlib.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>

using namespace cv;
int main( int argc, char ** argv )
{
CvCapture* capture;
cvNamedWindow( "video", CV_WINDOW_AUTOSIZE ); 
capture = cvCreateFileCapture("/home/vaibhav/program/c/w.avi");
IplImage* frame;
while(1){
frame = cvQueryFrame( capture );
if( !frame ) break;
cvShowImage( "video", frame );
char c = cvWaitKey(33);
if( c == 27 ) break;
}

cvReleaseCapture( &capture );

cvDestroyWindow( "Webcam" );

return 0; }
Run Code Online (Sandbox Code Playgroud)

程序编译但在尝试运行时会出错

我正在使用Ubuntu 12.04和Eclipse

warning: Error opening file …
Run Code Online (Sandbox Code Playgroud)

opencv

5
推荐指数
1
解决办法
3万
查看次数

标签 统计

opencv ×1