102
edits
No edit summary |
|||
Line 22: | Line 22: | ||
==== Defining the Apply method ==== | ==== Defining the Apply method ==== | ||
This method receives two parameters: | |||
* softgyro: This is the input data containing a vector of orientation values (Quaternions) along with their corresponding timestamps. It is used by the interpolation algorithm. | |||
* interpolated: This contains a vector of interpolated orientation values with their corresponding interpolation timestamps. | |||
The user must take into account that the method uses the IInterpolator start time member to perform the interpolation. | |||
<syntaxhighlight lang=c++> | |||
RuntimeError ExampleInterpolator::Apply( | |||
std::vector<std::pair<Quaternion<double>, uint64_t>>&interpolated, | |||
std::vector<std::pair<Quaternion<double>, uint64_t>>& softgyro) { | |||
RuntimeError ret{}; | |||
/* Interpolation algorithm logic */ | |||
return ret; | |||
</syntaxhighlight> | |||
==== Defining the Reset method ==== | ==== Defining the Reset method ==== | ||
This method receives an start time value as parameter and sets the IInterpolator start time member to the inserted value. | |||
<syntaxhighlight lang=c++> | |||
RuntimeError ExampleInterpolator::Reset(const uint64_t start_time) { | |||
RuntimeError ret{}; | |||
/* Reset start time logic */ | |||
return ret; | |||
} | |||
</syntaxhighlight> | |||
<noinclude> | <noinclude> | ||
{{RidgeRun Video Stabilization Library/Foot|API Reference/Adding New Sensors|API Reference/Adding Stabilization Algorithm}} | {{RidgeRun Video Stabilization Library/Foot|API Reference/Adding New Sensors|API Reference/Adding Stabilization Algorithm}} | ||
</noinclude> | </noinclude> |
edits