如何解决opencv错误“VIDIOC_S_FMT错误16,设备或资源忙”

时间:2011-12-19 08:11:09

标签: ubuntu opencv usb webcam

我在ubuntu 11.10上使用opencv 2.1。当我试图运行一个示例程序来处理来自两个USB网络摄像头的视频时出现如下错误

我尝试了语句$ v4l2stereo -0 /dev/video0 -1 /dev/video1

有这样的错误

hue is not supported
hueauto is not supported
VIDIOC_S_FMT error 16, Device or resource busy

当我改变命令时$ v4l2stereo -0 /dev/video1 -1 /dev/video0 我收到了像

这样的错误
hue is not supported
hueauto is not supported
hue is not supported
hueauto is not supported
(Left image:2388): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(Left image:2388): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(Left image:2388): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
(Left image:2388): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
Failed to acquire images

请帮助我 谢谢

2 个答案:

答案 0 :(得分:2)

安装gtk2-engines-pixbuf应该可以解决视频问题:

$ sudo apt-get install gtk2-engines-pixbuf

答案 1 :(得分:0)

如果摄像机之前工作正常,但后来开始显示此错误,请确保您没有偶然修改视频内存分配。要仔细检查运行sudo raspi-config,并在高级选项> 内存拆分下,确保已分配至少128MB。