Class GLGrayscaleVideoEffect
- Namespace
- VisioForge.Core.Types.X.OpenGL
- Assembly
- VisioForge.Core.dll
Converts video frames to grayscale (black and white) using GPU-accelerated OpenGL shaders. This effect removes all color information while preserving luminance values, creating a monochrome appearance.
public class GLGrayscaleVideoEffect : GLBaseVideoEffectInheritance
Inherited Members
Remarks
SDK Availability: Available in VideoCaptureCoreX, MediaPlayerCoreX, and Media Blocks SDK (Cross-platform)
Platform Support: Windows, Linux, macOS, Android, iOS (OpenGL ES)
GPU Acceleration: This effect uses hardware-accelerated OpenGL shaders to perform real-time color-to-grayscale conversion entirely on the GPU. The conversion uses weighted luminance coefficients for perceptually accurate results.
Effect Description: The grayscale effect converts RGB color values to luminance using standard ITU-R BT.709 coefficients (typically: Y = 0.299R + 0.587G + 0.114B), which accounts for human eye sensitivity to different colors. This produces a natural-looking black and white image that preserves perceived brightness.
Use Cases:
- Artistic and cinematic effects for video production
- Surveillance and security applications where color is not required
- Bandwidth reduction by simplifying color space before compression
- Medical and scientific imaging applications
- Accessibility features for color-blind users
- Retro or vintage video aesthetics
Performance: Extremely lightweight operation with negligible performance impact. The GPU-accelerated shader performs the conversion in a single pass with minimal computational overhead, typically adding less than 0.5ms per frame.
Constructors
GLGrayscaleVideoEffect()
Initializes a new instance of the VisioForge.Core.Types.X.OpenGL.GLGrayscaleVideoEffect class. Creates a grayscale conversion effect for GPU-accelerated video processing.
public GLGrayscaleVideoEffect()