OpenShot Library | libopenshot
0.4.0
|
This abstract class is the base class of all Tracked Objects. More...
#include <TrackedObjectBase.h>
Public Member Functions | |
Json::Value | add_property_choice_json (std::string name, int value, int selected_value) const |
Generate JSON choice for a property (dropdown properties) More... | |
virtual void | AddBox (int64_t _frame_num, float _cx, float _cy, float _width, float _height, float _angle) |
Add a bounding box to the tracked object's BoxVec map. More... | |
virtual bool | ExactlyContains (int64_t frame_number) const |
Check if there is data for the exact frame number. More... | |
virtual std::map< std::string, float > | GetBoxValues (int64_t frame_number) const |
Return the main properties of a TrackedObjectBBox instance - such as position, size and rotation. More... | |
std::string | Id () const |
Get the id of this object. More... | |
void | Id (std::string _id) |
Set the id of this object. More... | |
virtual std::string | Json () const =0 |
Get and Set JSON methods. More... | |
virtual Json::Value | JsonValue () const =0 |
Generate Json::Value for this object. More... | |
ClipBase * | ParentClip () const |
Get and set the parentClip of this object. More... | |
void | ParentClip (ClipBase *clip) |
virtual Json::Value | PropertiesJSON (int64_t requested_frame) const =0 |
virtual void | ScalePoints (double scale) |
Scale an object's property. More... | |
virtual void | SetJson (const std::string value)=0 |
Load JSON string into this object. More... | |
virtual void | SetJsonValue (const Json::Value root)=0 |
Load Json::Value into this object. More... | |
TrackedObjectBase () | |
Default constructor. More... | |
TrackedObjectBase (std::string _id) | |
Constructor which takes an object ID. More... | |
virtual | ~TrackedObjectBase ()=default |
Destructor. More... | |
Public Attributes | |
Keyframe | draw_box |
Keyframe to determine if a specific box is drawn (or hidden) More... | |
Keyframe | visible |
Keyframe to track if a box is visible in the current frame (read-only) More... | |
Protected Attributes | |
std::string | id |
ClipBase * | parentClip |
This abstract class is the base class of all Tracked Objects.
A Tracked Object is an object or a desired set of pixels in a digital image which properties (such as position, width and height) can be detected and predicted along the frames of a clip.
Definition at line 35 of file TrackedObjectBase.h.
openshot::TrackedObjectBase::TrackedObjectBase | ( | ) |
Default constructor.
Definition at line 22 of file TrackedObjectBase.cpp.
openshot::TrackedObjectBase::TrackedObjectBase | ( | std::string | _id | ) |
Constructor which takes an object ID.
Definition at line 25 of file TrackedObjectBase.cpp.
|
virtualdefault |
Destructor.
Json::Value openshot::TrackedObjectBase::add_property_choice_json | ( | std::string | name, |
int | value, | ||
int | selected_value | ||
) | const |
Generate JSON choice for a property (dropdown properties)
Definition at line 28 of file TrackedObjectBase.cpp.
Referenced by openshot::TrackedObjectBBox::PropertiesJSON().
|
inlinevirtual |
Add a bounding box to the tracked object's BoxVec map.
Reimplemented in openshot::TrackedObjectBBox.
Definition at line 73 of file TrackedObjectBase.h.
|
inlinevirtual |
Check if there is data for the exact frame number.
Reimplemented in openshot::TrackedObjectBBox.
Definition at line 66 of file TrackedObjectBase.h.
|
inlinevirtual |
Return the main properties of a TrackedObjectBBox instance - such as position, size and rotation.
Reimplemented in openshot::TrackedObjectBBox.
Definition at line 71 of file TrackedObjectBase.h.
|
inline |
Get the id of this object.
Definition at line 58 of file TrackedObjectBase.h.
Referenced by openshot::TrackedObjectBBox::JsonValue(), openshot::TrackedObjectBBox::PropertiesJSON(), and openshot::TrackedObjectBBox::SetJsonValue().
|
inline |
Set the id of this object.
Definition at line 60 of file TrackedObjectBase.h.
|
pure virtual |
Get and Set JSON methods.
Generate JSON string of this object
Implemented in openshot::TrackedObjectBBox.
|
pure virtual |
Generate Json::Value for this object.
Implemented in openshot::TrackedObjectBBox.
|
inline |
Get and set the parentClip of this object.
Definition at line 62 of file TrackedObjectBase.h.
|
inline |
Definition at line 63 of file TrackedObjectBase.h.
|
pure virtual |
Get all properties for a specific frame (perfect for a UI to display the current state of all properties at any time)
Implemented in openshot::TrackedObjectBBox.
|
inlinevirtual |
Scale an object's property.
Reimplemented in openshot::TrackedObjectBBox.
Definition at line 69 of file TrackedObjectBase.h.
|
pure virtual |
Load JSON string into this object.
Implemented in openshot::TrackedObjectBBox.
|
pure virtual |
Load Json::Value into this object.
Implemented in openshot::TrackedObjectBBox.
Keyframe openshot::TrackedObjectBase::draw_box |
Keyframe to determine if a specific box is drawn (or hidden)
Definition at line 46 of file TrackedObjectBase.h.
Referenced by openshot::TrackedObjectBBox::JsonValue(), openshot::TrackedObjectBBox::PropertiesJSON(), and openshot::TrackedObjectBBox::SetJsonValue().
|
protected |
Definition at line 37 of file TrackedObjectBase.h.
Referenced by Id().
|
protected |
Definition at line 38 of file TrackedObjectBase.h.
Referenced by ParentClip().
Keyframe openshot::TrackedObjectBase::visible |
Keyframe to track if a box is visible in the current frame (read-only)
Definition at line 43 of file TrackedObjectBase.h.
Referenced by openshot::TrackedObjectBBox::JsonValue(), openshot::TrackedObjectBBox::PropertiesJSON(), and openshot::TrackedObjectBBox::SetJsonValue().