Class GammaVideoEffect
- Namespace
- VisioForge.Core.Types.X.VideoEffects
- Assembly
- VisioForge.Core.dll
Represents a gamma correction video effect that adjusts the overall brightness/darkness curve of the video.
public class GammaVideoEffect : BaseVideoEffect, IBaseVideoEffect, IVideoEditXVideoEffectInheritance
Implements
Inherited Members
Remarks
SDK Availability: VideoCaptureCoreX, MediaPlayerCoreX, VideoEditCoreX, Media Blocks SDK
Platform Support: Windows, Linux, macOS, Android, iOS
Gamma correction adjusts the relationship between input and output brightness values using a power law. Unlike linear brightness adjustment, gamma affects mid-tones more than highlights or shadows, providing more natural-looking brightness adjustments.
Gamma Values:
- <1.0: Darkens image (e.g., 0.5 = much darker, 0.8 = slightly darker)
- 1.0: No change (neutral)
- >1.0: Brightens image (e.g., 1.2 = slightly brighter, 2.0 = much brighter)
- Range: 0.01 to 10.0 (practical range: 0.5 to 2.5)
When to Use Gamma vs. Brightness:
- Gamma: Adjusts mid-tones while preserving blacks and whites, more natural look
- Brightness: Shifts all values equally, can crush blacks or clip whites
- Combined: Use gamma for overall tone, brightness for final tweaking
Common Use Cases:
- Correcting underexposed or overexposed footage
- Matching footage from different cameras
- Compensating for display gamma differences
- Creating specific moods (darker for dramatic, brighter for cheerful)
- Adjusting for different viewing environments
For Classic SDK, gamma adjustments are typically handled by VideoEffectDarkness
or VideoEffectLightness (Windows only).
Performance Note: Gamma correction is very efficient and suitable for real-time processing on all platforms. Implemented as a lookup table for optimal performance.
Constructors
GammaVideoEffect(double, string)
Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.GammaVideoEffect class.
public GammaVideoEffect(double value, string name = "gamma")Parameters
Fields
DefaultName
The default name.
public static string DefaultNameField Value
Properties
StartTime
Gets or sets the start time.
public TimeSpan StartTime { get; set; }Property Value
StopTime
Gets or sets the stop time.
public TimeSpan StopTime { get; set; }Property Value
Value
Gets or sets the value. Range is [0.01..10.0], default is 1.0.
public double Value { get; set; }Property Value
Methods
GenerateDescription()
Generates the description.
public string GenerateDescription()Returns
- string
-
A string containing the GStreamer element description for the gamma effect.