Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control 2 USB camera to capture images from two different angle?

Hello,
I have Labview 7.1 and Vision Development Module with USB Logitech pro 9000 camera which I use capture character of a label in production line.
Is it possible to control 2 USB cameras to capture images of two different angle by switching between these 2 USB cameras?
 
 
Thanks,
 
Hart
0 Kudos
Message 1 of 9
(5,700 Views)
Hi Hart,

When you initialize your IMAQ session in LabVIEW, you should be able to specify which camera you are referring to.  Thus, you can use this to programmatically decide which camera to accept images from.  Each camera has its own unique name, and you can see this in Measurement and Automation Explorer (MAX).  Use the camera names that are assigned here, in LabVIEW.
Wes Pierce
Principal Engineer
Pierce Controls
0 Kudos
Message 2 of 9
(5,669 Views)

Hello Wes P,

I've tried to open MAX but I didn't see any USB camera names assigned in MAX? Does MAX support USB camera?

Thanks.

0 Kudos
Message 3 of 9
(5,654 Views)
 

Hi hart,

did you install the "NI-IMAQ for USB driver"?
See this link for further informations: http://zone.ni.com/devzone/cda/epd/p/id/5030 

Mike

0 Kudos
Message 4 of 9
(5,652 Views)
Yes I did install USB driver and I am using the USB camera vi in Labview 7.1.   I'm using MAX version 4.1.0.
 
Thanks
Hart
0 Kudos
Message 5 of 9
(5,650 Views)

Dear Hart,

USB cameras using the NI-IMAQ for USB Cameras driver will NOT show up in MAX due to the fact that this driver uses a DirectShow filter to access the camera. You can view the details here:

Why Can't I See My USB Camera in MAX?
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8f3SAC&l=en-US

You can still access and set attributes through LabVIEW.

Note that simultaneous acquisitions from more than one camera using the NI-IMAQ for USB driver is not supported. You can still switch back and forth between cameras programatically to take images from the cameras one at time, but manage your camera sessions carefully. It is known that opening and closing a camera session causes a small memory leak, and it is not recommended that you do this repeatedly.

I hope this helps!

~Nate

0 Kudos
Message 6 of 9
(5,626 Views)
Dear N_Holmes,
 
Thanks for your advice. I managed to switch between 2 USB cameras using Index Array.vi where I change the input of index array to 0 for 1st USB camera and 1 for 2nd USB camera (see attached file). The USB camera that I am using is Logitech Pro 9000 and Logitech Ultra Vision.
I have got a problem when I am using both same camera model. It couldn't switch between 1st and 2nd camera. I think labview can not distinguish if the USB interface given the same name.
What should I do to switch between 2 USB camera with the same model name?
 
Thanks in advance.
 
Hart
 
 
0 Kudos
Message 7 of 9
(5,597 Views)

Dear Hart,

When USB camera manufacturer's drivers do not give each detected camera a unique camera name when multiple cameras are plugged in, there is not too much you can do. When this is the case, you can either use two different USB camera models, or use a USB camera model whose driver will give each camera a unique name.

Best Regards,

~Nate

0 Kudos
Message 8 of 9
(5,544 Views)

The enumerated list of camera names that the property node returns is not read from MAX, it is read from the camera, and as such, when using two cameras of the same model, are not unique.  It is not possible for LabVIEW to differentiate the two cameras and will always choose the first of the two in the list...  I renamed my cameras in MAX in the hopes of using the same model camera for a 2 camera system, but LV doesn't see MAX's assigned name :-(...

 

Jim

0 Kudos
Message 9 of 9
(5,054 Views)