问题
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.
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.
Is there any way in C++ or java to emulate a webcam and output video through it ?
回答1:
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++.
Alternatively you can use kurento media server which allows you to write custom OpenCV plugin for manipulating the video stream.
来源:https://stackoverflow.com/questions/37827867/stream-opencv-output-as-emulated-webcam