Safemotion Lib
Loading...
Searching...
No Matches
base_tracker_runner.py
Go to the documentation of this file.
1from abc import abstractmethod
2
3from smtrack.builder.tracker_builer import build_tracker
4from smtrack.builder.motion_builder import build_motion
5
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
__init__(self, tracker=None, motion=None)