You are not logged in.

#1 2009-10-29 11:59:21

AndersJ
Member
Registered: 2009-10-29
Posts: 11

Opencv + Arch problem..

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

#2 2009-12-02 10:09:55

djtarki
Member
Registered: 2009-12-02
Posts: 1

Re: Opencv + Arch problem..

Could you post the errror?

Which line gives the error?


Regards.

Offline

Board footer

Powered by FluxBB