Re: [libdc] Two cameras on FireCard-800
Capture and control API for IIDC compliant cameras
Brought to you by:
ddouxchamps,
gordp
From: Balazs P V. <va...@ya...> - 2011-02-15 00:07:45
|
Hey Stig, This issue comes up regularly. I've been using two 1394b cameras at 1600x1200, 30fps (color) for stereo computer vision for quite a long time. In the beginning I was having image corruption issues all the time regardless of using a single interface board or two. It turned out that in my case (on various 2-3 yo highest end Dell Precision workstations) simply the PCI bus is not fast enough to handle all the load. Actually in theory it should be able to, but in practice it's not only your 1394 boards that are on the bus but other motherboard controllers, like the SATA controller, USB controller, etc are there too. These all end up consuming bandwidth in the same time, and if you add them up, then your two cameras and the other devices (especially SATA) will quickly saturate the bus. The ultimate solution is switching to PCI Express. However, even this solution can be tricky. Probably not as tricky as it used to be, but you still need to be careful when purchasing the board. The first PCIe 1394b boards actually used PCI firewire chipset with a PCI to PCIe bridge. Those were just as bad as the PCI versions in terms of performance. The only reason to buy them was when someone ran out of PCI slots on the motherboard. Therefore when you are buying the boards make sure they are native PCIe boards. Eventually we ended up getting several new Dual-bus PCIe FirePRO cards (WB-PCIE-02) from PointGrey that support two simultaneous full bandwidth 1394b channels. They are excellent, though a little pricey. Ever since we switched, we haven't experienced any image corruption. Today you might be able to find similar cards with native PCIe chipset at a much lower price. Balazs On Feb 14, 2011, at 4:34 AM, Stig Hornang wrote: > Hello, > > I've been trying to run two Sony XCD-U100 cameras simultaneously on > one ExpressCard/34 from Unibrain (FireCard800-e™ 1394b). I have > successfully run the same setup previously on a desktop PC with a > regular PCI FireWire card. > I've seen a previously thread about this problem on this mailing-list, > but no one has actually reported successful results with two cameras > on one ExpressCard. > > The problem is that I get is distorted images when running at full > resolution which is 1600x1200 at 15 fps and which I need. With *one* > camera running with iso speed 800 by calling with > dc1394_video_set_iso_speed(...) or using coriander I get the picture > through, but I get horizontal lines present randomly in the image. If > I set the iso speed to 400 the artifacts go away. It also works better > if I reduce the resolution to 1024x768 when running at 800. It is the > same problem using Format7 with the high resolution setting. > > When I run *two* cameras either using coriander or my own control > software the video from one camera gets really distorted, and is > completely useless. The other video is as described when using one > camera. There are like 3-4 four types of distortion that can occur, > they mostly consists of horizontal lines and displacements. The type > of distortion is usually constant per capture session (one iso > start/stop sequence). I've testet that the application can run for or > a day or two *with* distorted capturing without segfaulting or > halting. Some times the horizontal lines seem to be parts/"shadows" of > the previously received frames (typ. 1 second ago). You can see that > in the very end of my sample mono.mkv example video linked at the end > of this e-mail. > > I'm a little unsure of the iso speed setting, if it is a bus setting > common to all cameras or per camera thing. But at least I cannot set > it to 400 when running two cameras. Makes sense since the bus > utilization is close to 90% when running two cameras using 800, from > what I've seen in my previously successful setup. Setting it to 400 > with one camera seems to solve my problem with *one* camera, but then > I degrade the card to a 1394a card which is not what I bought. > > I'm very unsure whether this is a hardware or software problem. I've > tested the FireWire ExpressCard with a Dell Latitude XT2 and on a > Lenovo T510 using Ubuntu 10.10 with the Juju FireWire stack. The > problem is present as described above on both computers, although > slightly less distortion on the T510. It doesn't differ if I use > coriander (one instance for each camera) or my own software. With the > old Linux firewire stack the distortion is different, but still > completely ruining the image. Then it is more like blocks of the image > get shifted every now and then. Here it is also worse on one of the > video streams. > > You can find example capture with one camera and with two cameras > here: http://jalla.org/~stig/capture_problem/ > > When capturing from both cameras, I've recorded the worst distorted > camera. As you can see the stereo.mkv file is over twice as large as > mono.mkv even though it has shorter playtime . This is due to the > heavy distortion in this video. The codec really struggles with the > image so here there is also some additional codec distortion here. > > I guess this may not be a libdc1394 problem, but I presume the wisest > answer would be on this mailing. If I get the time I will try to use a > windows IIDC SDK or LabView and test two cameras and report here how > it goes. If it is still problem, I think the Unibrain 1394b card *or* > both the computers' ExpressCard interface must be crap (not very > likely). > > -- > Stig Hornang > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > Mailing list for libdc1394-devel > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libdc1394-devel |