简体   繁体   中英

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

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?

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.

使用SplitCam

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM