Gain
Top  Previous  Next

Description

Returns or sets the value of the camera gain in absolute or raw units.


Syntax


[VB]
objActiveUSB.Gain [= Value]


[C/C++]
HRESULT get_Gain( float *pValue );
HRESULT put_Gain( float Value );



Data Type
[VB]

Single

Parameters
[C/C++]

pValue [out,retval]  
Pointer to the current exposure value  
Value [in]  
The exposure value to be set  


Return Values


S_OK  
Success  
E_NOINTERFACE        
The feature is not available for the selected camera  
E_INVALIDARG  
The value is out of range  
E_FAIL  
Failure to set the feature value  


Example


The following VB example demonstrates the use of a scroll control for real-time adjustment of the gain value.

Private Sub
 Form_Load()

HScroll1.Value = ActiveUSB1.Gain
HScroll1.Min = ActiveUSB1.GetGain
HScroll1.Max = ActiveUSB1.GetGain
ActiveUSB1.Acquire=
True

End Sub


Private Sub
 HScroll1_Scroll()

ActiveUSB1.Gain = HScroll1.Value

End Sub

 

Remarks


This property changes the camera's video signal amplification. The valid range of the gain values can be obtained by the GetGainMin and GetGainMax methods.

Note that the property is available only if the currently selected camera supports one of the following GenICam features: Gain, GainAbs, GainRaw.