Video Stabilization for Embedded Systems - User Guide - Setting up the stabilizer
Video Stabilization for Embedded Systems |
---|
Video Stabilization Basics |
Getting Started |
User Guide |
Examples |
GStreamer plug-in |
Installing the plug-in |
Contact Us |
This page provides a basic description of the VideoStabilizer class and its usage.
Initialization
The Init method of the VideoStabilizer class initializes all the internal structures and requires the following parameters:
Width
- Type: integer
- Width of the frame to stabilize.
Height
- Type: integer
- Height of the frame to stabilize.
Framerate
- Type: double
- Framerate of the video being stabilized. This is the same as the sampling frequency used by stabilization filter.
Cutoff frequency
- Type: double
- Cutoff frequency of the low pass stabilization filter. Must be less than the framerate.
Stabilization
The StabilizeFrame method of the VideoStabilizer class is the one in charge of processing the next frame. This method only requires two parameters: the input and output Image. It is important to notice that both must be completely configured objects and the stabilizer won't assign memory for the output.
The following snippet contains a complete example of usage (assume input_image and output_image are fully configured):
int width = 1920; int height = 1080; double framerate = 30; double cutoff_frequency = 0.1; rr::VideoStabilizer stabilizer; rr::RuntimeError status = stabilizer.Init(width, height, framerate, cutoff_frequency); status = stabilizer.StabilizeFrame(input_image, output_image);