3 使用 videoInput 或其他方式进行相机捕获

发布于 2024-11-04 19:05:33 字数 578 浏览 0 评论 0原文

我正在从事实时制作高动态范围视频的项目。目标是使用 3 个现成的网络摄像头 (Microsoft LiveCam Studio) 来实现此目的。我开始尝试使用 OpenCV,但我很难用它来打开相机。所以我直接跳到videoInput。我可以让任意两个相机协同工作。我可以让任意两个网络摄像头与笔记本电脑上的内置网络摄像头配合使用。但如果我尝试同时运行所有三个网络摄像头,我会得到

错误:无法启动图表'

在花了几个小时调查 videoInput.cpp 之后,我无法弄清楚为什么两个相同类型的相机没有问题,但当我添加第三个相机时却失败了。

当我到达这堵意想不到的墙时,我以为我的项目快完成了。

您对此有什么想法吗?

Windows 7(64)

Visual Studio 2011

我需要以同步方式从所有 3 个摄像头获取帧。我愿意接受有关如何完成这项工作的任何建议。有没有其他框架可以让我避免使用 DirectShow 或 MediaFoundation?有谁有我可以查看的代码,可以打开多个摄像头并从流中提取帧吗?

I am working on project to produce High Dynamic Range Video in real time. The goal is to do it with 3 off the shelf webcams (Microsoft LiveCam Studio). I started off trying to use OpenCV, but I was having difficulties getting it to open the cameras. So I jumped straight to videoInput. I can get any two of the cameras to work with each other. And I can get any two webcams to work with the built in webcam on my laptop. But if I try to run all three webcams together, I get

ERROR: Could not start graph'

After spending several hours investigating videoInput.cpp I can not figure out why it would have no problem with two cameras of the same type, but fail when I add the third.

I thought I was almost done with my project when I reached this unexpected wall.

Do you have any thoughts on this?

Windows 7(64)

Visual Studio 2011

I need to get a frame from all 3 cameras in a synced manner. I am open to any suggestions on how to get this done. Is there any other framework out there that will let me avoid DirectShow or MediaFoundation? Does anyone have code that I can look at that will open multiple cameras and pull frames out of the streams?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

再浓的妆也掩不了殇 2024-11-11 19:05:33

摄像头很可能仅通过 directshow 连接(至少在 Windows 上),我不知道 Microsoft 提供了任何低级 API 来直接与摄像头对话。

您可以使用常规网络摄像头查看器同时运行 3 个摄像头吗?

这可能是 directshow 或 USB 带宽的限制 - 尝试将它们连接到不同的端口。

即使如此,您也无法使用 directshow 准确同步摄像机,时间将长达帧间隔(1/10 秒?)。

It's likely that the cameras only connect through directshow (at least on windows), I don't know of any low level API supplied by Microsoft to talk to the cameras directly.

Are you able to run 3 cameras simultaneously using the regular webcam viewer?

It may be a limitation in directshow or the bandwidth of the USB - try connecting them into different ports.

Even then you are not going to be able to sync the cameras accurately using directshow, the timing will be up to a frame interval (1/10s?) out.

海的爱人是光 2024-11-11 19:05:33

典型的问题是 USB 带宽不足以同时运行两个摄像头,两个摄像头独立运行都很好,但一旦你尝试同时运行它们,就会失败。另一个不太常见的原因是摄像头驱动程序。也许您可以在低分辨率模式下尝试 - 如果此尝试成功,那么带宽不足的版本是最有可能的。

有时,您可以通过将相机连接到不同的 USB 主机/控制器(而不是同一主机上的端口!)来解决问题。 API 本身并不限制您一次只能使用一台相机。

The typical problem is that USB bandwidth is insufficient for two cameras running in the same time, both cameras do fine independently but once you try them both - you have a failure. Another less frequent reason is the camera driver. Perhaps you can try it out in low resolution mode - if this attempt succeeds then version with insufficient bandwidth is the most likely one.

Sometimes you can work things around by connecting cameras to different USB hosts/controllers (not the ports on the same host!). The API itself does not limit you to use one camera at a time only.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文