Addon.Webcam.SetCameraControlPropertySetting ()

Description

Sets a specified camera property.

Data type

<Boolean>

Syntax

.Addon.Webcam.SetCameraControlPropertySetting (iProperty, iValue, bAuto);

Parameters

<int> iProperty: Specifies the property to change, allowed values are:

Allowed Values EnumDWT_CameraControlProperty enumeration Description
0 EnumDWT_CameraControlProperty.CCP_PAN Specifies the camera's pan setting, in degrees. Values range from –180 to +180, with the default set to zero. Positive values are clockwise from the origin (the camera rotates clockwise when viewed from above), and negative values are counterclockwise from the origin.
1 EnumDWT_CameraControlProperty.CCP_TILT Specifies the camera's tilt setting, in degrees. Values range from –180 to +180, with the default set to zero. Positive values point the imaging plane up, and negative values point the imaging plane down.
2 EnumDWT_CameraControlProperty.CCP_ROLL Specifies the camera's roll setting, in degrees. Values range from –180 to +180, with the default set to zero. Positive values cause a clockwise rotation of the camera along the image-viewing axis, and negative values cause a counterclockwise rotation of the camera.
3 EnumDWT_CameraControlProperty.CCP_ZOOM Specifies the camera's zoom setting, in millimeters. Values range from 10 to 600, and the default is specific to the device.
4 EnumDWT_CameraControlProperty.CCP_EXPOSURE Specifies the exposure setting, in log base 2 seconds. In other words, for values less than zero, the exposure time is 1/2^n seconds, and for values zero or above, the exposure time is 2^n seconds. For example:
Value Seconds
  -3     1/8
  -2     1/4
  -1     1/2
  0        1
  1        2
  2        4
5 EnumDWT_CameraControlProperty.CCP_IRIS Specifies the camera's iris setting, in units of fstop* 10.
6 EnumDWT_CameraControlProperty.CCP_FOCUS Specifies the camera's focus setting, as the distance to the optimally focused target, in millimeters. The range and default value are specific to the device.

<int> iValue: Specifies the new value to be set to the property.

<bool> bAuto: Specifies whether the setting is controlled manually or automatically.

Return value

bool

true indicates success. false indicates failure.

Remarks

The method should be called after Addon.Webcam.SelectSource. If there is only one data source available, it will be selected automatically.

Example

DWObject.Addon.Webcam.SelectSource(document.getElementById("source").options[document.getElementById("source").
selectedIndex].text);
DWObject.Addon.Webcam.SetVideoPropertySetting(EnumDWT_CameraControlProperty.CCP_EXPOSURE, -5, false);
			
// optional
var OnCaptureStart = function () {
}
// optional
var OnCaptureSuccess = function () {
}
// optional
var OnCaptureError = function (error, errorstr) {
	alert(errorstr);
}
// optional
var OnCaptureEnd = function () {
}
DWObject.Addon.Webcam.CaptureImage(false, OnCaptureStart, OnCaptureSuccess, OnCaptureError, OnCaptureEnd);

See also

Addon.Webcam.GetCameraControlPropertySetting

Addon.Webcam.GetCameraControlPropertySetting

Addon.Webcam.GetVideoPropertySetting

Addon.Webcam.GetVideoPropertyMoreSetting

Addon.Webcam.SetVideoPropertySetting

Is this page helpful?

Leave a Reply

Your email address will not be published.