无法使用OpenCV从FireWire凸轮捕获图像 [英] Unable to capture image from FireWire cam using OpenCV

查看:113
本文介绍了无法使用OpenCV从FireWire凸轮捕获图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Windows XP上的OpenCV 2.3.1从Claron MicronTracker凸轮(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?

请帮助我.

推荐答案

您当然可以在Windows的Firewire摄像机上使用OpenCV.我已经与多家不同的Firewire相机供应商(Point Grey,Imaging Source等)完成了此任务.不幸的是,您将无法使用OpenCV VideoCapture类执行此操作.

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.

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

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.

此处是使用CMU驱动程序执行此操作的简短示例.

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

编辑:我今天发现,OpenCV自2010年5月起就内置了对CMU兼容摄像机的支持.实现此目标的类为

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!

这篇关于无法使用OpenCV从FireWire凸轮捕获图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