C#:从多个 (USB ) 相机捕获静态图像

发布于 2024-12-16 20:07:06 字数 259 浏览 1 评论 0原文

我需要一些指导。 我必须创建一个简单的程序,每 n 秒从 4 个通过 USB 连接的相机捕获静态图像。 我的问题是,相机不能同时“打开”,因为它会超出 USB 总线带宽,所以我必须在它们之间循环。

如何做到这一点,我不太确定。 我尝试过使用 EmguCV,它是 OpenCV 的 .NET 包装器,但我在控制图像质量时遇到了困难。我可以按预期捕获 1280x720,但看起来它们只是按比例放大,并且所有图像文件都在 200kb 左右。

关于如何正确执行此操作有什么想法吗?

I need some guidance.
I have to create a simple program, that captures still images every n Seconds, from 4 cameras, attached with USB.
My problem is, that the cameras cannot be "open" at the same time, as it will exceed the USB Bus bandwidth, so I will have to cycle between them.

How to do this, i'm not so sure about.
I've tried using EmguCV, which is a .NET wrapper for OpenCV, but I'm having trouble controlling the quality of my images. I can capture 1280x720, as intended, but it seems like they are just scaled up, and all the image files are around 200kb.

Any ideas on how to do this, properly?

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

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

发布评论

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

评论(1

谜兔 2024-12-23 20:07:06

我不想回答我自己的问题,但这就是我最终这样做的方式。
我继续使用 EmguCV。图像不是很大(文件大小),但这似乎不是问题。他们以 96 dpi 保存,看起来相当不错。

我循环使用连接的相机,启动相机,拍摄快照,然后再次释放相机。

它没有我希望的那么快,但它有效。平均而言,每张图像之间有 2 秒的间隔。

I hate to answer my own question, but this is how I have ended up doing it.
I continued with EmguCV. The images are not very large (file size), but it seems like that is not an issue. They are saving with 96 dpi, and it looks pretty good.

I cycle through the attached cameras, by initiating the camera, taking a snapshot and then releasing the camera again.

It's not as fast as I had hoped, but it works. In average, there is 2 seconds between each image.

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