OpenShot Library | libopenshot
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracker.h
Go to the documentation of this file.
1
9
10
// Copyright (c) 2008-2019 OpenShot Studios, LLC
11
//
12
// SPDX-License-Identifier: LGPL-3.0-or-later
13
14
#ifndef OPENSHOT_TRACKER_EFFECT_H
15
#define OPENSHOT_TRACKER_EFFECT_H
16
17
#include <string>
18
#include <memory>
19
#include <map>
20
21
#include "
EffectBase.h
"
22
23
#include "
Json.h
"
24
#include "
KeyFrame.h
"
25
26
#include "
TrackedObjectBBox.h
"
27
28
namespace
openshot
29
{
30
// Forwards decls
31
class
Frame
;
32
class
TrackedObjectBBox
;
33
41
class
Tracker
:
public
EffectBase
42
{
43
private
:
45
void
init_effect_details();
46
47
Fraction
BaseFPS;
48
double
TimeScale;
49
50
public
:
51
std::string
protobuf_data_path
;
52
std::shared_ptr<TrackedObjectBBox>
trackedData
;
53
55
Tracker
();
56
62
std::shared_ptr<Frame>
GetFrame
(std::shared_ptr<Frame> frame, int64_t frame_number)
override
;
63
64
std::shared_ptr<openshot::Frame>
65
GetFrame
(int64_t frame_number)
override
{
66
return
GetFrame
(std::shared_ptr<Frame>(
new
Frame
()), frame_number);
67
}
68
70
std::string
GetVisibleObjects
(int64_t frame_number)
const override
;
71
72
// Get and Set JSON methods
73
75
std::string
Json
()
const override
;
77
void
SetJson
(
const
std::string value)
override
;
79
Json::Value
JsonValue
()
const override
;
81
void
SetJsonValue
(
const
Json::Value root)
override
;
82
87
std::string
PropertiesJSON
(int64_t requested_frame)
const override
;
88
};
89
90
}
91
92
#endif
EffectBase.h
Header file for EffectBase class.
Json.h
Header file for JSON class.
KeyFrame.h
Header file for the Keyframe class.
TrackedObjectBBox.h
Header file for the TrackedObjectBBox class.
openshot::EffectBase
This abstract class is the base class, used by all effects in libopenshot.
Definition
EffectBase.h:57
openshot::Fraction
This class represents a fraction.
Definition
Fraction.h:30
openshot::Frame
This class represents a single frame of video (i.e. image & audio data).
Definition
Frame.h:90
openshot::TrackedObjectBBox
This class contains the properties of a tracked object and functions to manipulate it.
Definition
TrackedObjectBBox.h:140
openshot::Tracker::Json
std::string Json() const override
Generate JSON string of this object.
Definition
Tracker.cpp:156
openshot::Tracker::GetVisibleObjects
std::string GetVisibleObjects(int64_t frame_number) const override
Get the indexes and IDs of all visible objects in the given frame.
Definition
Tracker.cpp:130
openshot::Tracker::JsonValue
Json::Value JsonValue() const override
Generate Json::Value for this object.
Definition
Tracker.cpp:163
openshot::Tracker::SetJson
void SetJson(const std::string value) override
Load JSON string into this object.
Definition
Tracker.cpp:189
openshot::Tracker::GetFrame
std::shared_ptr< Frame > GetFrame(std::shared_ptr< Frame > frame, int64_t frame_number) override
Apply this effect to an openshot::Frame.
Definition
Tracker.cpp:75
openshot::Tracker::GetFrame
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...
Definition
Tracker.h:65
openshot::Tracker::PropertiesJSON
std::string PropertiesJSON(int64_t requested_frame) const override
Definition
Tracker.cpp:291
openshot::Tracker::trackedData
std::shared_ptr< TrackedObjectBBox > trackedData
Pointer to an object that holds the bounding-box data and it's Keyframes.
Definition
Tracker.h:52
openshot::Tracker::SetJsonValue
void SetJsonValue(const Json::Value root) override
Load Json::Value into this object.
Definition
Tracker.cpp:207
openshot::Tracker::Tracker
Tracker()
Default constructor.
Definition
Tracker.cpp:38
openshot::Tracker::protobuf_data_path
std::string protobuf_data_path
Path to the protobuf file that holds the bounding-box data.
Definition
Tracker.h:51
openshot
This namespace is the default namespace for all code in the openshot library.
Definition
AnimatedCurve.h:24
effects
Tracker.h
Generated by
1.17.0