VideoStabilizationBase<T>

Base Classes · AiDotNet.Video

Base class for video stabilization models that remove camera shake from video sequences.

Inheritance: NeuralNetworkBase<T> → VideoNeuralNetworkBase<T> → VideoStabilizationBase<T>

Implements: IShapeContract

Known derived types: DIFRINT<T>, DUT<T>, FuSta<T>, GaVS<T>, PWStableNet<T>, StabStitch<T>, ThreeDMF<T>

For Beginners

Video stabilization removes camera shake from handheld video footage. It analyzes how the camera moved between frames and compensates by shifting/warping each frame to create a smooth viewing experience. Some methods crop the edges (like smartphone stabilization), while advanced neural methods can fill in the missing edges.

How It Works

Video stabilization compensates for unwanted camera motion to produce smooth footage. This base class provides:

  • Camera trajectory estimation and smoothing
  • Crop ratio management (stabilization typically requires cropping)
  • Homography/affine transform estimation utilities
  • Full-frame inpainting support for crop-free stabilization

Derived classes implement specific architectures like DIFRINT, DUT, FuSta, etc.

Properties

Property Summary
bool SupportsFullFrame { get; set; } Gets whether this model supports full-frame stabilization (no cropping).
double CropRatio { get; set; } Gets the crop ratio used for stabilization (fraction of frame that may be cropped).
int SmoothingWindowSize { get; set; } Gets the smoothing window size for trajectory smoothing.

Methods

Method Summary
IReadOnlyList<OutputAxisContract> OutputAxesFor(int inputRank)
List<Tensor<T>> EstimateTrajectory(Tensor<T> frames) Estimates the camera trajectory (per-frame transforms) from the input sequence.
Tensor<T> Stabilize(Tensor<T> unstableFrames) Stabilizes a sequence of video frames.