Gamma
Top  Previous  Next

Description

Returns or sets the row value of the gamma


Syntax


[VB]
objActiveDcam.Gamma [= Value]


[C/C++]
HRESULT get_Gamma( long *pGamma );
HRESULT put_Gamma( long Gamma );



Data Type
[VB]

Long

Parameters
[C/C++]

pGamma [out,retval]  
Pointer to the current gamma value  
Gamma [in]  
The gamma value to be set  


Return Values


S_OK  
Success  
E_FAIL  
The gamma control is not available for the selected camera  
E_INVALIDARG  
The value is out of range  
 

Example


The following VB example demonstrates the use of a scroll control for real-time adjustment of the camera's gamma value.

Private Sub
 Form_Load()

ActiveDcam1.Acquire=
True

HScroll1.Value = ActiveDcam1.Gamma
HScroll1.Min = ActiveDcam1.GetGammaMin
HScroll1.Max = ActiveDcam1.GetGammaMax
End Sub


Private Sub
 HScroll1_Scroll()

ActiveDcam1.Gamma = HScroll1.Value

End Sub

 

Remarks


This property changes the gamma correction factor of the camera's circuitry. The gamma correction modifies an image by applying standard, nonlinear gamma curves to the intensity scale. Increasing the gamma value will lighten the video and increase the contrast in its darker areas. The valid range of the raw gamma values is reported by the GetGammaMin and GetGammaMax methods. Note that the property is available only if the currently selected camera supports software gamma control.