-
-
Notifications
You must be signed in to change notification settings - Fork 255
Stabilizer Class
Abhishek Thakur edited this page Jul 24, 2019
·
32 revisions
This is an auxiliary class that enables Real-time Video Stabilization for vidgear
with minimalistic latency and at the expense of little to no additional computational power requirement. The basic idea behind it is to tracks and save the salient feature array for the given number of frames and then uses these anchor point to cancel out all perturbations relative to it for the incoming frames in the queue. This class relies heavily on Threaded Queue mode for error-free, ultrafast frame handling and it is enabled by default.
- Real-time stabilization with low latency and no extra resources.
- Works exceptionally well with low-frequency jitter.
- Compatible with any vidgear's video streams including live network streams.
- Works both standalone and with VidGear Multi-Threaded Classes.
⚠️ The stabilizer may not perform well against High-frequency jitter in video. Use at your own risk!⚠️
You can import this class as follows:
from vidgear.stabilizer import Stabilizer
See here for details and complete example
See here for details and complete example
See here for details and complete example
-
smoothing_radius:(int) to alter averaging window size. It handles the quality of stabilization at the expense of latency and sudden panning. Larger its value, less will be panning, more will be latency and vice-versa. Its default value is
25
. -
border_size: (int) to alter output border cropping. It's will crop the border to reduce the black borders from stabilization being too noticeable. Larger its value more will be cropping. Its default value is
0
(i.e. no cropping). -
border_type:(string) to change the border mode. Valid border types are
'black'
,'reflect'
,'reflect_101'
,'replicate'
and'wrap'
. Its default value is'black'
-
logging:(boolean) set this flag to enable/disable error logging essential for debugging. Its default value is
False
.