gestures

[unmaintained] PoC for motion gesture detection from webcam input
Log | Files | Refs | README | LICENSE

commit dda514669af6fe34391d183a00f952ae07fa2383
parent e29420288e620e5e817fb209fed6e5cecf844715
Author: Stefan Koch <taikano@lavabit.com>
Date:   Sat, 22 Jun 2013 12:42:25 +0200

Merge branch 'master' of https://github.com/taikano/gestures

Diffstat:
Mtrack.py | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/track.py b/track.py @@ -28,8 +28,8 @@ def pointer_pos(img): return (None, None) -def movement_direction(x_delta, y_delta): - if abs(x_delta) > 10 or abs(y_delta) > 10: +def movement_direction(x_delta, y_delta, threshold = 10): + if abs(x_delta) > threshold or abs(y_delta) > threshold: degree = math.atan2(y_delta, x_delta) if -0.875 * math.pi <= degree < -0.625 * math.pi: direction = models.UP_RIGHT