LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB Camera ignoring imaq dx attribute set- sporadically.

I am cycling through four USB webcams, and capturing a frame each time I access a camera. I set the focus and exposure prior to capture with an imaq dx property node. As a forward note, I'll add that this phenomenon happens independently of the capture being Grab or Snap- in other words- this happens in both cases.

As I cycle through the cameras, sometimes all four will have successfully changed their exposure- sometimes only three- and sometimes none of them will have changed their exposure. I've placed waits in the flat sequence I am using (to wait for the exposure to change), and no amount of time seems to help. I hesitate to write out every combination of setup I have attempted to rectify this "sporadic exposure reaction", but it's been a couple weeks of trying things on and off.

Currently, the system is setting the attributes twice and grabbing the image twice. Saving/using the second grab to run through an algorithm. I will attach the VI; however it is in LV16 so, I'll throw in the screencaps, as well.

 

If anyone has had this issue/knows what I'm doing incorrectly/knows this is a common issue with usb cameras and the imaq dx drivers, please let me know!

Download All
0 Kudos
Message 1 of 3
(2,878 Views)

I'm also trying to set some Camera Attributes programmatically.  It is not an easy or consistent thing to do, for reasons I don't really understand.

 

Can you set these attributes reliably using MAX?  Do you know the type (Dbl, U32, etc) for each attribute?  For what it's worth, it's not you, it's the trickiness of Camera Control.

 

Bob Schor

0 Kudos
Message 2 of 3
(2,818 Views)

Hi there,

 

Does this issue only appear to be happening with the exposure property, or every property?

 

I noticed in your code that your first Wait function is not inside a sequence structure; it's free floating. If you include that inside a sequence structure, does that enforce enough wait time to let the camera set the new exposure setting?

 

And finally, what USB cameras are you using? I suspect this behavior is highly dependent on the vendor.

Thanks,

Rita Prather
Software Product Manager
rita.prather@ni.com
National Instruments
0 Kudos
Message 3 of 3
(2,786 Views)