WhiteBalanceVR
Top  Previous  Next

Description

Returns or sets the V or R value of the white color


Syntax


[VB]
objActiveDcam.WhiteBalanceVR [= Value]


[C/C++]
HRESULT get_WhiteBalanceVR( long *pWhiteBalanceVR );
HRESULT put_WhiteBalanceVR( long WhiteBalanceVR );



Data Type
[VB]

Long

Parameters
[C/C++]

pWhiteBalanceVR [out,retval]  
Pointer to the current V/R value  
WhiteBalanceVR [in]  
The V/R value to be set  


Return Values


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

Example


The following Visual Basic example demonstrates the use of two scroll controls for real-time adjustment of the white balance

Private Sub
 Form_Load()

ActiveDcam1.Acquire=
True

HScroll1.Value = ActiveDcam1.WhiteBalanceUB
HScroll1.Min = ActiveDcam1.GetWhiteBalanceMin
HScroll1.Max = ActiveDcam1.GetWhiteBalanceMax
HScroll2.Value = ActiveDcam1.WhiteBalanceVR
HScroll2.Min = ActiveDcam1.GetWhiteBalanceMin
HScroll2.Max = ActiveDcam1.GetWhiteBalanceMax
End Sub


Private Sub
 HScroll1_Scroll()

ActiveDcam1.WhiteBalanceUB = HScroll1.Value

End Sub


Private Sub
 HScroll2_Scroll()
ActiveDcam1.WhiteBalanceVR = HScroll2.Value

End Sub

 
 

Remarks


This property changes the tint of the white color along the cyan-red axis by modifying V component in the YUV mode or R component in the RGB mode. The valid property range is reported by the GetWhiteBalanceMin and GetWhiteBalanceMax methods. Note that the property is available only if the currently selected camera is a color one and supports white balance control.