1
votes

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.

1
Write an answer with the solution, please.Lightness Races in Orbit

1 Answers

1
votes

You can find an explanation in this post at Stackoverflow, if you look at the comments.

The short explanation is that in the 11.04 distribution, Canonical removed the support for a particular library. So, OpenCV 2.2 (release) cannot compile anymore on Ubuntu 11.04. So the people at OpenCV removed the support for webcams in the SVN. I suppose they'll try to fix it as soon as possible

The most recent SVN version compiles, but cannot load video files nor use attached cameras