OpenShot Library | libopenshot
0.4.0
|
Go to the documentation of this file.
14 #ifndef OPENSHOT_STABILIZATION_H
15 #define OPENSHOT_STABILIZATION_H
17 #define int64 opencv_broken_int
18 #define uint64 opencv_broken_uint
19 #include <opencv2/opencv.hpp>
20 #include <opencv2/core.hpp>
83 double avr_dx, avr_dy, avr_da, max_dx, max_dy, max_da;
87 std::vector <TransformParam> prev_to_cur_transform;
88 std::string protobuf_data_path;
97 bool TrackFrameFeatures(cv::Mat frame,
size_t frameNum);
99 std::vector<CamTrajectory> ComputeFramesTrajectory();
100 std::map<size_t,CamTrajectory> SmoothTrajectory(std::vector <CamTrajectory> &trajectory);
103 std::map<size_t,TransformParam> GenNewCamPosition(std::map <size_t,CamTrajectory> &smoothed_trajectory);
127 void SetJson(
const std::string value);
void SetJson(const std::string value)
Load JSON string into this object.
Header file for Clip class.
CamTrajectory GetCamTrajectoryTrackedData(size_t frameId)
This class represents a clip (used to arrange readers on the timeline)
void stabilizeClip(openshot::Clip &video, size_t _start=0, size_t _end=0, bool process_interval=false)
Process clip and store necessary stabilization data.
void AddFrameDataToProto(pb_stabilize::Frame *pbFrameData, CamTrajectory &trajData, TransformParam &transData, size_t frame_number)
Add frame stabilization data into protobuf message.
bool _LoadStabilizedData()
bool SaveStabilizedData()
std::map< size_t, CamTrajectory > trajectoryData
CVStabilization(std::string processInfoJson, ProcessingController &processingController)
Set default smoothing window value to compute stabilization.
void SetJsonValue(const Json::Value root)
Load Json::Value into this object.
This is a message class for thread safe comunication between ClipProcessingJobs and OpenCV classes.
TransformParam GetTransformParamData(size_t frameId)
CamTrajectory(double _x, double _y, double _a)
std::map< size_t, TransformParam > transformationData
Header file for JSON class.
This class stabilizes a video frame using optical flow.