Safemotion Lib
Loading...
Searching...
No Matches
smtrack
runner
base_tracker_runner.py
Go to the documentation of this file.
1
from
abc
import
abstractmethod
2
3
from
smtrack.builder.tracker_builer
import
build_tracker
4
from
smtrack.builder.motion_builder
import
build_motion
5
6
class
BaseTrackerRunner
:
7
8
def
__init__
(self, tracker=None, motion=None):
9
10
self.
tracker
=
None
11
self.
motion
=
None
12
13
if
tracker !=
None
:
14
self.
tracker
= build_tracker(tracker)
15
16
if
motion !=
None
:
17
self.
motion
= build_motion(motion)
18
19
def
set_tracker
(self, tracker):
20
if
isinstance(tracker, str):
21
tracker = build_motion(tracker)
22
self.
tracker
= tracker
23
24
def
set_motion
(self, motion):
25
if
isinstance(motion, str):
26
motion = build_motion(motion)
27
self.
motion
= motion
28
29
@abstractmethod
30
def
run_tracker
(self, *args, **kwargs):
31
pass
base_tracker_runner.BaseTrackerRunner
Definition
base_tracker_runner.py:6
base_tracker_runner.BaseTrackerRunner.run_tracker
run_tracker(self, *args, **kwargs)
Definition
base_tracker_runner.py:30
base_tracker_runner.BaseTrackerRunner.set_tracker
set_tracker(self, tracker)
Definition
base_tracker_runner.py:19
base_tracker_runner.BaseTrackerRunner.__init__
__init__(self, tracker=None, motion=None)
Definition
base_tracker_runner.py:8
base_tracker_runner.BaseTrackerRunner.set_motion
set_motion(self, motion)
Definition
base_tracker_runner.py:24
base_tracker_runner.BaseTrackerRunner.tracker
tracker
Definition
base_tracker_runner.py:10
base_tracker_runner.BaseTrackerRunner.motion
motion
Definition
base_tracker_runner.py:11
Generated by
1.10.0