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;
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);
129 void SetJson(
const std::string value);
Header file for Clip class.
Header file for Frame class.
Header file for JSON class.
Header file for the Keyframe class.
Header file for OpenCVUtilities (set some common macros)
This is a message class for thread safe comunication between ClipProcessingJobs and OpenCV classes.
The tracker class will receive one bounding box provided by the user and then iterate over the clip f...
void trackClip(openshot::Clip &video, size_t _start=0, size_t _end=0, bool process_interval=false)
bool SaveTrackedData()
Save protobuf file.
void SetJsonValue(const Json::Value root)
Load Json::Value into this object.
void SetJson(const std::string value)
Load JSON string into this object.
cv::Rect2d filter_box_jitter(size_t frameId)
Filter current bounding box jitter.
void AddFrameDataToProto(pb_tracker::Frame *pbFrameData, FrameData &fData)
Add frame tracked data into protobuf message.
FrameData GetTrackedData(size_t frameId)
Get tracked data for a given frame.
cv::Ptr< OPENCV_TRACKER_TYPE > selectTracker(std::string trackerType)
This class represents a clip (used to arrange readers on the timeline)
This namespace is the default namespace for all code in the openshot library.
FrameData(size_t _frame_id)
FrameData(size_t _frame_id, float _rotation, float _x1, float _y1, float _x2, float _y2)