简体   繁体   中英

OpenCV: Is it possible to share webcam between processes in Linux

This has been asked for windows (the answer is 'splitcam'), but I can't find any resources for doing this on linux.

Is it possible to share webcam between processes (that use OpenCV) in Linux?

If there is no existing way to do this, then I am planning a shared-memory camera-server process, that my other processes (up to 5 or so) will connect to. Is attempting zero-copy sharing of the image data a sensible approach?

I dont know about others APIs, but Video 4 Linux doesn't support sharing between processes.

Your solution of making a server with shared memory is a good idea. Let me suggest you Boost.Interprocess for that.

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