OpenCV: how to be capable to capture frames from same camera with 2 different apps?

六月ゝ 毕业季﹏ 提交于 2019-12-24 12:28:17

问题


So I have 2 diffrent apps that use web-cameras (on Windows) I created tham bouth but I need them to be separate, stand alone apps. I want tham bouth to be capable to capture from same camera. What should I add to my capturing OpenCV code?


回答1:


You can't. Only one application can access any device at a time - even with common I/O devices like hard disks.

If multiple applications could access a device simultaneously, it would be confused whose instructions to follow.

You can use SplitCam, though. It will connect to the webcam (and no other application can). But it will create virtual devices that other applications can connect to.




回答2:


Not sure, but i think the only way is to use COM (on windows) because you can't create two capture filters per one device. But you can create a splitter filter, put it in a DirectShow graph and share access to it through COM. I don't know how to do it exactly, just an idea.




回答3:


Use SplitCam.



来源:https://stackoverflow.com/questions/4238029/opencv-how-to-be-capable-to-capture-frames-from-same-camera-with-2-different-ap

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!