14 #ifndef OPENSHOT_TRACKER_EFFECT_H 15 #define OPENSHOT_TRACKER_EFFECT_H 32 class TrackedObjectBBox;
45 void init_effect_details();
57 Tracker(std::string clipTrackerDataPath);
64 std::shared_ptr<Frame>
GetFrame(std::shared_ptr<Frame> frame, int64_t frame_number)
override;
66 std::shared_ptr<openshot::Frame>
68 return GetFrame(std::shared_ptr<Frame>(
new Frame()), frame_number);
74 void DrawRectangleRGBA(cv::Mat &frame_image, cv::RotatedRect box, std::vector<int> color,
float alpha,
int thickness,
bool is_background);
79 std::string
Json()
const override;
81 void SetJson(
const std::string value)
override;
91 std::string
PropertiesJSON(int64_t requested_frame)
const override;
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
This abstract class is the base class, used by all effects in libopenshot.
std::shared_ptr< TrackedObjectBBox > trackedData
Pointer to an object that holds the bounding-box data and it's Keyframes.
Json::Value JsonValue() const override
Generate Json::Value for this object.
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::string PropertiesJSON(int64_t requested_frame) const override
Header file for the Keyframe class.
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...
Header file for JSON class.
void DrawRectangleRGBA(cv::Mat &frame_image, cv::RotatedRect box, std::vector< int > color, float alpha, int thickness, bool is_background)
This class represents a fraction.
std::string protobuf_data_path
Path to the protobuf file that holds the bounding-box data.
Tracker()
Default constructor.
std::string GetVisibleObjects(int64_t frame_number) const override
Get the indexes and IDs of all visible objects in the given frame.
void SetJson(const std::string value) override
Load JSON string into this object.
Header file for the TrackedObjectBBox class.
This namespace is the default namespace for all code in the openshot library.
Header file for EffectBase class.
std::shared_ptr< Frame > GetFrame(std::shared_ptr< Frame > frame, int64_t frame_number) override
Apply this effect to an openshot::Frame.