I am using OpenCV to display a video my code is as
#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; }
The program compiles but it gives error when try to run it
I am using Ubuntu 12.04 and Eclipse
warning: Error opening file (/home/vaibhav/opencv/modules/highgui/src/cap_ffmpeg_impl.hpp:553)