Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

use enumerate camera to start camera session

Hello -

I am using Labview 2010 with Vision Assistant and NI-IMAQdx to operate a
Lumenera USB camera.  We used to use IMAQ-USB to enumerate connected
cameras
and select the proper camera to use.  The output from the NI-IMAQdx
enumerate
cameras VI, however, is not compatible with the open session VI in
NI-IMAQdx.
I was not able to find an example with enumerate cameras.

Right now we select the camera by passing the result of enumerate cameras
into
an array and selecting an array index (which is how we used to do it in
NI-IMAQ-USB).  I tried to unbundle the array and select a camera session,
but
that was not an element of the bundle.  If anyone has an example
demonstrating the use of IMAQdx enumerate cameras, that would probably be
fine.

Thanks,
Hannah

Hannah  

0 Kudos
Message 1 of 6
(5,825 Views)

Hi Hannah,

 

It appears that you can simply wire the InterfaceName from the cluster of the desired camera element straight into the IMAQdx Open Camera.vi and it will coerce the string into the required Session In terminal.  However, is there a reason why you do not create a control/constant directly from the Session In terminal on the Open Camera.vi?

 

Thanks!

 

- Greg J

0 Kudos
Message 2 of 6
(5,764 Views)

Hi Greg -

 

Thanks for the advice.  Passing the interface name is correct.  I'm afraid I don't understand what you mean about passing a control or constant - you mean if I already know the camera I want to use I could pass its interface name straight to the Open Camera VI? 

 

Also, I'm not sure if anyone would know the answer to this, but now that the camera is set up I am having trouble configuring it.  I am using a Lumenera USB camera - with IMAQ-USB the camera was confiugred with its proprietary VIs and then those settings were automatically passed and used when the IMAQ-USB vis controlled acquisition.  That does not seem to be happening right now - does anyone know how I can change properties not accessible through the IMAQ attributes property node (e.g. frame rate and gamma value - these are dynamic in the camera VIs).

 

Thanks!

Hannah

0 Kudos
Message 3 of 6
(5,734 Views)

Hi Hannah,

 

Regarding your first question about the Open Camera.vi, all you need to do is right click on the Session In terminal, create a constant or control, and select your camera in the drop-down menu.

 

Camera Open VI

Also, if you are using the Grab.vi to continuously acquire from your USB camera, then you will configure the 'framerate' in software by adding timing in your loop.  Any properties that can be configured programmatically with your camera can be accessed by wiring the session into a Property Node which can be found in the NI-IMAQdx palette.

 

I hope this helps!

 

- Greg J

0 Kudos
Message 4 of 6
(5,712 Views)

Hi Hannah,

 

If you go to MAX you should be able to see all the features that your camera (and its DirectShow driver) exposes to IMAQdx. "Gamma" would be visible as an attribute directly. There is no direct "framerate" attribute in DirectShow but rather it is part of the available video modes. Usually there is a range of different video resolutions and corresponding frame rates that you can select. Once you have an idea of the features your camera makes available, you can adjust those same settings using the Attribute Get/Set APIs using property nodes in LabVIEW.

 

Eric

Message 5 of 6
(5,705 Views)

Hi Greg and Eric (and anyone who might be interested),

 

I am in a similar situation where I started using IMAQdx after successfully working with IMAQ USB for some years. And in my case, the Enumerate Cameras.vi doesn't list any attached cameras at all.

 

Since I don't see any camera in the list, I had already tried that hard way (as Greg has suggested above) by putting the camera "supposed name" in "Session In" and it gave no results.

 

Can you please check the thread I have created for this? 

 

Thanks ahead!

Vaibhav
0 Kudos
Message 6 of 6
(5,388 Views)