OpenCV的2.3.0+:cvCaptureFromCAM返回null [英] OpenCV 2.3.0+: cvCaptureFromCAM returns null
问题描述
我试图让一个应用程序的Ubuntu 11.04与下OpenCV的2.3.0(稳定)和最新的SVN-修订工作为好。在code完美的作品在Windows下。
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工程一次,但现在它拒绝自去年Ubuntu的更新或什么工作。
有没有一种可能,以获得新的图书馆工作?
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?
我恢复到了Ubuntu运库,适用于现在,但它是巨大的,如果我能说服最新的稳定版本工作过。
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.
推荐答案
您可以尝试使用 strace的
,看看哪些步骤失败。例如,它可能会试图打开不存在的设备文件(的/ dev /东西
),或者你可能有访问permitions问题。无论如何,
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,
这篇关于OpenCV的2.3.0+:cvCaptureFromCAM返回null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!