OpenCV 2.2 Ubuntu11.04 未检测到网络摄像头
我已经检查了 OpenCV SVN 存储库,安装了所有必需的库,编译并安装了它。一切都很好,除了找不到任何相机。
我目前有两个网络摄像头连接到我的计算机:内部网络摄像头和 PS3 Eye。
ls /dev/video*
给出
/dev/video0 /dev/video1
视频代码:
VideoCapture capture(0);
if(!capture.isOpened())
{
capture.open(1);
if(!capture.isOpened())
return 0;
}
打开视频文件而不是相机没有问题。
我尝试在 cap_v4l.cpp 中将 #include
替换为 #include
。
我还尝试了 Ubuntu OpenCV bug 321358 线程上的解决方案 。
有什么好主意下一步该怎么做吗?
这些相机在 Ubuntu 存储库版本上工作得很好,但我们正在开发 VSLAM,所以我们需要更新的东西。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您查看评论,可以在 Stackoverflow 上的这篇文章中找到解释。
简而言之,在 11.04 发行版中,Canonical 删除了对特定库的支持。因此,OpenCV 2.2(发行版)无法再在 Ubuntu 11.04 上编译。因此 OpenCV 的人们取消了 SVN 中对网络摄像头的支持。我想他们会尽快修复它
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