1
votes

I trying to get an application to work with OpenCV 2.3.0 (stable) and latest SVN-Revision as well under Ubuntu 11.04. The Code works flawlessly under Windows.

//includes etc...
int main(){
CvCapture* capture = cvCaptureFromCAM( CV_CAP_ANY );


if ( !capture ) { //is always "NULL" here
    fprintf( stderr, "ERROR: capture is NULL \n" );
    getchar();
    return -1;
}
}

OpenCV 2.3 works once but now it refuses to work since last Ubuntu update or something. Is there a possibility to get the newer library to work?

I reverted back to the Ubuntu shipped library which works for now, but it would be great if I can convince the latest stable release to work too.

1
Does your webcam work with any installed software after the Ubuntu update?karlphillip
Is some software grabbing the camera for itself? eg Skype suddenly doing video and hanging onto the camera at bootupMartin Beckett
Yes I reverted to back to 2.1.0 which is shipped with Ubuntu. Now it works again. Cheese works to so the webcam works. The cam works without any further software as well so no third party applications are required. Even if nothing else runs the return of this function is NULL. So no 3rd Application conflicts. I notice a big performance lost with version 2.1 so thats why I want to install the new one.kneo
Camera capture works on ubuntu 12.04 out of the box (tested using guvcview). My suspicion is that some of the video backend (ffmpeg) is not compiled in/included. Try to build opencv yourself with ffmpeg enabled.count0
It has been two years :) I kind of lost this article. Anyways time heals wounds and so OpenCV in a newer version 2.4 works again. A Mod. may mark this as closed...kneo

1 Answers

0
votes

You could try to use strace and see which step fails. For example, it might try to open non-existing device file (/dev/something) or you might have problems with access permitions. Anyway,