IVideoEnhancer<T>

Interfaces · AiDotNet.Video.Interfaces

Interface for video enhancement models that improve video quality.

Implements: IVideoModel<T>

For Beginners

Video enhancement is like photo editing, but for videos. These models can:

  • Make blurry videos sharper (super-resolution)
  • Remove grain/noise from old or low-light videos
  • Smooth out shaky camera footage (stabilization)
  • Make choppy videos smoother (frame interpolation)

The enhanced video has the same content but looks much better!

Example:

How It Works

Video enhancers take degraded or low-quality video and produce improved versions. Common enhancement tasks include super-resolution (upscaling), denoising, stabilization, and frame interpolation.

Properties

Property Summary
VideoEnhancementType EnhancementType { get; } Gets the type of enhancement this model performs.
bool SupportsRealTime { get; } Gets whether this enhancer can process video in real-time.
int ScaleFactor { get; } Gets the scale factor for spatial enhancement (e.g., 2x, 4x upscaling).
int TemporalScaleFactor { get; } Gets the temporal scale factor for frame rate enhancement.

Methods

Method Summary
T ComputePSNR(Tensor<T> original, Tensor<T> enhanced) Computes the Peak Signal-to-Noise Ratio between original and enhanced video.
T ComputeSSIM(Tensor<T> original, Tensor<T> enhanced) Computes the Structural Similarity Index between original and enhanced video.
Task<Tensor<T>> EnhanceAsync(Tensor<T> inputVideo, IProgress<EnhancementProgress> progress, CancellationToken cancellationToken) Enhances a video asynchronously with progress reporting.
Tensor<T> Enhance(Tensor<T> inputVideo) Enhances a video and returns the improved version.
Tensor<T> EnhanceFrame(Tensor<T> frame) Enhances a single frame from a video.
Tensor<T> EnhanceWithSlidingWindow(Tensor<T> inputVideo, int windowSize, int overlap) Enhances a video using a sliding window approach for memory efficiency.