Unable to capture image from FireWire cam using OpenCV

3.8k views Asked by At

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

There are 1 answers

2
mevatron On BEST ANSWER

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!