Enum VideoHardwareAdjustment
- Namespace
- VisioForge.Core.Types.VideoCapture
- Assembly
- VisioForge.Core.dll
Defines the types of hardware-level video adjustments available for video capture devices.
public enum VideoHardwareAdjustmentFields
Brightness = 0-
Controls the overall lightness or darkness of the video image.
Brightness adjustment affects all pixels equally, making the entire image lighter or darker. Typical range is 0-255 or -100 to +100, depending on the device. Default is usually the midpoint.
Contrast = 1-
Controls the difference between light and dark areas in the video image.
Higher contrast makes bright areas brighter and dark areas darker, increasing the dynamic range. Lower contrast reduces the difference, creating a flatter image. Useful for improving visibility in low-contrast scenes.
Hue = 2-
Controls the color tint of the video image along the color wheel.
Hue adjustment rotates colors around the color wheel. For example, adjusting hue can shift reds toward orange or purple. Typically measured in degrees (0-360) or as a normalized value. Useful for correcting color casts or achieving creative effects.
Saturation = 3-
Controls the intensity or purity of colors in the video image.
Higher saturation makes colors more vivid and intense, while lower saturation moves toward grayscale. A value of 0 typically produces a black and white image. Useful for enhancing or muting colors based on scene requirements.
Sharpness = 4-
Controls the edge enhancement of the video image.
Sharpness adjustment enhances or softens edge details in the image. Higher values increase edge contrast, making the image appear crisper but potentially introducing artifacts. Lower values create a softer, more natural look.
Gamma = 5-
Controls the gamma correction curve of the video image.
Gamma adjustment modifies the midtone brightness without significantly affecting highlights or shadows. Values greater than 1.0 lighten midtones, while values less than 1.0 darken them. Standard gamma is typically 2.2 for computer displays.
ColorEnable = 6-
Enables or disables color processing in the video image.
When disabled (value 0), the image is converted to grayscale. When enabled (value 1), full color processing is active. This is different from setting saturation to 0, as it may completely bypass color processing in the hardware.
WhiteBalance = 7-
Controls the color temperature balance of the video image.
White balance adjustment compensates for different lighting conditions to ensure whites appear neutral. Values typically range from warm (lower values, reddish) to cool (higher values, bluish). Many devices also support automatic white balance.
BacklightCompensation = 8-
Enables compensation for strong backlighting conditions.
Backlight compensation helps when the subject is darker than the background, such as a person in front of a window. When enabled (value 1), it brightens the foreground to improve subject visibility.
This feature is particularly useful for video conferencing scenarios where users may be positioned in front of bright backgrounds.
Gain = 9-
Controls the signal amplification level of the video sensor.
Gain adjustment amplifies the video signal, making the image brighter but potentially introducing noise. Higher gain values are useful in low-light conditions but may degrade image quality. Often works in conjunction with exposure settings.
PowerLineFrequency = 10-
Sets the power line frequency for flicker reduction.
This setting helps eliminate flicker caused by artificial lighting that operates at the local power line frequency. Valid values are:
- 50 Hz - Common in Europe, Asia, and other regions
- 60 Hz - Common in North America and some other regions
Setting this incorrectly may result in visible flicker or banding in the video image under artificial lighting conditions.
Examples
// Query and adjust brightness
var brightnessRange = device.GetAdjustmentRange(VideoHardwareAdjustment.Brightness);
device.SetAdjustment(VideoHardwareAdjustment.Brightness, 50); // Mid-range value
// Enable backlight compensation
device.SetAdjustment(VideoHardwareAdjustment.BacklightCompensation, 1);
Remarks
These adjustments are implemented at the hardware level by the video capture device or driver, providing real-time image processing without CPU overhead. The availability and range of each adjustment depends on the specific capture device and its driver capabilities.
Hardware adjustments typically offer better performance than software-based processing and should be preferred when available. Use the device's capability queries to determine which adjustments are supported and their valid value ranges.