Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how to control programmatically the brightness and contrast while grabbing

I'm having trouble trying to apply programmatically any changes to the brightness or contrast or any other property to an IMAQ Session. It works perfectly when using IMAQ Snap, but it won't work using IMAQ Acquire.

Can anybody help me?

Thanks in advance.
0 Kudos
Message 1 of 5
(3,416 Views)
Most of the properties of an IMAQ session can't be changed during an active acquisition. Once you setup the Grab, the acquisition is active and properties can't be changed. It works with Snap because the acquisition is not continuous.

You would have to stop the acquisition, change the properties, and restart the acquisition.

Bruce
Bruce Ammons
Ammons Engineering
Message 2 of 5
(3,416 Views)
Hello. I have a PCI 1411 board (no Vision). I am currently using Grab to do acquisition which shows live video, and also I allow the user to take a snap of anything he finds interesting on the video. This snap is saved to the hard drive. I have been asked to allow adjustable contrast and brightness for the live video.

I haven't been able to find any VI's that have these as parameters. I see from this post that I am going to have problems with this capability using Grab. But, I can't use Snap to show continuous live video. (I haven't been able to get it to work)

Any ideas on how to implement this? Also, which VI's would I need to look at for adjusting brightness and contrast? I haven't been able to find any help using these words as key terms.

Tha
nk you so much for any help you can give me! Mary
0 Kudos
Message 3 of 5
(3,416 Views)
Hello. I got it! I figured out how to modify brightness and contrast. Then, to get it to update on the fly, I used the event handler to catch the slider events for each. In each event, I then closed the current IMAQ session, and started a new one with the new values. Then passed IMAQ session to Grab Acquire in the video loop.

There is a small time delay while it restarts the session, but that is acceptable to my customer, and it works like a champ!

Best regards,
Mary
0 Kudos
Message 4 of 5
(3,416 Views)
Thanks!
0 Kudos
Message 5 of 5
(3,416 Views)