Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQdx Open Camera and MAX listing DirectShow cameras that are not connected

Using MAX IMAQdx Devices or the IMAQdx function Open Camera.vi, certain USB DirectShow cameras will always appear as connected or available when they are not.  Simply installing the vendor's DirectShow driver makes them appear in the available camera list.  In MAX, under Devices and Interfaces > NI-IMAQdx Devices, clicking on such a camera name results in an error and red X subsequently appearing for its name.  Closing and reopening MAX produces the same result.  In LabVIEW, the IMAQdx Open Camera.vi also shows such cameras in its Camera Name list.  A webcam however, does appear and disappear from that MAX IMAQdx Devices list or IMAQdx Open Camera name list when it is connected and disconnected.

 

IMAQdx Enumerate Cameras.vi with Connected Only set True will also list such cameras in its output Camera Information Array.

 

According to one vendor : "USB cameras that implement their DirectShow driver as a data source filter and register the filter as a "video capture device" will always shows the device (filter) no matter whether the physical device is connected or not. This contrasts with many other USB cameras (e.g. all web cameras) which implement their DirectShow support with a WDM stream driver."

 

This makes it difficult to display a list of connected cameras for users to select from. While the Camera Information Array output from IMAQdx Enumerate Cameras.vi can be looped over with IMAQdx Open Camera.vi and each Camera Open error output checked for True and an actual camera available list built from that (see attached example), it would be useful if both MAX and IMAQdx Open Camera.vi's Camera Name would automatically do that.

 

A request for MAX and IMAQdx Open Camera.vi's Camera Name to list only actually connected cameras is at LabVIEW Idea Exchange :

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/IMAQdx-Open-Camera-and-MAX-report-DirectShow-cameras-a...

 

Message 1 of 2
(4,005 Views)

Hi,

 

As you've pointed out here, this is currently expected behavior, and the workaround you describe does work. Thanks very much for taking the time to describe the situation and also for making a product suggestion for this. We're grateful for input from customers.

Ravi A.
National Instruments | Applications Engineer
0 Kudos
Message 2 of 2
(3,985 Views)