32 #ifndef OPENSHOT_TRACKER_EFFECT_H
33 #define OPENSHOT_TRACKER_EFFECT_H
39 #include "../EffectBase.h"
42 #include "../KeyFrame.h"
44 #include "protobuf_messages/trackerdata.pb.h"
45 #include "../TrackedObjectBBox.h"
61 void init_effect_details();
71 Tracker(std::string clipTrackerDataPath);
85 std::shared_ptr<Frame>
GetFrame(std::shared_ptr<Frame> frame, int64_t frame_number)
override;
86 std::shared_ptr<openshot::Frame>
GetFrame(int64_t frame_number)
override {
return GetFrame(std::shared_ptr<Frame> (
new Frame()), frame_number); }
91 void DrawRectangleRGBA(cv::Mat &frame_image, cv::RotatedRect box, std::vector<int> color,
float alpha,
int thickness,
bool is_background);
94 std::string
Json()
const override;
95 void SetJson(
const std::string value)
override;
101 std::string
PropertiesJSON(int64_t requested_frame)
const override;
This abstract class is the base class, used by all effects in libopenshot.
This class represents a fraction.
This class represents a single frame of video (i.e. image & audio data)
This class tracks a given object through the clip, draws a box around it and allow the user to attach...
std::string Json() const override
Generate JSON string of this object.
std::shared_ptr< openshot::Frame > GetFrame(int64_t frame_number) override
This method is required for all derived classes of ClipBase, and returns a new openshot::Frame object...
std::string GetVisibleObjects(int64_t frame_number) const override
Get the indexes and IDs of all visible objects in the given frame.
Json::Value JsonValue() const override
Generate Json::Value for this object.
void SetJson(const std::string value) override
Load JSON string into this object.
std::shared_ptr< Frame > GetFrame(std::shared_ptr< Frame > frame, int64_t frame_number) override
This method is required for all derived classes of EffectBase, and returns a modified openshot::Frame...
std::string PropertiesJSON(int64_t requested_frame) const override
std::shared_ptr< TrackedObjectBBox > trackedData
Pointer to an object that holds the bounding-box data and it's Keyframes.
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Tracker()
Default constructor.
void DrawRectangleRGBA(cv::Mat &frame_image, cv::RotatedRect box, std::vector< int > color, float alpha, int thickness, bool is_background)
std::string protobuf_data_path
Path to the protobuf file that holds the bounding-box data.
This namespace is the default namespace for all code in the openshot library.