简体   繁体   English

OpenCV:是否可以在Linux中的进程之间共享网络摄像头

[英]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. 这被要求用于Windows(答案是'splitcam'),但是我找不到在Linux上执行此操作的任何资源。

Is it possible to share webcam between processes (that use OpenCV) in Linux? 是否可以在Linux中的进程(使用OpenCV)之间共享网络摄像头?

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. 如果没有现成的方法,那么我正在计划一个共享内存的相机服务器进程,其他进程(最多5个左右)将连接到该进程。 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. 我不了解其他API,但是Video 4 Linux不支持进程之间的共享。

Your solution of making a server with shared memory is a good idea. 使用共享内存构建服务器的解决方案是一个好主意。 Let me suggest you Boost.Interprocess for that. 让我建议您使用Boost.Interprocess

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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