Table of Contents

Enum CameraControlFlags

Namespace
VisioForge.Core.Types.VideoCapture
Assembly
VisioForge.Core.dll

Defines control mode flags for camera control properties on video capture devices.

[Flags]
public enum CameraControlFlags

Fields

None = 0

No flags set. When used alone, implies manual control with absolute positioning.

This is the default value and is equivalent to VisioForge.Core.Types.VideoCapture.CameraControlFlags.Absolute in most contexts. Use this when you want to set an absolute position value manually.

Auto = 1

The property is controlled automatically by the device.

When this flag is set, the camera device automatically adjusts the property based on current conditions. For example, auto-exposure adjusts to lighting conditions, auto-focus keeps subjects in focus, and auto-white-balance compensates for color temperature.

When automatic control is enabled, any value passed for the property may be ignored or used as a starting point/bias by the device.

Manual = 2

The property is controlled manually by the application.

Manual control gives the application direct control over the property value. The device will maintain the set value until it is explicitly changed or automatic mode is enabled.

This flag is typically used in conjunction with either VisioForge.Core.Types.VideoCapture.CameraControlFlags.Absolute or VisioForge.Core.Types.VideoCapture.CameraControlFlags.Relative to specify the type of value being set.

Absolute = 0

The property value represents an absolute position or setting.

Absolute values represent specific positions or settings in device-defined units. For example, an absolute pan value of 0 might represent the center position, with negative values representing left and positive values representing right.

This is the default mode when neither VisioForge.Core.Types.VideoCapture.CameraControlFlags.Absolute nor VisioForge.Core.Types.VideoCapture.CameraControlFlags.Relative is explicitly specified. Most applications use absolute positioning for predictable results.

Relative = 16

The property value represents a relative movement or adjustment.

Relative values specify a change from the current position rather than an absolute target. The value is divided into a number of device-specific steps, with each step representing an incremental adjustment.

The size and interpretation of each step depends on the camera model and its driver. Positive values typically move in one direction (right, up, zoom in), while negative values move in the opposite direction.

Relative control is useful for creating smooth, continuous movements or for PTZ (Pan-Tilt-Zoom) operations where the absolute position may not be known.

Examples

// Set zoom to absolute position 100 in manual mode
device.SetCameraControl(CameraControlProperty.Zoom, 100, CameraControlFlags.Manual | CameraControlFlags.Absolute);

// Enable automatic exposure
device.SetCameraControl(CameraControlProperty.Exposure, 0, CameraControlFlags.Auto);

// Perform relative pan movement (10 units right)
device.SetCameraControl(CameraControlProperty.Pan, 10, CameraControlFlags.Manual | CameraControlFlags.Relative);

Remarks

These flags specify how camera control properties (pan, tilt, zoom, focus, exposure, etc.) should be adjusted. They determine whether adjustments are made manually by the application or automatically by the device, and whether values represent absolute positions or relative movements.

The flags can be combined using bitwise operations when supported by the device. For example, a property might support both manual and automatic modes, as well as both absolute and relative positioning.

These values correspond to the DirectShow CameraControl API flags used by Windows video capture devices.