Class VideoEffectBlur
- Namespace
- VisioForge.Core.Types.VideoEffects
- Assembly
- VisioForge.Core.dll
Represents a blur effect that softens the video image by averaging pixel values in a local neighborhood.
public class VideoEffectBlur : VideoEffect, IVideoEffectBlur, IVideoEffectInheritance
Implements
Inherited Members
Remarks
The blur effect applies a smoothing filter to the video image, reducing sharp edges and fine details. This is commonly used to create soft-focus effects, reduce image noise, or achieve artistic looks. Higher blur values produce more pronounced softening of the image.
This effect is CPU-based and uses convolution operations. For GPU-accelerated blur with better performance on high-resolution video, consider using VisioForge.Core.Types.VideoEffects.GPUVideoEffectBlur.
The effect can be applied to the entire video duration or limited to a specific time range using the VisioForge.Core.Types.VideoEffects.VideoEffect.StartTime and VisioForge.Core.Types.VideoEffects.VideoEffect.StopTime properties.
Constructors
VideoEffectBlur(bool, int, string, TimeSpan, TimeSpan)
Initializes a new instance of the VisioForge.Core.Types.VideoEffects.VideoEffectBlur class with specified parameters.
public VideoEffectBlur(bool enabled, int value, string name = "Blur", TimeSpan startTime = default, TimeSpan stopTime = default)Parameters
enabledbool-
trueto enable the effect immediately;falseto create the effect in a disabled state. The effect can be enabled/disabled later using the VisioForge.Core.Types.VideoEffects.VideoEffect.Enabled property. valueint-
The blur intensity value. Higher values produce stronger blur effects. Typical range is 1-20, with 1-3 for subtle blur and 10+ for strong effects.
namestring-
An optional name identifier for this effect instance. Default is "Blur". Used to retrieve specific effect instances from a collection via the name property. Multiple effects with the same type can coexist with different names.
startTimeTimeSpan-
The time at which the effect should start being applied. Default is Zero, which applies the effect from the beginning. Use a specific time value to delay the effect start.
stopTimeTimeSpan-
The time at which the effect should stop being applied. Default is Zero, which applies the effect until the end. Set to a specific time to limit the effect duration.
Remarks
If both startTime and stopTime are zero (default),
the effect will be applied for the entire video duration.
The blur effect is computationally intensive. For real-time processing of high-resolution video, consider using moderate blur values (3-7) or the GPU-accelerated version.
Properties
Value
Gets or sets the blur intensity value.
public int Value { get; set; }Property Value
Remarks
The blur value determines the radius of the convolution kernel used for smoothing. Higher values create more pronounced blur effects but require more processing time.
Typical values:
- 1-3: Slight softening, noise reduction
- 4-7: Moderate blur, soft focus effect
- 8-15: Strong blur, privacy/anonymization
- 16+: Very strong blur, may impact performance
Methods
GetEffectType()
Gets the specific type of this video effect.
public VideoEffectType GetEffectType()Returns
- VideoEffectType
-
Returns VisioForge.Core.Types.VideoEffects.VideoEffectType.Blur to identify this as a blur effect.
Remarks
This method overrides the base class implementation to provide the concrete effect type. The effect type is used by the video processing pipeline to route the effect to the appropriate processing module.