diff options
author | Théo de la Hogue | 2023-09-05 08:01:11 +0200 |
---|---|---|
committer | Théo de la Hogue | 2023-09-05 08:01:11 +0200 |
commit | 236160c812a09a56103dee5249f9cc1dd9c2673c (patch) | |
tree | d4a1568958b787fd1d490114ce81eca03c3480fd /src | |
parent | 670b615503dd49a162d8c11fe2df5812dfcd4cec (diff) | |
download | argaze-236160c812a09a56103dee5249f9cc1dd9c2673c.zip argaze-236160c812a09a56103dee5249f9cc1dd9c2673c.tar.gz argaze-236160c812a09a56103dee5249f9cc1dd9c2673c.tar.bz2 argaze-236160c812a09a56103dee5249f9cc1dd9c2673c.tar.xz |
Testing look_data to handle locked case. Updating variable names and comments.
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/utils/demo_augmented_reality_run.py | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/argaze/utils/demo_augmented_reality_run.py b/src/argaze/utils/demo_augmented_reality_run.py index 14ddd36..c3492b3 100644 --- a/src/argaze/utils/demo_augmented_reality_run.py +++ b/src/argaze/utils/demo_augmented_reality_run.py @@ -50,10 +50,12 @@ def main(): for frame, look_data in aruco_camera.look(timestamp, GazeFeatures.GazePosition((x, y))): # Unpack look data - gaze_movement, scan_step_analysis, layer_analysis, execution_times, exception = look_data + if look_data: - # Do something with look data - # ... + gaze_movement, scan_step_analysis, layer_analysis, execution_times, exception = look_data + + # Do something with look data + # ... # Attach mouse callback to window cv2.setMouseCallback(aruco_camera.name, on_mouse_event) @@ -75,7 +77,7 @@ def main(): # Detect and project AR features detection_time, exceptions = aruco_camera.detect_and_project(video_image) - # Get ArUcoCamera image + # Get ArUcoCamera frame image aruco_camera_image = aruco_camera.image() # Write detection fps @@ -89,14 +91,14 @@ def main(): cv2.rectangle(aruco_camera_image, (0, (i+1)*50), (720, (i+2)*50), (127, 127, 127), -1) cv2.putText(aruco_camera_image, f'{scene_name} error: {e}', (20, (i+1)*90), cv2.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 255), 1, cv2.LINE_AA) - # Display ArUcoCamera image + # Display ArUcoCamera frame image cv2.imshow(aruco_camera.name, aruco_camera_image) - # Draw and display each frames - for frame in aruco_camera.frames: + # Draw and display each scene frames + for scene_frame in aruco_camera.scene_frames: - # Display frame - cv2.imshow(f'{frame.parent.name}:{frame.name}', frame.image()) + # Display scene frame + cv2.imshow(f'{scene_frame.parent.name}:{scene_frame.name}', scene_frame.image()) # Stop by pressing 'Esc' key if cv2.waitKey(10) == 27: |