32 #ifndef OPENSHOT_CVTRACKER_H 33 #define OPENSHOT_CVTRACKER_H 38 #define uint64 uint64_t 39 #include <opencv2/opencv.hpp> 40 #include <opencv2/tracking.hpp> 41 #include <opencv2/core.hpp> 51 #include "protobuf_messages/trackerdata.pb.h" 72 {frame_id = _frame_id;}
74 FrameData(
size_t _frame_id ,
float _rotation,
float _x1,
float _y1,
float _x2,
float _y2)
91 std::map<size_t, FrameData> trackedDataById;
92 std::string trackerType;
93 cv::Ptr<OPENCV_TRACKER_TYPE> tracker;
98 std::string protobuf_data_path;
112 bool initTracker(cv::Mat &frame,
size_t frameId);
115 bool trackFrame(cv::Mat &frame,
size_t frameId);
123 cv::Ptr<OPENCV_TRACKER_TYPE> selectTracker(std::string trackerType);
128 void trackClip(
openshot::Clip& video,
size_t _start=0,
size_t _end=0,
bool process_interval=
false);
131 cv::Rect2d filter_box_jitter(
size_t frameId);
134 FrameData GetTrackedData(
size_t frameId);
138 bool SaveTrackedData();
140 void AddFrameDataToProto(pb_tracker::Frame* pbFrameData,
FrameData& fData);
143 void SetJson(
const std::string value);
144 void SetJsonValue(
const Json::Value root);
147 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)