Exposure Absolute Values

Posted by Stefan Geißler on March 31, 2008

Very often, I am asked how to access the Absolute Values interface of the exposure time. Although this seems to be complicated at first glace, it is not:

The interface is accessed in the following three steps:

  1. Declare the necessary variables for the interfaces.
  2. Query the interfaces.
  3. Work with the queried interfaces.

Declare the variables for the interfaces

We need a variable for the interface to toggle automatic exposure and a variable for the exposure values interface.

VB:

Dim AbsoluteValues As ICImagingControl3.VCDAbsoluteValueProperty
Dim ExposureAuto As ICImagingControl3.VCDSwitchProperty
    

C#:

using TIS.Imaging;
ICImagingControl3.VCDAbsoluteValueProperty AbsoluteValues;
ICImagingControl3.VCDSwitchProperty ExposureAuto;
    

Query the interfaces

This step is quite simple. The only thing you have to do is gather the required information:

VB:

AbsoluteValues = IcImagingControl1.VCDPropertyItems.FindInterface( 
                                           VCDIDs.VCDID_Exposure + ":" + _
                                           VCDIDs.VCDElement_Value + ":" + _
                                           VCDIDs.VCDInterface_AbsoluteValue)

ExposureAuto = IcImagingControl1.VCDPropertyItems.FindInterface( 
                                           VCDIDs.VCDID_Exposure + ":" + _
                                           VCDIDs.VCDElement_Auto + ":" + _
                                           VCDIDs.VCDInterface_Switch)
    

C#:

AbsoluteValues = (ICImagingControl3.VCDAbsoluteValueProperty)icImagingControl1.VCDPropertyItems.FindInterface(
                                                     VCDIDs.VCDID_Exposure + ":" +
                                                     VCDIDs.VCDElement_Value + ":" +
                                                     VCDIDs.VCDInterface_AbsoluteValue);
                                                     
ExposureAuto = (ICImagingControl3.VCDSwitchProperty) icImagingControl1.VCDPropertyItems.FindInterface( 
                                                     VCDIDs.VCDID_Exposure + ":" +
                                                     VCDIDs.VCDElement_Auto + ":" +
                                                     VCDIDs.VCDInterface_Switch);
    

Work with the queried interfaces

Now we can check, whether the interfaces exist and query their values.

VB:

    'Disable automatic
If Not ExposureAuto Is  Nothing Then
	ExposureAuto.Switch = false
End If


If Not AbsoluteValues Is  Nothing Then
	Dim ExposureMin As Double
	Dim ExposureMax As Double
	Dim ExposureValue As Double

	' Query the currently set values:
	ExposureMax = AbsoluteValues.RangeMax
	ExposureMin = AbsoluteValues.RangeMin
	ExposureValue = AbsoluteValues.Value

	'Set a new exposure value
	AbsoluteValues.Value = 0.002
End if

C#:

// If ExposureAuto exposure exists ...
if (ExposureAuto != null)
{
	//... make sure, it is disabled.
	ExposureAuto.Switch = false;
}


// If the absolute values interface exists...
if (AbsoluteValues != null)
{
	double ExpMin, ExpMax, ExpCurrent;

	// ... query the currenty values:
	ExpMin = AbsoluteValues.RangeMin;
	ExpMax = AbsoluteValues.RangeMax;
	ExpCurrent = AbsoluteValues.Value;

	//.. set a new value
	AbsoluteValues.Value = 0.001;

}

Please keep in mind that not all cameras and video capture devices support the Absolute Values interface.

Tagged with VCD PropertiesExposureAbsolute Valuesinterface.

This site is part of The Imaging Source Network. Other sites include Company Portal, Image Processing, Astronomy Cameras, Astronomy Cameras Blog, Blog caméras d'astronomie, Astronomy Cameras Competition, TX Text Control, TX Text Control Blog and Forums.