OpticalFilter
Top  Previous  Next

Description

Returns or sets the row value of the optical filter.


Syntax


[VB]
objActiveDcam.OpticalFilter [= Value]


[C/C++]
HRESULT get_OpticalFilter( long *pOpticalFilter );
HRESULT put_OpticalFilter( long OpticalFilter );



Data Type
[VB]

Long

Parameters
[C/C++]

pOpticalFilter [out,retval]  
Pointer to the current optical filter value  
OpticalFilter [in]  
The optical filter value to be set  


Return Values


S_OK  
Success  
E_FAIL  
The optical filter 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 optical filter.

Private Sub
 Form_Load()

ActiveDcam1.Acquire=
True

HScroll1.Value = ActiveDcam1.OpticalFilter
HScroll1.Min = ActiveDcam1.GetOpticalFilterMin
HScroll1.Max = ActiveDcam1.GetOpticalFilterMax
End Sub


Private Sub
 HScroll1_Scroll()

ActiveDcam1.OpticalFilter = HScroll1.Value

End Sub

 

Remarks


This property provides adjustment of the camera's optical filter feature. Depending on the camera model, it can control the mechanical optical filter or the electronic filter. For Bayer cameras this feature will typically allow for changing the color pattern of the raw output data. See Bayer for more details.

The valid property range is reported by the GetOpticalFilterMin and GetOpticalFilterMax methods. Note that the property is available only if the currently selected camera supports software optical filter control.