aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/utils/tobii_segment_aruco_aoi_export.py24
-rw-r--r--src/argaze/utils/tobii_stream_aruco_aoi_display.py18
2 files changed, 23 insertions, 19 deletions
diff --git a/src/argaze/utils/tobii_segment_aruco_aoi_export.py b/src/argaze/utils/tobii_segment_aruco_aoi_export.py
index 9f6ae78..7adba2f 100644
--- a/src/argaze/utils/tobii_segment_aruco_aoi_export.py
+++ b/src/argaze/utils/tobii_segment_aruco_aoi_export.py
@@ -124,21 +124,23 @@ def main():
aoi2D_visu_scenes = {}
all_aois_names = []
- for marker_id, aoi_scene_filepath in args.marker_id_scene.items():
+ if args.marker_id_scene != None:
- marker_id = int(marker_id)
-
- aoi3D_scenes[marker_id] = AOI3DScene.AOI3DScene()
- aoi3D_scenes[marker_id].load(aoi_scene_filepath)
+ for marker_id, aoi_scene_filepath in args.marker_id_scene.items():
- print(f'AOI in {os.path.basename(aoi_scene_filepath)} scene related to marker #{marker_id}:')
- for aoi in aoi3D_scenes[marker_id].keys():
+ marker_id = int(marker_id)
+
+ aoi3D_scenes[marker_id] = AOI3DScene.AOI3DScene()
+ aoi3D_scenes[marker_id].load(aoi_scene_filepath)
+
+ print(f'AOI in {os.path.basename(aoi_scene_filepath)} scene related to marker #{marker_id}:')
+ for aoi in aoi3D_scenes[marker_id].keys():
- print(f'\t{aoi}')
+ print(f'\t{aoi}')
- # Store aoi name once
- if aoi not in all_aois_names:
- all_aois_names.append(aoi)
+ # Store aoi name once
+ if aoi not in all_aois_names:
+ all_aois_names.append(aoi)
def aoi3D_scene_selector(marker_id):
return aoi3D_scenes.get(marker_id, None)
diff --git a/src/argaze/utils/tobii_stream_aruco_aoi_display.py b/src/argaze/utils/tobii_stream_aruco_aoi_display.py
index c5becff..7eb5196 100644
--- a/src/argaze/utils/tobii_stream_aruco_aoi_display.py
+++ b/src/argaze/utils/tobii_stream_aruco_aoi_display.py
@@ -90,17 +90,19 @@ def main():
aoi3D_scenes = {}
aoi2D_visu_scenes = {}
- for marker_id, aoi_scene_filepath in args.marker_id_scene.items():
+ if args.marker_id_scene != None:
- marker_id = int(marker_id)
-
- aoi3D_scenes[marker_id] = AOI3DScene.AOI3DScene()
- aoi3D_scenes[marker_id].load(aoi_scene_filepath)
+ for marker_id, aoi_scene_filepath in args.marker_id_scene.items():
- print(f'AOI in {os.path.basename(aoi_scene_filepath)} scene related to marker #{marker_id}:')
- for aoi in aoi3D_scenes[marker_id].keys():
+ marker_id = int(marker_id)
+
+ aoi3D_scenes[marker_id] = AOI3DScene.AOI3DScene()
+ aoi3D_scenes[marker_id].load(aoi_scene_filepath)
+
+ print(f'AOI in {os.path.basename(aoi_scene_filepath)} scene related to marker #{marker_id}:')
+ for aoi in aoi3D_scenes[marker_id].keys():
- print(f'\t{aoi}')
+ print(f'\t{aoi}')
def aoi3D_scene_selector(marker_id):
return aoi3D_scenes.get(marker_id, None)