two firewire cameras (1 Fire-i and 1 (stereo) MicronTracker

Hello,

I have a problem with the video grabber and the two firewire cameras.
The two cameras use the same channel I think and when I start the videograbber im getting this error…

/home/varoudis/Desktop/Project/zmkl-t00l-v02/bin
Attached 2 camera(s). Curr camera is 6021077
Loaded 12 marker templates
choosing device 0: Unibrain Fire-i BCL 1.2 9740164605
Unicap : Failed to start capture
Unicap : Failed to wait for buffer
Unicap : Failed to wait for buffer

***dmseg
[ 6781.728753] ieee1394: Node changed: 0-03:1023 -> 0-00:1023
[ 6781.728773] ieee1394: Node suspended: ID:BUS[0-01:1023] GUID[081443610264dcfd]
[ 6781.728812] ieee1394: Node suspended: ID:BUS[0-00:1023] GUID[00b09d01005bdfd5]
[ 6782.117714] ieee1394: The root node is not cycle master capable; selecting a new root node and resetting…
[ 6782.146564] ieee1394: Node resumed: ID:BUS[0-00:1023] GUID[00b09d01005bdfd5]
[ 6782.153311] ieee1394: Node resumed: ID:BUS[0-01:1023] GUID[081443610264dcfd]
[ 6782.154255] ieee1394: Node changed: 0-00:1023 -> 0-03:1023
[ 6788.257114] process `skype’ is using obsolete setsockopt SO_BSDCOMPAT
[ 6805.126002] video1394_0: Channel 0 is already taken
[ 6918.835955] video1394_0: Channel 0 is already taken
[ 6965.092182] video1394_0: Channel 0 is already taken
[ 6988.197549] video1394_0: Channel 0 is already taken
[ 7002.348076] ieee1394: unsolicited response packet received - no tlabel match
[ 7006.216091] ieee1394: unsolicited response packet received - no tlabel match
[ 7006.230762] ieee1394: unsolicited response packet received - no tlabel match
[ 7006.401013] ieee1394: unsolicited response packet received - no tlabel match

Im using the latest Ubuntu 32bit and 0.05 of with openCV addon (FAT)

I dont have any experience with firewire and I dont know how to handle channels etc…

Any help or tips are welcome…

thnx,
T

with setVerbose()

listing available capture devices

Video device 0: Unibrain Fire-i BCL 1.2 9740164605
Video device 1: Built-in iSight (0000:00:1d.7)

Attached 2 camera(s). Curr camera is 6021077
Loaded 12 marker templates
Unicap : Using device /dev/raw1394
Unicap : Using module Unibrain
choosing device 0: Unibrain Fire-i BCL 1.2 9740164605
Unicap : Available formats for this device:
Unicap : 0: YUV(4:4:4) 160x120, min size: 160x120, max size:160x120, default size: 160x120
Unicap : 1: YUV(4:2:2) 320x240, min size: 320x240, max size:320x240, default size: 320x240
Unicap : 2: YUV(4:1:1) 640x480, min size: 640x480, max size:640x480, default size: 640x480
Unicap : 3: YUV(4:2:2) 640x480, min size: 640x480, max size:640x480, default size: 640x480
Unicap : 4: RGB 640x480, min size: 640x480, max size:640x480, default size: 640x480
Unicap : 5: Y(Mono) 640x480, min size: 640x480, max size:640x480, default size: 640x480
Unicap : Selected format: RGB 640x480, with size 640x480
Unicap : Failed to start capture
Unicap : Failed to wait for buffer
Unicap : Failed to wait for buffer

Hi Varoudis

sorry for late reply.

Are you trying to open both devices at the same time?, in the output it seems you’re only opening one of them, and that the second one is not a firewire device but your laptop camera.

Do they work if you only have one of them connected?

Can you test them with ucview? follow the instructions here to add repositories:

http://unicap-imaging.org/using-repositories.htm

and install it with

sudo apt-get install ucview

Hello :slight_smile: (not a problem)

The problem occurs when Im trying to Init the video grabber on the Fire-I camera (an the MicronTracker is connected)… if the camera is a USB (not the Macbook one… but a creative webcam) everything goes OK!

The ucview can read the Fire-I camera when the MicronTracker is connected on the firewire and not Initialized…(ie not using the firewire channel)

Its a firewire channel issue I think…

Anyone with experience on that?

Thnx
Tasos

From this link:

http://damien.douxchamps.net/ieee1394/libdc1394/v2.x/faq/#Can-I-run-more-than-one-camera-simultaneously

It seems channels should be automatically setted:

What is the ISO channel variable for?

As firewire is a shared bus, each camera must place a unique identifier in each packet so that the software can identify which camera a frame came from. The unique identifier used here is known as the ISO channel, and is just an integer. As well as writing the ISO channel number to the camera, you must also tell the video1394 layer which channel(s) it should listen for packets on.

The ISO channel allocation is automatic but you can also override it manually with dc1394_video_specify_iso_channel(). Should you choose to do it manually you should call the previous function before setting up the capture. You must first choose a unique channel number for the camera you are retrieving images from. If you are looping around an array of cameras, your loop variable “i” or “i+1” could be a suitable unique ISO channel identifier, or you could use the raw1394 (nodeid_t) node number as the channel number, which allows re-use of channel numbers on separate ports (host adaptors).

There’s a linux tool to write that kind of parameters:

sudo apt-get install libiec61883-dev

plugreport --> provides info about your devices
plugctl --> allows to change parameters

Use coriander to know your camera node and then:

plugctl -n node oPCR[0].channel=xx

Although I’ve tried with my device and it doesn’t seem to work.

Hi,

How did/do you select a different ISO channel in OpenCV?

I have two firewire cameras on the same bus, but can only select one of the cameras in OpenCV.

FYI: I can easier select between both cameras using coriander.

Thx.

Do you mean using cvCapture directly? if so, when you create the capture, you should specify the device id with:

cvCreateCameraCapture( 300 );

I think firewire devices id’s in linux begin with 300, so the first one should be 300 and the next 301.

For some odd reason (maybe not enough sleep) the following didn’t work the other day, but now it is for firewire devices on the same bus:

  
  
for (i = 0; i < numCameras; i++) {  
  captures[i] = cvCaptureFromCAM(i);  
}  
  

Thx but.

Hi, how well does the fire-i camera works in Linux? how many FPS do you get?

Im thinking in buying one, i wonder if you could provide a couple of shots. Are you able to set exposure and gain manually?

thanks!!

Works straight out of the box with coriander or using OpenCV.

~30fps

Exposure yes, but gain no. Please not I’ve only tested that using the coriander features.

Enjoy.

with ucview you can set gain manually