【问题标题】:How to write an opencv image (IplImage) to a V4L2 loopback device?如何将 opencv 图像(IplImage)写入 V4L2 环回设备?
【发布时间】: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 环回设备?

【问题讨论】:

    标签: c++ c linux opencv v4l2


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2011-04-24
      • 1970-01-01
      • 2010-09-28
      • 1970-01-01
      • 1970-01-01
      • 2010-09-28
      • 1970-01-01
      • 2011-01-18
      • 2011-07-08
      相关资源
      最近更新 更多