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"
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);
143 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)
CVTracker(std::string processInfoJson, ProcessingController &processingController)
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)