Stabilizer Class¶
VidGear's Stabilizer in Action
(Video Credits @SIGGRAPH2013)
This video is transcoded with StreamGear API and hosted on GitHub Repository and served with raw.githack.com
Overview¶
Stabilizer is an auxiliary class that enables Video Stabilization for vidgear with minimalistic latency, and at the expense of little to no additional computational requirements.
The basic idea behind it is to track and save the salient feature array for the given number of frames and then use these anchor points to cancel out all perturbations relative to it for the incoming frames in the queue. This class relies on bounded fixed-size deques for error-free & ultra-fast frame handling, with memory capped at O(smoothing_radius) regardless of stream length.
For more detailed information on Stabilizer working, See this blogpost âž¶
Architecture changes in v0.3.5
Starting with v0.3.5, the Stabilizer module follows a flexible, plugin-style design. Different stabilization methods can plug into a shared foundation for easier extensibility and future improvements.
The Stabilizer interface automatically selects the appropriate backend based on the mode parameter, keeping usage simple and consistent.
Available modes:
| Mode | Backend | Status |
|---|---|---|
StabilizerMode.ASW | ASWStabilizer — Average Sliding-Window | Default |
StabilizerMode.KALMAN | Kalman-filter-based | Planned for a future release |
The public Stabilizer API remains unchanged, so existing code continues to work as before while automatically using the default ASW backend.
Features¶
-
Real-time stabilization with low latency and no extra resources.
-
Works exceptionally well with low-frequency jitter.
-
Integrated with VideoGear, therefore, can be applied to any incoming stream.
-
Also seamlessly works standalone.
Important
-
The stabilizer may not perform well against High-frequency jitter in video. Use at your own risk!
-
The stabilizer might be slower for High-Quality videos-frames.
-
It is advised to enable logging on the first run for easily identifying any runtime errors.
Usage Examples¶
After going through Stabilizer Class Usage Examples, Checkout more of its advanced configurations here âž¶
Parameters¶
References¶
FAQs¶