Commit 973a3b30 authored by Taddeüs Kroes's avatar Taddeüs Kroes

Moved hand tracker from source package to test applications.

parent 0c55af10
from logger import Logger from logger import Logger
from drivers import create_driver from drivers import create_driver
from tracker import GestureTracker, Gesture from tracker import GestureTracker, Gesture
from trackers import register_tracker
from geometry import Positionable from geometry import Positionable
from areas import * from areas import *
from basic import BasicEventTracker from basic import BasicEventTracker
from tap import TapTracker from tap import TapTracker
from transform import TransformationTracker from transform import TransformationTracker
from hand import HandTracker
# Map of gesture type to tracker type # Map of gesture type to tracker type
_tracker_types = {} _tracker_types = {}
def _register_tracker(tracker_type): def register_tracker(tracker_type):
tracker_type.gesture_types = \ tracker_type.gesture_types = \
[gesture._type for gesture in tracker_type.supported_gestures] [gesture._type for gesture in tracker_type.supported_gestures]
...@@ -29,7 +28,6 @@ def create_tracker(gesture_type, widget): ...@@ -29,7 +28,6 @@ def create_tracker(gesture_type, widget):
return _tracker_types[gesture_type](widget) return _tracker_types[gesture_type](widget)
_register_tracker(BasicEventTracker) register_tracker(BasicEventTracker)
_register_tracker(TapTracker) register_tracker(TapTracker)
_register_tracker(TransformationTracker) register_tracker(TransformationTracker)
_register_tracker(HandTracker)
from ..tracker import GestureTracker, Gesture from src.tracker import GestureTracker, Gesture
class HandGesture(Gesture): class HandGesture(Gesture):
......
...@@ -6,6 +6,9 @@ from math import pi, tan ...@@ -6,6 +6,9 @@ from math import pi, tan
import src as mt import src as mt
from utils import BoundingBoxArea, Flick, FlickThread, GtkEventWindow from utils import BoundingBoxArea, Flick, FlickThread, GtkEventWindow
from hand import HandTracker
mt.register_tracker(HandTracker)
RED = 1, 0, 0 RED = 1, 0, 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment