Table of Contents

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 ChromaKeySettingsX

Inheritance

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

sourceVideoResolution Size

The source video resolution.

chromaColor ChromaKeyColor

The chroma color to key out.

alpha double

The alpha channel value (0.0 to 1.0).

sensitivity double

The sensitivity value (0.0 to 180.0).

noiseLevel double

The noise level (0.0 to 64.0).

blackSensitivity uint

The black sensitivity (0 to 255).

whiteSensitivity uint

The white sensitivity (0 to 255).

preferPassthrough bool

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

double

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

uint

ChromaColor

Gets or sets the chroma color to key out.

public ChromaKeyColor ChromaColor { get; set; }

Property Value

ChromaKeyColor

CustomColor

Gets or sets the custom color for chroma keying (when ChromaColor is set to Custom).

public SKColor CustomColor { get; set; }

Property Value

SKColor

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

double

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

bool

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

double

SourceVideoResolution

Gets source video resolution.

public Size SourceVideoResolution { get; }

Property Value

Size

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; }

Property Value

uint