diff options
Diffstat (limited to 'src/argaze/utils/demo_ar_features_run.py')
-rw-r--r-- | src/argaze/utils/demo_ar_features_run.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/argaze/utils/demo_ar_features_run.py b/src/argaze/utils/demo_ar_features_run.py index 22b0d89..d7854e3 100644 --- a/src/argaze/utils/demo_ar_features_run.py +++ b/src/argaze/utils/demo_ar_features_run.py @@ -32,8 +32,6 @@ def main(): # Load AR enviroment ar_environment = ArFeatures.ArEnvironment.from_json(args.environment) - print(ar_environment) - # Create a window to display AR environment cv2.namedWindow(ar_environment.name, cv2.WINDOW_AUTOSIZE) @@ -47,7 +45,12 @@ def main(): timestamp = int((time.time() - start_time) * 1e3) # Project gaze position into environment - ar_environment.look(timestamp, GazeFeatures.GazePosition((x, y))) + for scene_name, scene_looking_data in ar_environment.look(timestamp, GazeFeatures.GazePosition((x, y))): + + for frame_name, frame_looking_data in scene_looking_data: + + # Do nothing with frame looking data + pass # Attach mouse callback to window cv2.setMouseCallback(ar_environment.name, on_mouse_event) @@ -86,8 +89,14 @@ def main(): # Draw and display each frames in separate window for scene_name, frame_name, frame in ar_environment.frames: + # Create frame image + frame_image = frame.image + + # Draw frame info + frame.draw(frame_image) + # Display frame - cv2.imshow(f'{scene_name}:{frame_name}', frame.image) + cv2.imshow(f'{scene_name}:{frame_name}', frame_image) # Stop by pressing 'Esc' key if cv2.waitKey(10) == 27: |