setVideoGain
Top  Previous  Next

setVideoGain ( integer Gain )

Use this function to set the camera circuit Gain control.

Depending on the video driver and availability of the Gain feature, the function performs the following actions:

 
Simulation
No action

BitFlow Camera Interface
No action

FireWire (IEEE-1394)
Sets the Gain reference level or AutoGain mode

GigE Vision
Sets the Gain reference level
OPUS camera
No action
Video for Windows (VFW)
No action

DirectShow (WDM)
No action



Parameters
 
 
Gain  
 
An integer specifying the camera Gain. The parameter should be in the range supported by the camera. If the camera supports the automatic gain, the value of -1 will initiate the auto-gain mode, and value of -2 will switch the camera back to the manual gain mode.  
 
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
Example

This set of statements switches between automatic and manual gain every 10 seconds:  
 
showVideo(TRUE)  
Do  
 setVideoGain(-1)  
 wait(10000)  
 setVideoGain(-2)  
 wait(10000)  
Loop