将OpenCV输出流模拟为网络摄像头? [英] Stream OpenCV output as emulated webcam?
问题描述
我正在使用Intel Realsense摄像头,该摄像头以PXCImage格式输出视频.我想用Java或C ++进行阅读,将其转换为OpenCV Mat格式,并将其作为网络摄像头流进行直播,可以被任何其他网络摄像头应用程序读取.
Im working with the Intel Realsense Camera which outputs video in PXCImage format. I want to read this in Java or C++, convert it to OpenCV Mat format and stream it live as a webcam stream which can be read by any other webcam application.
我找到了将流读取并将其转换为Mat格式的代码,但是我陷入了必须将其作为网络摄像头流输出的部分,以便可以被任何任意应用程序读取.
Ive found code to read and convert the stream to Mat format, but Im stuck at the part where I have to output it as a webcam stream so it can be read by any arbitrary application.
在C ++或Java中,有什么方法可以模拟摄像头并通过它输出视频?
Is there any way in C++ or java to emulate a webcam and output video through it ?
推荐答案
如果您只想重新播放视频 ffserver
会有所帮助.它是ffmpeg
程序包的一部分,该程序包是一个独立的应用程序,但带有一些
If you only want to re-stream the video ffserver
would help. It's part of ffmpeg
package which is a standalone application but with some tricks can also be called from C/C++.
或者,您可以使用 kurento
媒体服务器,该服务器允许您编写自定义OpenCV插件来操作视频流.
Alternatively you can use kurento
media server which allows you to write custom OpenCV plugin for manipulating the video stream.
这篇关于将OpenCV输出流模拟为网络摄像头?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!