Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

several web cams in vision builder with ni imaq for usb

Solved!
Go to solution

Hello,

I have a question about ni imaq for usb in ni vision builder ai 3.6 (I have made a vi with imaq and I run it in vision builder) and I want to know how I can connect several web cams to the computer and how many of them can be connected. can they all be from one brand and one model and can they be run with one driver installed on the computer?

thank you

0 Kudos
Message 1 of 14
(6,128 Views)

NI-IMAQ for USB is currently limited to working with a single USB camera at a time.

 

How many web cams would you like to use at once? Would it be possible to share some information about your application?

 

Johann

0 Kudos
Message 2 of 14
(6,119 Views)
Solution
Accepted by topic author lightgoal

Hi,

 

In general NI-IMAQ for USB can only support one camera at a time. You can acquire from multiple cameras (non-simultaneously) by using the IMAQ USB Enumerate Cameras VI to identify each camera plugged into your system and access them through the other IMAQ for USB VIs.

 

I would also like to point out that Vision Builder AI does not support the NI-IMAQ for USB Cameras driver. It is designed to solve machine vision applications but USB cameras usually don't provide the triggering or advanced modes necessary for machine vision.  Because machine vision and USB cameras don't usually go together, we didn't provide support for USB cameras within Vision Builder AI.

Message 3 of 14
(6,110 Views)

hello, thank you for taking part to solve this problem.

can we connect several usb cams and read from each, one by one, I mean not at a time but in turn read them one by one. that's because we have about 30 seconds to scan one part in different angles

and another question is that I don't know what "Enumerate Cameras VI" is and how it works? and a little more explaination about the way of using this system could be very much helpful.

thank you.

0 Kudos
Message 4 of 14
(6,095 Views)

lightgoal,

 

The Enumerate Cameras.vi is one of the vi's you can select from the IMAQ for USB palette and what it does is list all the cameras you have. You may then choose from this list, which camera you want to acquire from. Another forum post addresses this particular problem and you will run into the problem that all your USB cameras will be named the same. However, this KB will help you fix that.

 

0 Kudos
Message 5 of 14
(6,077 Views)

I'm a new guy to labview and I don't know how to use Enumerate. I don't know how I can chose camera 1 or camera 2. I also want to know how to chose the suitable camera resulotion for my job. The camera has several optional resolutions 640*480-800*600-1200*1600 and the default chosen resultion is 640*480. I want to chose 1200*1600 and I don't know how to do it.

Isn't there a help file for "imaq for usb" which we can find every vi instruction in there?

thank you

0 Kudos
Message 6 of 14
(6,039 Views)

I want to make a VI that snaps one image from camera one in the chosen resolution.

and another VI that snaps image from camera two in the chosen resolution and so.

It's alse a great idea to tell me how to do that using the "imaq for usb example" which is provided by ni.

thank you

0 Kudos
Message 7 of 14
(6,038 Views)

lightgoal,

 

Did you have time to take a look at the linked forum post that I previously posted? Someone else had posted a screenshot of a vi that is doing what you are asking about. What Enumerate does is looks for all the cameras connected to your computer and lists them in a string array. From that array you can choose a camera to communicate with. If you want access to the properties of your cameras, you can use the IMAQ USB Property Page.vi to configure the resolution of your cameras. 

 

Finally, I like to point out that, as it says in our NI-IMAQ for USB page: Although NI-IMAQ for USB Cameras comes with  documentation, it is not officially supported by the National Instruments Corp. This is because we target more industrial uses of vision and most USB cameras are webcams. If your application requires the capture of quality images, I would suggest that you invest in firewire or GigE cameras, which we do support.

 

Perhaps someone else here in the forums has tried to do something similar.

0 Kudos
Message 8 of 14
(6,008 Views)

It is possible to make and run several instances of imaq for usb in the same vi and in this way acquire images from several (at least 2) usb cams at the same time (simultaneously). In principle, make copies of the imaq for usb vi's and rename them, copy the ImaqDirectShowDll.dll in the windows/system32 folder and rename it. Then relink the copied imaq for usb vi's dll calls to point to the renamed dll. Then build your vi with different sets of imaq for usb vi's for the different usb cams. In this way you are only handling one camera with each imaq for usb but since you are running distinct copies of the vi’s and dll’s, LV will see this as separate programs and then each set can acquire from its own camera.

0 Kudos
Message 9 of 14
(4,866 Views)

This thread is very much out-of-date. DirectShow support is now officially in IMAQdx (part of Vision Acquisition) and is much, much improved from the IMAQ USB driver. It supports any number of cameras simultaneously, gives control over attributes like exposure time, can be used in all our software like Vision Builder AI, and is fully supported by NI.

 

You can download it here: http://joule.ni.com/nidu/cds/view/p/id/1641/lang/en. Note that you will need a license to use it after 30 days. However, the old IMAQ USB driver required a Vision Development Module license I believe, and if you have a Vision Development Module license you should have one for Vision Acquisition with it.

 

Eric

0 Kudos
Message 10 of 14
(4,838 Views)