【发布时间】:2012-07-01 11:47:24
【问题描述】:
正如标题所说,我不确定如何将 IplImage 写入 V4l2 环回设备。我知道如何写入设备,正如我在这里发布的 How to write/pipe to a virtual webcam created by V4L2loopback module?
但现在我不确定如何将 IplImage 对象准确写入设备。如果我只写 image->imageData ,其中 image 是 IplImage *,当我使用“luvcview”查看设备时,格式错误的帧会显示大约一秒钟,然后它会引发以下错误。
luvcview 0.2.6
SDL information:
Video driver: x11
A window manager is available
Device information:
Device path: /dev/video3
Stream settings:
Frame format: YUYV (MJPG is not supported by device)
Frame size: 520x474 (requested size 640x480 is not supported by device)
Frame rate: 30 fps
libv4l2: error dequeuing buf: Invalid argument
Unable to dequeue buffer: Invalid argument
Error grabbing
Cleanup done. Exiting ...
可能是因为我没有将opencv图像转换为v4l2格式吗?还是 v4l2 参数与 IplImage 属性不匹配?如果可以怎么办?
如果有人知道这个错误的含义,请告诉我。
我决定单独发布这个问题,因为这个问题不是关于写入设备,特别是关于将 IplImage 写入设备。
谁能给我一个代码 sn-p 显示如何将 IplImage 写入 V4l2 环回设备?
【问题讨论】: