Thursday, May 7, 2009

Using DC1394 firewire cameras with OpenCV v1.1pre on Ubuntu Jaunty

Since upgrading to Jaunty 9.04, OpenCV v1.1pre can no longer open the DC1394 video stream from my firewire camera (unibrain). It had been working fine on Ubuntu Intrepid. Recompiling OpenCV v1.1pre with Jaunty's newer version of libdc1394-13(-dev) didn't fix the problem.

After poking around I came up with the following workaround. It creates some symlinks in the /dev folder that match where OpenCV now expects the raw1394 device to be:

sudo mkdir /dev/video1394
sudo ln -s /dev/video1394-0 /dev/video1394/0
sudo chmod 777 -R /dev/raw1394 \
/dev/video1394-0 \
/dev/video1394

It appears OpenCV or libdc1394-13(-dev) is trying to open the wrong video block device file. It this continues to be an issue, this linking could be set up automatically in 'udev'.

Let me know if this helps you out!

4 comments:

  1. hey, I had the exact same problem and your workaround solved it perfectly !
    thanks !
    kikko

    ReplyDelete
  2. Hi,

    It perfectly worked with Ubuntu 9.04 and now everyhting works fine !

    Thanks !

    Asif Khan

    ReplyDelete
  3. sorry to bother you, but I'm trying to get the same working, actually using a unibrain as well (fire-i), but I'm having some problems. Is installing libdc1394-13, and making the link to the new/old location the only thing you had to do to get it working?

    Thanks!
    Chris

    ReplyDelete
  4. nevermind, I was using the packages provided by synaptic not opencv 1.1 from sourceforge. You're awesome, thanks!

    Chris

    ReplyDelete