diff options
author | Théo de la Hogue | 2022-04-11 15:59:56 +0200 |
---|---|---|
committer | Théo de la Hogue | 2022-04-11 15:59:56 +0200 |
commit | d7a06a337940f2b72e6c7d10c304df9eca000a88 (patch) | |
tree | 80e4f12c682e92d430b26e7c20860691c547743f /src | |
parent | 6efc2b7835141db21718365a6ba396493e7be8b2 (diff) | |
download | argaze-d7a06a337940f2b72e6c7d10c304df9eca000a88.zip argaze-d7a06a337940f2b72e6c7d10c304df9eca000a88.tar.gz argaze-d7a06a337940f2b72e6c7d10c304df9eca000a88.tar.bz2 argaze-d7a06a337940f2b72e6c7d10c304df9eca000a88.tar.xz |
Keep last pointer position to avoid blinking roi display
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/utils/export_tobii_segment_aruco_markers.py | 5 | ||||
-rw-r--r-- | src/argaze/utils/live_tobii_aruco_rois.py | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/argaze/utils/export_tobii_segment_aruco_markers.py b/src/argaze/utils/export_tobii_segment_aruco_markers.py index 2195169..f9c4cb2 100644 --- a/src/argaze/utils/export_tobii_segment_aruco_markers.py +++ b/src/argaze/utils/export_tobii_segment_aruco_markers.py @@ -72,7 +72,7 @@ def main(): # When expected values can't be found except (KeyError, AttributeError, ValueError): - pointer = (0,0) + pass # keep last pointer position # Track markers with pose estimation and draw them aruco_tracker.track(video_frame.matrix) @@ -99,7 +99,8 @@ def main(): roi2D_scene = roi3D_scene.project(aruco_camera.get_K(), D0) # Check if gaze is inside 2D rois - roi2D_scene.inside(pointer) + if pointer != None: + roi2D_scene.inside(pointer) # Draw 2D rois roi2D_scene.draw(video_frame.matrix) diff --git a/src/argaze/utils/live_tobii_aruco_rois.py b/src/argaze/utils/live_tobii_aruco_rois.py index e8ed71f..028f83e 100644 --- a/src/argaze/utils/live_tobii_aruco_rois.py +++ b/src/argaze/utils/live_tobii_aruco_rois.py @@ -81,7 +81,7 @@ def main(): # When expected values aren't in data stream except (KeyError, AttributeError, ValueError): - pointer = (0,0) + pass # keep last pointer position # Track markers with pose estimation and draw them aruco_tracker.track(video_frame.matrix) @@ -108,7 +108,8 @@ def main(): roi2D_scene = roi3D_scene.project(aruco_camera.get_K(), D0) # Check if gaze is inside 2D rois - roi2D_scene.inside(pointer) + if pointer != None: + roi2D_scene.inside(pointer) # Draw 2D rois roi2D_scene.draw(video_frame.matrix) |