嘿,我正在学习 Derek Molloy 的教程:
使用 Linux UVC 驱动程序支持的罗技 c310 网络摄像头。
root@beaglebone:/boneCV# v4l2-ctl --all
Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : UVC Camera (046d:081b)
Bus info : usb-musb-hdrc.1.auto-1
Driver version: 3.8.13
Capabilities : 0x84000001
Video Capture
Streaming
Format Video Capture:
Width/Height : 640/480
Pixel Format : 'YUYV'
Field : None
Bytes per Line: 1280
Size Image : 614400
Colorspace : SRGB
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 640, Height 480
Default : Left 0, Top 0, Width 640, Height 480
Pixel Aspect: 1/1
Video input : 0 (Camera 1: ok)
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 0
Priority: 2
所以我们可以看到它被 Beagleboard 读取没有问题。 当我 try catch 视频时,我只是收到此错误:
root@beaglebone:/boneCV# ./capture -f -c 600 -o > output.raw
Force Format 1
select timeout
看其他帖子,好像都不知道怎么回答这个问题,有这方面经验的大神能帮帮我吗?
最佳答案
如果比较 YUYV 和 MJPEG 的图像大小,您会发现前者比后者大得多。 BBB 的 USB 端口带宽有限,因此您无法以 YUYV 格式操作相机。 MJPEG 输出压缩视频流。不同的 opencv 版本往往会更改您使用 v4l2-ctl
命令设置的分辨率,因此您必须更改 boneCV 代码中的分辨率。我不确定它是如何在 C++ 中完成的,但在 Python 中,检查 Changing camera resolution in opencv code .据马修说,Bandwidth limitations他测试发现带宽为13.2MB/s。
关于linux - Beaglebone 黑色视频捕获 : Error "select timeout",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30884805/