aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-09-20 10:01:07 +0200
committerThéo de la Hogue2022-09-20 10:01:07 +0200
commit36d6cd81aea2fde817447d8f6e960d5b2a3a37db (patch)
tree77985d6c4847ee7c0ea641c4751d8de6b79a3fc4 /src
parentf6f3678510a75e27bcd2bced2dffcd5f173929cf (diff)
downloadargaze-36d6cd81aea2fde817447d8f6e960d5b2a3a37db.zip
argaze-36d6cd81aea2fde817447d8f6e960d5b2a3a37db.tar.gz
argaze-36d6cd81aea2fde817447d8f6e960d5b2a3a37db.tar.bz2
argaze-36d6cd81aea2fde817447d8f6e960d5b2a3a37db.tar.xz
Improving info readibility.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/utils/live_tobii_aruco_aoi_ivy_controller.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/argaze/utils/live_tobii_aruco_aoi_ivy_controller.py b/src/argaze/utils/live_tobii_aruco_aoi_ivy_controller.py
index 1652c67..8462be8 100644
--- a/src/argaze/utils/live_tobii_aruco_aoi_ivy_controller.py
+++ b/src/argaze/utils/live_tobii_aruco_aoi_ivy_controller.py
@@ -105,17 +105,6 @@ def main():
# Copy video frame to edit visualisation on it without disrupting aruco tracking
visu_frame = video_frame.copy()
- # Write stream timing
- cv.rectangle(visu_frame.matrix, (0, 0), (550, 50), (63, 63, 63), -1)
- cv.putText(visu_frame.matrix, f'Segment time: {int(video_ts_ms)} ms', (20, 40), cv.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255), 1, cv.LINE_AA)
-
- # Draw focus area
- cv.rectangle(visu_frame.matrix, (int(video_frame.width/6), 0), (int(visu_frame.width*(1-1/6)), int(visu_frame.height)), (255, 150, 150), 1)
-
- # Draw center
- cv.line(visu_frame.matrix, (int(visu_frame.width/2) - 50, int(visu_frame.height/2)), (int(visu_frame.width/2) + 50, int(visu_frame.height/2)), (255, 150, 150), 1)
- cv.line(visu_frame.matrix, (int(visu_frame.width/2), int(visu_frame.height/2) - 50), (int(visu_frame.width/2), int(visu_frame.height/2) + 50), (255, 150, 150), 1)
-
# Process video and data frame
try:
@@ -227,7 +216,9 @@ def main():
# Write warning related to marker pose processing
except UserWarning as e:
- cv.putText(visu_frame.matrix, f'Marker {marker_id}: {e}', (20, int(visu_frame.height) - (marker_id+1) * 40), cv.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 255), 1, cv.LINE_AA)
+ top = int(visu_frame.height) - (marker_id+1) * 40
+ cv.rectangle(visu_frame.matrix, (0, top), (550, top+40), (127, 127, 127), -1)
+ cv.putText(visu_frame.matrix, f'Marker {marker_id}: {e}', (20, top + 30), cv.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 255), 1, cv.LINE_AA)
# Merge all 2D aoi into a single 2D scene
aoi2D_merged_scene = AOI2DScene.AOI2DScene()
@@ -250,12 +241,23 @@ def main():
# Write warning related to video and data frame processing
except UserWarning as e:
- cv.rectangle(visu_frame.matrix, (0, 50), (550, 100), (63, 63, 63), -1)
+ cv.rectangle(visu_frame.matrix, (0, 50), (550, 100), (127, 127, 127), -1)
cv.putText(visu_frame.matrix, str(e), (20, 80), cv.FONT_HERSHEY_SIMPLEX, 1, (0, 255, 255), 1, cv.LINE_AA)
except ValueError:
pass
+ # Draw focus area
+ cv.rectangle(visu_frame.matrix, (int(video_frame.width/6), 0), (int(visu_frame.width*(1-1/6)), int(visu_frame.height)), (255, 150, 150), 1)
+
+ # Draw center
+ cv.line(visu_frame.matrix, (int(visu_frame.width/2) - 50, int(visu_frame.height/2)), (int(visu_frame.width/2) + 50, int(visu_frame.height/2)), (255, 150, 150), 1)
+ cv.line(visu_frame.matrix, (int(visu_frame.width/2), int(visu_frame.height/2) - 50), (int(visu_frame.width/2), int(visu_frame.height/2) + 50), (255, 150, 150), 1)
+
+ # Write stream timing
+ cv.rectangle(visu_frame.matrix, (0, 0), (550, 50), (63, 63, 63), -1)
+ cv.putText(visu_frame.matrix, f'Segment time: {int(video_ts_ms)} ms', (20, 40), cv.FONT_HERSHEY_SIMPLEX, 1, (255, 255, 255), 1, cv.LINE_AA)
+
# Close window using 'Esc' key
if cv.waitKey(1) == 27:
break