Loading...
Searching...
No Matches
openshot::TrackedObjectBase Class Referenceabstract

This abstract class is the base class of all Tracked Objects. More...

`#include <TrackedObjectBase.h>`

Inheritance diagram for openshot::TrackedObjectBase:

## 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)
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.
std::string | ChildClipId () const
| Get and set the Id of the childClip of this object.
void | ChildClipId (std::string _childClipId)
virtual bool | ExactlyContains (int64_t frame_number) const
| Check if there is data for the exact frame number.
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.
virtual std::map< std::string, float > | GetParentClipProperties (int64_t frame_number) const
| Return the main properties of the tracked object's parent clip - such as position, size and rotation.
std::string | Id () const
| Get the id of this object.
void | Id (std::string _id)
| Set the id of this object.
virtual std::string | Json () const =0
| Get and Set JSON methods.
virtual Json::Value | JsonValue () const =0
| Generate Json::Value for this object.
ClipBase * | ParentClip () const
| Get and set the parentClip of this object.
void | ParentClip (ClipBase *clip)
virtual Json::Value | PropertiesJSON (int64_t requested_frame) const =0
virtual void | ScalePoints (double scale)
| Scale an object's property.
virtual void | SetJson (const std::string value)=0
| Load JSON string into this object.
virtual void | SetJsonValue (const Json::Value root)=0
| Load Json::Value into this object.
| TrackedObjectBase ()
| Default constructor.
| TrackedObjectBase (std::string _id)
| Constructor which takes an object ID.
virtual | ~TrackedObjectBase ()=default
| Destructor.

## Public Attributes

Keyframe | draw_box
Keyframe | visible

## Protected Attributes

std::string | childClipId
std::string | id
ClipBase * | parentClip

## Detailed Description

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.

## Constructor & Destructor Documentation

## TrackedObjectBase() [1/2]

openshot::TrackedObjectBase::TrackedObjectBase | ( |  | ) |

Default constructor.

Definition at line 22 of file TrackedObjectBase.cpp.

## TrackedObjectBase() [2/2]

openshot::TrackedObjectBase::TrackedObjectBase | ( | std::string | _id | ) |

Constructor which takes an object ID.

Definition at line 25 of file TrackedObjectBase.cpp.

## ~TrackedObjectBase()

virtual openshot::TrackedObjectBase::~TrackedObjectBase | ( |  | ) |

virtual default

Destructor.

## Member Function Documentation

## add_property_choice_json()

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().

## AddBox()

virtual void openshot::TrackedObjectBase::AddBox | ( | int64_t | _frame_num,
|  | float | _cx,
|  | float | _cy,
|  | float | _width,
|  | float | _height,
|  | float | _angle
| ) |  |

inline virtual

Add a bounding box to the tracked object's BoxVec map.

Reimplemented in openshot::TrackedObjectBBox.

Definition at line 77 of file TrackedObjectBase.h.

## ChildClipId() [1/2]

std::string openshot::TrackedObjectBase::ChildClipId | ( |  | ) | const

inline

Get and set the Id of the childClip of this object.

Definition at line 64 of file TrackedObjectBase.h.

Referenced by openshot::TrackedObjectBBox::JsonValue(), openshot::TrackedObjectBBox::PropertiesJSON(), and openshot::TrackedObjectBBox::SetJsonValue().

## ChildClipId() [2/2]

void openshot::TrackedObjectBase::ChildClipId | ( | std::string | _childClipId | ) |

inline

Definition at line 65 of file TrackedObjectBase.h.

## ExactlyContains()

virtual bool openshot::TrackedObjectBase::ExactlyContains | ( | int64_t | frame_number | ) | const

inline virtual

Check if there is data for the exact frame number.

Reimplemented in openshot::TrackedObjectBBox.

Definition at line 68 of file TrackedObjectBase.h.

## GetBoxValues()

virtual std::map< std::string, float > openshot::TrackedObjectBase::GetBoxValues | ( | int64_t | frame_number | ) | const

inline virtual

Return the main properties of a TrackedObjectBBox instance - such as position, size and rotation.

Reimplemented in openshot::TrackedObjectBBox.

