Unable to capture image from FireWire cam using OpenCV

末鹿安然 提交于 2019-11-30 10:01:42

问题


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.


回答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!



来源:https://stackoverflow.com/questions/7822032/unable-to-capture-image-from-firewire-cam-using-opencv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!