1

I have checked out the OpenCV SVN repo, installed all necessary libraries, compiled it and installed it. Everything is fine, except that it won't find any cameras.

I currently have two webcams connected to my computer, the internal webcam and a PS3 eye.

ls /dev/video* gives

/dev/video0 /dev/video1

The video code:

VideoCapture capture(0);
if(!capture.isOpened())
{
   capture.open(1);
   if(!capture.isOpened())
      return 0;
}

There are no problems with opening video files instead of cameras.

I have tried to replace #include <videodev.h> with #include <libv4l1-videodev.h> in cap_v4l.cpp.

I have also tried the solutions on the Ubuntu OpenCV bug 321358 thread.

Any good ideas what to do next?

The cameras works just fine with the Ubuntu repository version, but we are working on VSLAM, so we need newer stuff.

4

1 回答 1

1

如果您查看评论,您可以在 Stackoverflow的这篇文章中找到解释。

简短的解释是,在 11.04 发行版中,Canonical 删除了对特定库的支持。因此,OpenCV 2.2(发行版)不能再在 Ubuntu 11.04 上编译。所以 OpenCV 的人取消了对 SVN 中网络摄像头的支持。我想他们会尽快修复它

最新的 SVN 版本可以编译,但无法加载视频文件,也无法使用附加的摄像头

于 2011-05-12T08:02:12.430 回答