Definition at line 73 of file TrackedObjectBase.h.

## GetParentClipProperties()

virtual std::map< std::string, float > openshot::TrackedObjectBase::GetParentClipProperties | ( | int64_t | frame_number | ) | const

inline virtual

Return the main properties of the tracked object's parent clip - such as position, size and rotation.

Reimplemented in openshot::TrackedObjectBBox.

Definition at line 75 of file TrackedObjectBase.h.

## Id() [1/2]

std::string openshot::TrackedObjectBase::Id | ( |  | ) | const

inline

Get the id of this object.

Definition at line 57 of file TrackedObjectBase.h.

Referenced by openshot::TrackedObjectBBox::JsonValue(), openshot::TrackedObjectBBox::PropertiesJSON(), and openshot::TrackedObjectBBox::SetJsonValue().

## Id() [2/2]

void openshot::TrackedObjectBase::Id | ( | std::string | _id | ) |

inline

Set the id of this object.

Definition at line 59 of file TrackedObjectBase.h.

## Json()

virtual std::string openshot::TrackedObjectBase::Json | ( |  | ) | const

pure virtual

Get and Set JSON methods.

Generate JSON string of this object

Implemented in openshot::TrackedObjectBBox.

## JsonValue()

virtual Json::Value openshot::TrackedObjectBase::JsonValue | ( |  | ) | const

pure virtual

Generate Json::Value for this object.

Implemented in openshot::TrackedObjectBBox.

## ParentClip() [1/2]

ClipBase * openshot::TrackedObjectBase::ParentClip | ( |  | ) | const

inline

Get and set the parentClip of this object.

Definition at line 61 of file TrackedObjectBase.h.

Referenced by openshot::TrackedObjectBBox::GetParentClipProperties().

## ParentClip() [2/2]

void openshot::TrackedObjectBase::ParentClip | ( | ClipBase * | clip | ) |

inline

Definition at line 62 of file TrackedObjectBase.h.

## PropertiesJSON()

virtual Json::Value openshot::TrackedObjectBase::PropertiesJSON | ( | int64_t | requested_frame | ) | const

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.

## ScalePoints()

virtual void openshot::TrackedObjectBase::ScalePoints | ( | double | scale | ) |

inline virtual

Scale an object's property.

Reimplemented in openshot::TrackedObjectBBox.

Definition at line 71 of file TrackedObjectBase.h.

## SetJson()

virtual void openshot::TrackedObjectBase::SetJson | ( | const std::string | value | ) |

pure virtual

Load JSON string into this object.

Implemented in openshot::TrackedObjectBBox.

## SetJsonValue()

virtual void openshot::TrackedObjectBase::SetJsonValue | ( | const Json::Value | root | ) |

pure virtual

Load Json::Value into this object.

Implemented in openshot::TrackedObjectBBox.

## Member Data Documentation

## childClipId

std::string openshot::TrackedObjectBase::childClipId

protected

Definition at line 38 of file TrackedObjectBase.h.

Referenced by ChildClipId(), and ChildClipId().

## draw_box

Keyframe openshot::TrackedObjectBase::draw_box

Definition at line 45 of file TrackedObjectBase.h.

Referenced by openshot::TrackedObjectBBox::JsonValue(), openshot::TrackedObjectBBox::PropertiesJSON(), and openshot::TrackedObjectBBox::SetJsonValue().

## id

std::string openshot::TrackedObjectBase::id

protected

Definition at line 37 of file TrackedObjectBase.h.

Referenced by Id().

## parentClip

ClipBase* openshot::TrackedObjectBase::parentClip

protected

Definition at line 40 of file TrackedObjectBase.h.

Referenced by openshot::TrackedObjectBBox::GetParentClipProperties(), ParentClip(), and ParentClip().

## visible

Keyframe openshot::TrackedObjectBase::visible

Definition at line 44 of file TrackedObjectBase.h.

Referenced by openshot::TrackedObjectBBox::JsonValue(), openshot::TrackedObjectBBox::PropertiesJSON(), and openshot::TrackedObjectBBox::SetJsonValue().

The documentation for this class was generated from the following files:

- TrackedObjectBase.h
- TrackedObjectBase.cpp