Table of Contents

Class GPUVideoEffectBlur

Namespace
VisioForge.Core.Types.VideoEffects
Assembly
VisioForge.Core.dll

GPU-accelerated blur effect that softens video images using Gaussian blur filtering with DirectX hardware acceleration.

public class GPUVideoEffectBlur : GPUVideoEffect, IGPUVideoEffectBlur, IGPUVideoEffect

Inheritance

Implements

Inherited Members

Remarks

Available in: VideoCaptureCore, MediaPlayerCore, VideoEditCore (Windows only)

GPU-accelerated version using DirectX. Significantly faster than CPU equivalent for real-time processing of high-resolution video streams.

The blur effect applies a Gaussian blur filter to soften the video image by averaging neighboring pixels within a defined kernel area. This creates a smooth, softened appearance by reducing sharp edges and fine details. The effect uses DirectX compute shaders to perform the blur operation on the GPU, enabling real-time processing even at 4K resolutions with minimal CPU overhead.

Common use cases include: background defocusing for depth-of-field effects, privacy protection (blurring faces, license plates, or sensitive information), aesthetic soft-focus effects, reducing video noise, creating dream-like sequences, and preparing video for bokeh effects. The blur kernel size is automatically calculated based on the value parameter, with larger values using wider kernels for more pronounced softening.

Performance characteristics: GPU acceleration provides 5-10x performance improvement over CPU-based blur, especially at higher resolutions. Blur processing time scales primarily with kernel size rather than frame resolution. Typical performance on modern GPUs: 1080p at 60fps with blur value 50, 4K at 30fps with blur value 30. Extreme blur values (80-100) may impact frame rate on lower-end GPUs.

Cross-reference to CPU equivalent: See VisioForge.Core.Types.VideoEffects.VideoEffectBlur for CPU-based alternative.

Constructors

GPUVideoEffectBlur(bool, int, string, TimeSpan, TimeSpan)

Initializes a new instance of the VisioForge.Core.Types.VideoEffects.GPUVideoEffectBlur class with specified parameters.

public GPUVideoEffectBlur(bool enabled, int value, string name = "Blur", TimeSpan startTime = default, TimeSpan stopTime = default)

Parameters

enabled bool

Whether the effect is enabled. Set to true to apply immediately, false to create in disabled state.

value int

Blur intensity value (0-100). Higher values produce stronger blur. Values outside range are clamped.

name string

Optional effect name for identification and retrieval. Default is "Blur".

startTime TimeSpan

Start time for timed effects. Default is zero (apply from beginning).

stopTime TimeSpan

Stop time for timed effects. Default is zero (apply until end).

Remarks

When both start and stop times are zero, the effect applies for the entire video duration. The effect type is automatically set to VisioForge.Core.Types.VideoEffects.GPUVideoEffectType.Blur.

Properties

Value

Gets or sets the blur intensity value (0-100).

public int Value { get; set; }

Property Value

int

Remarks

Controls the strength of the Gaussian blur effect. Higher values produce more pronounced blurring by using larger kernel sizes. The value is internally mapped to GPU shader parameters including kernel radius and Gaussian sigma for optimal quality.

Value ranges and recommended usage: 0 = No blur (bypass), 1-30 = Subtle softening (noise reduction, gentle defocus), 31-60 = Medium blur (background separation, portrait mode), 61-100 = Strong blur (privacy masking, artistic effects).

Methods

GetEffectType()

Gets the specific type of this GPU video effect.

public GPUVideoEffectType GetEffectType()

Returns

GPUVideoEffectType

Returns VisioForge.Core.Types.VideoEffects.GPUVideoEffectType.Blur to identify this as a GPU-accelerated blur effect.

Remarks

Used by the video processing pipeline to select the appropriate DirectX shader for blur processing.