GetFeature
Top  Previous  Next

Description

Returns the value of the specified camera feature.


Syntax


[VB]
Value=objActiveDcam.GetFeature( Name )


[C/C++]
HRESULT GetFeature(bstr Name, float* pValue );


Data Types
[VB]

Name: String
Return value
: Single


Parameters
[C/C++]

Name [in]  
String specifying the name of the feature. In accordance with IIDC 1.31, one of the following names can be used:  
"Brightness", "Exposure", "Sharpness", "WhiteBalanceVR", "WhiteBalanceUB", "Hue", "Saturation", "Gamma", "Shutter", "Gain", "Iris", "Focus", "OpticalFilter", "Zoom", "Pan", "Tilt", "Temperature", "TriggerDelay", "WhiteShading".  
pValue [out, retval]  
Pointer to the value of the feature  


Return Values


S_OK  
Success  
E_INVALIDARG        
Feature does not exist  
E_FAIL  
Failed to read the feature  
 

Example


The following VB example demonstrates the use of a scroll control for real-time adjustment of the "Brightness" feature:

Private Sub
 Form_Load()

HScroll1.Value = ActiveDcam1.GetFeature("Brightness")
HScroll1.Min = ActiveDcam1.GetFeatureMin("Brightness")
HScroll1.Max = ActiveDcam1.GetFeatureMax("Brightness")
ActiveDcam1.Acquire=
True
End Sub


Private Sub
 HScroll1_Scroll()

ActiveDcam1.SetFeature("Brightness", HScroll1.Value)

End Sub

The following VB example displays the absolute value of the shutter:

ActiveDcam1.SetFeatureControl "Shutter", "Absolute",
True

MsgBox ActiveDcam1.GetFeature "Shutter"
ActiveDcam1.SetFeatureControl "Shutter", "Absolute"
, False
 

Remarks


Depending on the absolute feature control being enabled or disabled, this method will return the value of the feature in absolute or relative units.

If the currently selected camera does not support the specified feature, the method will generate an error.