Class ChromaKeySettingsX
- Namespace
- VisioForge.Core.Types.X.VideoEffects
- Assembly
- VisioForge.Core.dll
Represents a chroma key (green/blue screen) settings class for removing background colors from video.
public class ChromaKeySettingsXInheritance
Inherited Members
Remarks
SDK Availability: VideoCaptureCoreX, MediaPlayerCoreX, VideoEditCoreX, Media Blocks SDK
Platform Support: Windows, Linux, macOS, Android, iOS
Chroma key settings provide professional green/blue screen background removal with fine-tuned control over color tolerance, edge quality, and sensitivity to different lighting conditions. Uses advanced color-space algorithms for clean keying with minimal artifacts.
Key Features:
- Multiple Key Colors: Green, blue, or custom color keying
- Sensitivity Control: Adjustable color tolerance (0.0-180.0 degrees)
- Noise Reduction: Removes noise in keyed areas (0.0-64.0)
- Black/White Sensitivity: Controls sensitivity to dark and bright areas
- Alpha Channel: Overall transparency control
- Performance Optimization: Passthrough mode for better performance
Common Use Cases:
- Virtual backgrounds for video conferencing
- Film and video production compositing
- Live streaming with virtual sets
- Weather and news broadcast backgrounds
- Virtual reality and AR applications
For Classic SDK with AI-powered green screen, see MaxineAIGSVideoEffect
(Windows only, requires NVIDIA RTX GPU). The AI version provides superior edge quality but is GPU-dependent.
Performance Note: Chroma keying is CPU-intensive. For real-time applications, use lower sensitivity values and enable PreferPassthrough. Test with target hardware to ensure adequate performance.
Constructors
ChromaKeySettingsX(Size, ChromaKeyColor, double, double, double, uint, uint, bool)
Initializes a new instance of the VisioForge.Core.Types.X.VideoEffects.ChromaKeySettingsX class.
public ChromaKeySettingsX(Size sourceVideoResolution, ChromaKeyColor chromaColor = ChromaKeyColor.Green, double alpha = 1, double sensitivity = 20, double noiseLevel = 2, uint blackSensitivity = 100, uint whiteSensitivity = 100, bool preferPassthrough = false)Parameters
sourceVideoResolutionSize-
The source video resolution.
chromaColorChromaKeyColor-
The chroma color to key out.
alphadouble-
The alpha channel value (0.0 to 1.0).
sensitivitydouble-
The sensitivity value (0.0 to 180.0).
noiseLeveldouble-
The noise level (0.0 to 64.0).
blackSensitivityuint-
The black sensitivity (0 to 255).
whiteSensitivityuint-
The white sensitivity (0 to 255).
preferPassthroughbool-
Whether to prefer passthrough optimization.
Properties
Alpha
Gets or sets the alpha channel value (0.0 to 1.0). Controls the overall transparency of the effect.
public double Alpha { get; set; }Property Value
BlackSensitivity
Gets or sets the black sensitivity for chroma keying (0 to 255). Sensitivity to dark colors - higher values are more sensitive to dark areas.
public uint BlackSensitivity { get; set; }Property Value
ChromaColor
Gets or sets the chroma color to key out.
public ChromaKeyColor ChromaColor { get; set; }Property Value
CustomColor
Gets or sets the custom color for chroma keying (when ChromaColor is set to Custom).
public SKColor CustomColor { get; set; }Property Value
NoiseLevel
Gets or sets the noise level for chroma keying (0.0 to 64.0). Size of noise radius - higher values help remove noise in the keyed areas.
public double NoiseLevel { get; set; }Property Value
PreferPassthrough
Gets or sets whether to prefer passthrough optimization. When true, no processing is done for alpha=1.0 if possible, improving performance.
public bool PreferPassthrough { get; set; }Property Value
Sensitivity
Gets or sets the sensitivity/angle for chroma keying (0.0 to 180.0). Size of the colorcube to change - higher values make the effect more sensitive to color variations.
public double Sensitivity { get; set; }Property Value
SourceVideoResolution
Gets source video resolution.
public Size SourceVideoResolution { get; }Property Value
WhiteSensitivity
Gets or sets the white sensitivity for chroma keying (0 to 255). Sensitivity to bright colors - higher values are more sensitive to bright areas.
public uint WhiteSensitivity { get; set; }