From 8bf3effdefaec8eec5acbe4f146748feb2edb2ab Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Wed, 9 Aug 2023 18:44:00 +0200 Subject: Removing a useless try block. --- src/argaze/utils/demo_gaze_features_run.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/argaze/utils/demo_gaze_features_run.py b/src/argaze/utils/demo_gaze_features_run.py index 76d683a..7088639 100644 --- a/src/argaze/utils/demo_gaze_features_run.py +++ b/src/argaze/utils/demo_gaze_features_run.py @@ -10,7 +10,6 @@ __license__ = "BSD" import argparse import os import time -import queue from argaze import ArFeatures, GazeFeatures from argaze.AreaOfInterest import AOIFeatures @@ -50,20 +49,14 @@ def main(): # Update pointer position def on_mouse_event(event, x, y, flags, param): - try: + # Edit millisecond timestamp + timestamp = int((time.time() - start_time) * 1e3) - # Edit millisecond timestamp - timestamp = int((time.time() - start_time) * 1e3) + # Project gaze position into frame + movement, scan_step_analysis, aoi_scan_step_analysis, times, exception = ar_frame.look(timestamp, GazeFeatures.GazePosition((x, y))) - # Project gaze position into frame - movement, scan_step_analysis, aoi_scan_step_analysis, times, exception = ar_frame.look(timestamp, GazeFeatures.GazePosition((x, y))) - - # Do something with look data - # ... - - except GazeFeatures.AOIScanStepError as e: - - print(f'Error on {e.aoi} step:', e) + # Do something with look data + # ... # Attach mouse callback to window cv2.setMouseCallback(ar_frame.name, on_mouse_event) -- cgit v1.1