2

正如标题所说,我不确定如何将 IplImage 写入 V4l2 环回设备。我知道如何写入设备,正如我在此处发布的如何写入/管道到由 V4L2loopback 模块创建的虚拟网络摄像头?

但现在我不确定如何将 IplImage 对象准确写入设备。如果我只写 image->imageData,其中图像是 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 写入设备。

谁能给我一个代码片段,显示如何将 IplImage 写入 V4l2 环回设备?

4

1 回答 1

0

我发现上述问题不再是问题,因为 luvcview 或 skype 似乎不完全支持 v4l2。但如果我使用 VLC 播放器查看环回设备,它工作正常。

于 2012-07-08T15:21:52.513 回答