LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Steve_TDiode

IMAQdx Open Camera and MAX report DirectShow cameras actually connected

Status: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.

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.

2 Comments
BlueCheese
NI Employee (retired)
This approach would have serious problems with thread-safety since if you called Eumerate in multiple applications simultaneously then you would get intermittent failures if the device is momentarilly in use by another thread or process. Eric
Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.