PDA

View Full Version : Switch between multiple cameras



Stefan Kirschne
May 4, 2010, 17:57:03
Hello again,

I thought I'd open a new thread for this one.

In my previous thread, I mentioned that I am currently writing a thing for lasertracking.
So, there is a certain area where we want to know if our laser is there, and it will be covered by three DFK 31AU03 cameras (1024*768, USB).
I already thought that it could be a smart move to not have all three cameras running in simultaneously.

(just for the record - the bandwidth of one USB 2.0 host wouldn't fit the needs of three transmitting cameras like the ones above, right?)

So, at the moment my application has some kind of a wrapper class for administering multiple cameras. It creates one ImagingControl for each camera dynamically, sets the devices and calls LivePrepare() for each of the ImagingControls.
It takes the first Camera, calls LiveStart() and looks for the laser spot. If it isn't found, it calls LiveSuspend() and then LiveStart() on the next camera.

Once the laser is found in one of the views, it's position is monitored. If the laser if near the boundary of the covered area, the application guesses to which camera's area the laser is going. Once the laser is no longer found in the current camera's view, the cam is Suspended and the previously guessed camera started from prepared mode.

Up to now, I couldn't yet test this. The question is: Should I do it this way? How much time can be expected to pass from LiveStart() (out of prepared mode) until the first frame can be acquired? Should I rather take one USB controller per camera?

I hope I could get my explanation clear enough..

Greetings,

Stefan

Stefan Geissler
May 5, 2010, 09:08:42
Hi Stefan,

First of all, if the three cameras are connected to just one USB controller, you need an external power supply, that provides 1.5A at 5V.

Second: If the cameras run with BY8@15fps, you can stream two live video feeds in parallel. This may makes switching smoother.

The time between startLive and the first image in prepared mode depends on the frame rate and the exposure time. The minimum waiting time should be the frame rate's time interval, which is 66.6ms at 15fps. You may think of this to optimize your alghorithm.

However, if you use 3 USB controllers, then you can receive the three live feeds at 30 fps each.

Stefan Kirschne
May 5, 2010, 15:18:30
Hey Stefan,

thanks for the quick reply, I think I'll maybe go for the three controllers then.
But if not, you say I need an external power supply. Would that be one powered USB Hub per Camera?

Greetings,

Stefan

Stefan Geissler
May 10, 2010, 11:07:12
Stefan,


But if not, you say I need an external power supply. Would that be one powered USB Hub per Camera?

No, one hub for the three cameras will do fine, but you need a suitable power supply, that provides 5V 2A.

Stefan Kirschne
May 14, 2010, 00:48:52
Many thanks, I'll keep that in mind.