Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Two Streams from one camera

Hello!  Appreciate any help this forum can offer, this is a somewhat general question.

 

In short, I want to know if it is possible with NI Vision to create a UI that has two 'real-time' video streams from one camera.  I plan on using an Allied USB3 camera (model TBD).  

 

More details -- I have an optical setup that is using different illumination sources.  I'm using a chopper (of sorts) to alternate between the two different illumination sources and I would like to use one in-line camera to view the streams separately.  

 

I'm moderately familiar with labview for instrument/DAQ control, etc.  I've only used the vision module for simple acquisition in the past.  I don't have the vision module now, so I'm asking to see if I should start down a LabView path with this or try to make python work.  

 

Any input is appreciated.

0 Kudos
Message 1 of 4
(1,255 Views)

I don't know your camera model, we use Allied Vision GigE Vision cameras. These models can usually work in triggered mode. So if you can synchronise your light sources with the camera, you can just check the frame number and process odd and even images differently in your consumer loops. I can't imagine that you can create two separate streams for one camera, neither in LV nor in Python...

For LV you will probably need IMAQdx driver and Vision Development Module. At least that is the path of least resistance.

Message 2 of 4
(1,235 Views)

I don't think it would be too difficult.  You would need a trigger every time the lighting changes so that the frames can be synchronized with the lighting.  Otherwise you could end up with an image with half and half lighting.

 

In LabVIEW all you need to do is read the incoming stream and put all the odd frames in one buffer and the even frames in the other.  You would need a second trigger to indicate when lighting mode A is active.  This would be used to start the overall acquisition and make sure the first frame is always during mode A.  Otherwise you would have two streams but not know which is which, and they could swap the next time you run it.

 

One difficulty will be brightness levels.  The camera has to handle both lighting types with the same exposure, gain, etc. since it can't switch settings every frame.  If they are significantly different brightness, you are going to have a very bright stream and a very dark stream.  In this case, I would consider buying two cameras and putting them side by side, maybe using a splitter prism if the lens assembly is expensive.  Cameras are not terribly expensive and it could eliminate a lot of headaches.

 

Bruce 

Bruce Ammons
Ammons Engineering
Message 3 of 4
(1,227 Views)

@p4keal and @BruceAmmons -- thx very much for you input.  Appreciate you taking the time to reply -- I will try the method you suggest.

 

Good point about the lighting -- I hadn't considered that and agree it will take some tweaking to get the illumination correct for both cases such that one camera gain/exposure/etc will work for both.  Great suggestion.

 

Thanks again!

0 Kudos
Message 4 of 4
(1,056 Views)