OpenShot Library | libopenshot
0.4.0
|
This class stabilizes a video frame using optical flow. More...
#include <CVStabilization.h>
Public Member Functions | |
bool | _LoadStabilizedData () |
void | AddFrameDataToProto (pb_stabilize::Frame *pbFrameData, CamTrajectory &trajData, TransformParam &transData, size_t frame_number) |
Add frame stabilization data into protobuf message. More... | |
CVStabilization (std::string processInfoJson, ProcessingController &processingController) | |
Set default smoothing window value to compute stabilization. More... | |
CamTrajectory | GetCamTrajectoryTrackedData (size_t frameId) |
TransformParam | GetTransformParamData (size_t frameId) |
bool | SaveStabilizedData () |
void | SetJson (const std::string value) |
Load JSON string into this object. More... | |
void | SetJsonValue (const Json::Value root) |
Load Json::Value into this object. More... | |
void | stabilizeClip (openshot::Clip &video, size_t _start=0, size_t _end=0, bool process_interval=false) |
Process clip and store necessary stabilization data. More... | |
Public Attributes | |
std::map< size_t, CamTrajectory > | trajectoryData |
std::map< size_t, TransformParam > | transformationData |
This class stabilizes a video frame using optical flow.
The relative motion between two consecutive frames is computed to obtain the global camera trajectory. The camera trajectory is then smoothed to reduce jittering.
Definition at line 75 of file CVStabilization.h.
CVStabilization::CVStabilization | ( | std::string | processInfoJson, |
ProcessingController & | processingController | ||
) |
Set default smoothing window value to compute stabilization.
Definition at line 29 of file CVStabilization.cpp.
bool CVStabilization::_LoadStabilizedData | ( | ) |
Definition at line 374 of file CVStabilization.cpp.
void CVStabilization::AddFrameDataToProto | ( | pb_stabilize::Frame * | pbFrameData, |
CamTrajectory & | trajData, | ||
TransformParam & | transData, | ||
size_t | frame_number | ||
) |
Add frame stabilization data into protobuf message.
Definition at line 298 of file CVStabilization.cpp.
Referenced by SaveStabilizedData().
CamTrajectory CVStabilization::GetCamTrajectoryTrackedData | ( | size_t | frameId | ) |
Definition at line 326 of file CVStabilization.cpp.
TransformParam CVStabilization::GetTransformParamData | ( | size_t | frameId | ) |
Definition at line 314 of file CVStabilization.cpp.
bool CVStabilization::SaveStabilizedData | ( | ) |
Protobuf Save and Load methods Save stabilization data to protobuf file
Definition at line 268 of file CVStabilization.cpp.
void CVStabilization::SetJson | ( | const std::string | value | ) |
Load JSON string into this object.
Definition at line 339 of file CVStabilization.cpp.
Referenced by CVStabilization().
void CVStabilization::SetJsonValue | ( | const Json::Value | root | ) |
Load Json::Value into this object.
Definition at line 356 of file CVStabilization.cpp.
Referenced by SetJson().
void CVStabilization::stabilizeClip | ( | openshot::Clip & | video, |
size_t | _start = 0 , |
||
size_t | _end = 0 , |
||
bool | process_interval = false |
||
) |
Process clip and store necessary stabilization data.
Definition at line 37 of file CVStabilization.cpp.
std::map<size_t,CamTrajectory> CVStabilization::trajectoryData |
Definition at line 107 of file CVStabilization.h.
Referenced by _LoadStabilizedData(), GetCamTrajectoryTrackedData(), SaveStabilizedData(), and stabilizeClip().
std::map<size_t,TransformParam> CVStabilization::transformationData |
Definition at line 108 of file CVStabilization.h.
Referenced by _LoadStabilizedData(), GetTransformParamData(), SaveStabilizedData(), and stabilizeClip().