ofxvideograbber with unibrain Fire-i 785c SXGA 1394b camera.

Hey,

Just sharing my experiences in getting a Unibrain Fire-i 785c camera to work in colour at 1280x960x30fps.

http://www.unibrain.com/Products/VisionImg/Fire-i-785.htm

I am developing on Mac and the Unibrain FireAPI is only available on Windows so some of the more advanced options for their cheaper/lower spec modules weren’t immediately enabled as far as I could tell (the dev time and platform restrictions I have for the project has meant that I was pretty interested in immediacy!).

Using FW800 I kept being limited to 15fps, even when using VID_FORMAT_YUV411 as the input format,

  
set1394bMode(true);  
setROI(4, 0, 1280, 960); // the sensor width is 1288  
setFormat7(VID_FORMAT7_0);  
  

From the debug I could see that was working but after some more poking around I saw that the packet size was defaulting to values I’d expect from FW400.

I logged the values used to determine packet size in Libdc1934Grabber.cpp and found that none of the constants

  
DC1394_QUERY_FROM_CAMERA  
DC1394_USE_RECOMMENDED  
DC1394_USE_MAX_AVAIL  

resulted in a correct packet size.

I don’t know if that’s an issue with the Unibrain or the addon but I was able to reach 30fps by hard coding the packet_size to 8192 (the max allowed on 1394b).

I’m only using 1 camera on the bus so I don’t have to worry about subdividing. If anyone is looking at FW800 or unibrain cameras and needs to put more than one on the bus the answer will be here:

http://groups.google.com/group/fireapi/browse-thread/thread/f298a9ea4f68d03d

I’d like to follow this up when the project time allows - but for now, thought I’d mention it.

Andy

Hi,

The libdc1394 format 7 code in ofxVideoGrabber is pretty generic and is pretty widespread I think, so perhaps there’s a problem with libdc1394 if those constants are not working for you, or perhaps there’s a smarter way to determine the packet size (such as doing it manually given a specific frame rate). I might post to the libdc1394 list to find out more…

From the documentation:

The following definitions can be used to set ROI of Format_7 in a simpler fashion. QUERY_FROM_CAMERA will use the current value used by the camera, USE_MAX_AVAIL will set the value to its maximum and USE_RECOMMENDED can be used for the bytes-per-packet setting.