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> 58 {frame_id = _frame_id;}
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;
98 bool initTracker(cv::Mat &frame,
size_t frameId);
101 bool trackFrame(cv::Mat &frame,
size_t frameId);
109 cv::Ptr<OPENCV_TRACKER_TYPE> selectTracker(std::string trackerType);
114 void trackClip(
openshot::Clip& video,
size_t _start=0,
size_t _end=0,
bool process_interval=
false);
117 cv::Rect2d filter_box_jitter(
size_t frameId);
120 FrameData GetTrackedData(
size_t frameId);
124 bool SaveTrackedData();
126 void AddFrameDataToProto(pb_tracker::Frame* pbFrameData,
FrameData& fData);
129 void SetJson(
const std::string value);
130 void SetJsonValue(
const Json::Value root);
133 bool _LoadTrackedData();
FrameData(size_t _frame_id)
Header file for the Keyframe class.
This is a message class for thread safe comunication between ClipProcessingJobs and OpenCV classes...
This class represents a clip (used to arrange readers on the timeline)
Header file for Frame class.
Header file for OpenCVUtilities (set some common macros)
Header file for Clip class.
Header file for JSON class.
This namespace is the default namespace for all code in the openshot library.
The tracker class will receive one bounding box provided by the user and then iterate over the clip f...
FrameData(size_t _frame_id, float _rotation, float _x1, float _y1, float _x2, float _y2)