aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2022-11-23 10:56:29 +0100
committerThéo de la Hogue2022-11-23 10:56:29 +0100
commit6154711cb7dd1ab408af95d61988c5e242d8c713 (patch)
tree832551a33471a3ad3fddc6ffdae7d7f1ad47ca2a
parent41fe51942dac48cb23c6c946ee1d53b90562051f (diff)
downloadargaze-6154711cb7dd1ab408af95d61988c5e242d8c713.zip
argaze-6154711cb7dd1ab408af95d61988c5e242d8c713.tar.gz
argaze-6154711cb7dd1ab408af95d61988c5e242d8c713.tar.bz2
argaze-6154711cb7dd1ab408af95d61988c5e242d8c713.tar.xz
Allowing to launch aruco detection without aoi scene.
-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)