aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2023-08-09 18:44:00 +0200
committerThéo de la Hogue2023-08-09 18:44:00 +0200
commit8bf3effdefaec8eec5acbe4f146748feb2edb2ab (patch)
tree6bf74922fc2a5e7589ad4936432ab43e066c8131
parent8afe6d3a501f895849da3290a706f9ac3418b0d6 (diff)
downloadargaze-8bf3effdefaec8eec5acbe4f146748feb2edb2ab.zip
argaze-8bf3effdefaec8eec5acbe4f146748feb2edb2ab.tar.gz
argaze-8bf3effdefaec8eec5acbe4f146748feb2edb2ab.tar.bz2
argaze-8bf3effdefaec8eec5acbe4f146748feb2edb2ab.tar.xz
Removing a useless try block.
-rw-r--r--src/argaze/utils/demo_gaze_features_run.py19
1 files changed, 6 insertions, 13 deletions
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)