如何将 opencv 映像 (IplImage) 写入 V4L2 环回设备
How to write an opencv image (IplImage) to a V4L2 loopback device?
正如标题所说,我不确定如何将 IplImage 写入 V4l2 环回设备。我知道如何写入设备,正如我在这里发布的那样 如何写入/管道到由 V4L2 环回模块创建的虚拟网络摄像头?
但是现在我不确定如何将IplImage对象准确地写入设备。如果我只编写图像>图像数据,其中图像是 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 环回设备?
我发现上述问题不再是问题,因为似乎luvcview或Skype并不完全支持v4l2。但是如果我使用 VLC 播放器查看环回设备,它工作正常。
相关文章:
- 写入向量<向量<bool>>
- 如何将内容数组写入文本文件?
- 写入位置0x0000000C时发生访问冲突
- 使用ios:ate写入到流会覆盖现有文件
- 独立读取-修改-写入顺序
- 为什么在某些情况下不写入此文件?
- 用C++将哈希表写入文件并从文件中恢复
- std::当在256字节边界上写入整数时,流的奇怪行为
- 为什么指针不写入类的地址?
- 如何打开并写入一个名称取自C++中字符串的文件
- 如何在C++中从文件中读取/写入多个对象
- 链表中写入访问冲突的未知原因
- 着色器纹理值与创建纹理时写入的值不同
- MESI协议和std::atomic-它是否确保所有写入立即对其他线程可见?
- 在C++中一次将矢量值写入多个文件
- 当字段可以为null时,如何使用C++接口在Avro中写入数据
- 写入文件会产生一个空文件或根本没有文件
- std::带有自定义缓冲区的 iostream 不允许我写入
- 在 C++ 中使用指针将对象写入文件
- 如何将 opencv 映像 (IplImage) 写入 V4L2 环回设备