开发者

OpenCV 2.2 Ubuntu11.04 Webcam not detected

开发者 https://www.devze.com 2023-03-05 20:43 出处:网络
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 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.

开发者_如何学Go

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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号