|
OpenShot Library | libopenshot
0.5.0
|
Go to the documentation of this file.
14 #ifndef OPENSHOT_CVTRACKER_H
15 #define OPENSHOT_CVTRACKER_H
20 #define uint64 uint64_t
21 #include <opencv2/opencv.hpp>
22 #include <opencv2/tracking.hpp>
23 #include <opencv2/core.hpp>
60 FrameData(
size_t _frame_id ,
float _rotation,
float _x1,
float _y1,
float _x2,
float _y2)
77 std::map<size_t, FrameData> trackedDataById;
78 std::string trackerType;
79 cv::Ptr<OPENCV_TRACKER_TYPE> tracker;
84 std::string protobuf_data_path;
102 std::vector<cv::Point2f> prevPts;
103 const int kltMaxCorners = 100;
104 const double kltQualityLevel = 0.01;
105 const double kltMinDist = 5.0;
106 const int kltBlockSize = 3;
107 const int minKltPts = 10;
108 double smoothC_x = 0, smoothC_y = 0;
109 const double smoothAlpha = 0.8;
112 cv::Mat fullPrevGray;
115 double origWidth{0}, origHeight{0};
123 cv::Ptr<OPENCV_TRACKER_TYPE>
selectTracker(std::string trackerType);
131 bool trackFrame(cv::Mat &frame,
size_t frameId);
146 void SetJson(
const std::string value);
FrameData GetTrackedData(size_t frameId)
Get tracked data for a given frame.
Header file for Clip class.
FrameData(size_t _frame_id, float _rotation, float _x1, float _y1, float _x2, float _y2)
void AddFrameDataToProto(pb_tracker::Frame *pbFrameData, FrameData &fData)
Add frame tracked data into protobuf message.
This namespace is the default namespace for all code in the openshot library.
bool trackFrame(cv::Mat &frame, size_t frameId)
This class represents a clip (used to arrange readers on the timeline)
void SetJson(const std::string value)
Load JSON string into this object.
bool SaveTrackedData()
Save protobuf file.
Header file for the Keyframe class.
void SetJsonValue(const Json::Value root)
Load Json::Value into this object.
CVTracker(std::string processInfoJson, ProcessingController &processingController)
bool initTracker(cv::Mat &frame, size_t frameId)
This is a message class for thread safe comunication between ClipProcessingJobs and OpenCV classes.
Header file for Frame class.
The tracker class will receive one bounding box provided by the user and then iterate over the clip f...
cv::Ptr< OPENCV_TRACKER_TYPE > selectTracker(std::string trackerType)
void trackClip(openshot::Clip &video, size_t _start=0, size_t _end=0, bool process_interval=false)
Header file for JSON class.
FrameData(size_t _frame_id)
Header file for OpenCVUtilities (set some common macros)