You are not logged in.
Pages: 1
Hey guys
Hope someone out there can help me. I am trying to capture a frame from an AVI-file using OpenCV, but there seems to be a problem with OpenCV and Arch. When I run the code below, I never get anything else than NULL in "file". I tried the same code in Windows Vista and ubuntu 9.10, where it runs without a problem. Maybe it is a problem with ffmpeg, but it doesn't return any error messages or codes. Anyone knows this problem and maybe a fix? Don't want to switch back to Ubuntu just for this:)
GCC, OpenCV and ffmpeg are all standard versions from pacman repositories. Tried OpenCV 2.0 also without any luck..
#include </usr/include/opencv/cv.h>
#include </usr/include/opencv/highgui.h>
#include <iostream>
#include <stdio.h>
using namespace std;
int main ()
{
const char* name = "myfile.avi";
CvCapture* file;
file = NULL;
file = cvCaptureFromFile(name);
cout << "filnavn = " << file << endl;
if (file) cout << "Nice" << endl;
if (!file) cout << "DOOOMED" << endl;
return 0;
}
Offline
Could you post the errror?
Which line gives the error?
Regards.
Offline
Pages: 1