aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/utils/export_tobii_segment_aruco_visual_scan.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/argaze/utils/export_tobii_segment_aruco_visual_scan.py b/src/argaze/utils/export_tobii_segment_aruco_visual_scan.py
index 4174949..721f8d7 100644
--- a/src/argaze/utils/export_tobii_segment_aruco_visual_scan.py
+++ b/src/argaze/utils/export_tobii_segment_aruco_visual_scan.py
@@ -175,7 +175,7 @@ def main():
try:
# Initialise progress bar
- MiscFeatures.printProgressBar(0, tobii_segment_video.get_duration()/1000, prefix = 'Progress:', suffix = 'Complete', length = 100)
+ #MiscFeatures.printProgressBar(0, tobii_segment_video.get_duration()/1000, prefix = 'Progress:', suffix = 'Complete', length = 100)
# Iterate on video frames
for video_ts, video_frame in tobii_segment_video.frames():
@@ -205,6 +205,9 @@ def main():
aruco_tracker.track(video_frame.matrix)
aruco_tracker.draw(video_frame.matrix)
+ # Draw focus area
+ cv.circle(video_frame.matrix, (int(video_frame.width/2), int(video_frame.height/2)), int(video_frame.height/2), (255, 150, 150), 1)
+
# Project 3D scene on each video frame and the visualisation frame
if aruco_tracker.get_markers_number():
@@ -218,14 +221,14 @@ def main():
if aoi3D_scene == None:
continue
-
- # Ignore marker too far from center
+
+ # Ignore marker out of focus area
marker_x, marker_y = aruco_tracker.get_marker_center(i)
distance_to_center = ( (video_frame.width/2 - marker_x)**2 + (video_frame.height/2 - marker_y)**2 )**0.5
-
- if distance_to_center > 900:
- continue
+ if distance_to_center > int(video_frame.height/2):
+ continue
+
aoi3D_scene.rotation = aruco_tracker.get_marker_rotation(i)
aoi3D_scene.translation = aruco_tracker.get_marker_translation(i)
@@ -281,7 +284,7 @@ def main():
# Update Progress Bar
progress = video_ts_ms - int(args.time_range[0] * 1000)
- MiscFeatures.printProgressBar(progress, tobii_segment_video.get_duration()/1000, prefix = 'Progress:', suffix = 'Complete', length = 100)
+ #MiscFeatures.printProgressBar(progress, tobii_segment_video.get_duration()/1000, prefix = 'Progress:', suffix = 'Complete', length = 100)
# Exit on 'ctrl+C' interruption
except KeyboardInterrupt: