无法使用 OpenCV 从 FireWire 摄像头捕获图像

发布于 2024-12-10 21:55:59 字数 234 浏览 0 评论 0原文

我正在尝试在 Windows XP 上使用 OpenCV 2.3.1 从 Claron MicronTracker cam (FireWire) 捕获图像。函数cvCaptureFromCAM不起作用。我读到 OpenCV 在 Windows 平台下无法从 USB 以外的数码相机获取数据 - 这是真的吗?有没有在 Windows 上使用 OpenCV 从 FireWire 摄像头获取数据的解决方案?

请帮我。

I am trying to capture image from a Claron MicronTracker cam (FireWire) using OpenCV 2.3.1 on Windows XP. The function cvCaptureFromCAM does not work. I read that OpenCV is unable to get data from digital cameras other than USB ones under Windows platforms - is this true? There is no solution for getting data from a FireWire cam using OpenCV on Windows?

Please help me.

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

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

发布评论

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

评论(1

听闻余生 2024-12-17 21:55:59

您当然可以在 Windows 上将 OpenCV 与 Firewire 相机结合使用。我已经与几个不同的 Firewire 相机供应商(Point Grey、Imaging Source 等)完成了这项工作。不幸的是,您将无法使用 OpenCV VideoCapture 类来执行此操作。

您的选择是使用 CMU1394 驱动程序(假设您的上述相机与it),或者供应商的相机驱动程序来捕获帧并将这些数据缓冲区放置在 cv::Mat 中。如果您需要对相机参数进行特定控制,最好的选择是使用供应商的驱动程序。这将为您提供最大的控制权,但将您与他们的相机紧密结合。您可以对 VideoCapture 进行子类化,并在同一接口下实现供应商的驱动程序,以在一定程度上减轻这种耦合。

这里是使用 CMU 驱动程序执行此操作的简短示例。

< strong>编辑:今天我发现 OpenCV 自 2010 年 5 月以来已经内置了对 CMU 兼容相机的支持。实现此功能的类是 此处。我不相信默认情况下会将其编译到库中。因此,您必须自己从源代码构建 OpenCV。您需要取消注释 //#define HAVE_CMU1394 1 行才能使其正常工作。希望这有帮助!

You can certainly use OpenCV with Firewire cameras on Windows. I have done this with several different Firewire camera vendors (Point Grey, Imaging Source, etc.). Unfortunately, you will not be able to use the OpenCV VideoCapture class to do this.

Your options are to use the CMU1394 driver (assuming your above mentioned camera is compatible with it), or the vendor's camera driver to capture the frames and the place those data buffers in the a cv::Mat. If you need specific control of the camera parameters, your best bet is going to be to use the vendor's driver. This will give you the most control, but tightly couple you to their camera. You could sub-class VideoCapture, and implement the vendor's driver under the same interface to mitigate that coupling somewhat.

Here is a short example of doing this with the CMU driver.

EDIT: I found out today that OpenCV has had built in support for CMU compatible cameras since May 2010. The class which implements this is here. I do not believe this is compiled into the libraries by default. So, you are going to have to build OpenCV from source yourself. You'll need to uncomment the line //#define HAVE_CMU1394 1 to get it to work. Hope that is helpful!

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