aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-09-14 16:32:25 +0200
committerThéo de la Hogue2022-09-14 16:32:25 +0200
commitcd5beb152f38af4da35a4b79ab5c90db8f0523f3 (patch)
tree6106bb4013be1c71585a37f84a3d66f9d4409ed8 /src
parent2e909d67876c47d497653102a07b7dc913b83f3d (diff)
downloadargaze-cd5beb152f38af4da35a4b79ab5c90db8f0523f3.zip
argaze-cd5beb152f38af4da35a4b79ab5c90db8f0523f3.tar.gz
argaze-cd5beb152f38af4da35a4b79ab5c90db8f0523f3.tar.bz2
argaze-cd5beb152f38af4da35a4b79ab5c90db8f0523f3.tar.xz
Fixing aoi inside cone vision selection.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/utils/export_tobii_segment_aruco_visual_scan.py11
-rw-r--r--src/argaze/utils/live_tobii_aruco_aoi_ivy_controller.py3
2 files changed, 6 insertions, 8 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 711cf3b..2adf773 100644
--- a/src/argaze/utils/export_tobii_segment_aruco_visual_scan.py
+++ b/src/argaze/utils/export_tobii_segment_aruco_visual_scan.py
@@ -196,7 +196,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():
@@ -258,8 +258,8 @@ def main():
for (i, marker_id) in enumerate(aruco_tracker.get_markers_ids()):
- # Select 3D scene related to detected marker
- aoi3D_scene = aoi3D_scene_selector(marker_id)
+ # Copy 3D scene related to detected marker
+ aoi3D_scene = aoi3D_scene_selector(marker_id).copy()
if aoi3D_scene == None:
continue
@@ -279,8 +279,7 @@ def main():
aoi3D_inside, aoi3D_outside = aoi3D_camera.vision_cone(300, 150, cone_tip=[0., 0., -20.])
# Keep only aoi inside vision cone field
- for name, aoi in aoi3D_outside.items():
- del aoi3D_scene[name]
+ aoi3D_scene = aoi3D_scene.copy(exclude=aoi3D_outside.keys())
# DON'T APPLY CAMERA DISTORSION : it projects points which are far from the frame into it
# This hack isn't realistic but as the gaze will mainly focus on centered AOI, where the distorsion is low, it is acceptable.
@@ -334,7 +333,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:
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 51d45f3..cba466b 100644
--- a/src/argaze/utils/live_tobii_aruco_aoi_ivy_controller.py
+++ b/src/argaze/utils/live_tobii_aruco_aoi_ivy_controller.py
@@ -172,8 +172,7 @@ def main():
aoi3D_inside, aoi3D_outside = aoi3D_camera.vision_cone(300, 150, cone_tip=[0., 0., -20.])
# Keep only aoi inside vision cone field
- for name, aoi in aoi3D_outside.items():
- del aoi3D_scene[name]
+ aoi3D_scene = aoi3D_scene.copy(exclude=aoi3D_outside.keys())
# DON'T APPLY CAMERA DISTORSION : it projects points which are far from the frame into it
# This hack isn't realistic but as the gaze will mainly focus on centered AOI, where the distorsion is low, it is acceptable.