aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéo de la Hogue2022-05-09 15:45:19 +0200
committerThéo de la Hogue2022-05-09 15:45:19 +0200
commitbe4912151f0d77365901900c92475fbfb64726da (patch)
tree5cb2a975670c6bc13cc03a8b3474ea885a3f58d2 /src
parent50599050d17d96607c232e6c57c2256aef01d16c (diff)
downloadargaze-be4912151f0d77365901900c92475fbfb64726da.zip
argaze-be4912151f0d77365901900c92475fbfb64726da.tar.gz
argaze-be4912151f0d77365901900c92475fbfb64726da.tar.bz2
argaze-be4912151f0d77365901900c92475fbfb64726da.tar.xz
Updating utils script documentation.
Diffstat (limited to 'src')
-rw-r--r--src/argaze/utils/README.md11
-rw-r--r--src/argaze/utils/live_tobii_aruco_aoi_ivy_application.py2
-rw-r--r--src/argaze/utils/live_tobii_aruco_aoi_ivy_controller.py14
3 files changed, 13 insertions, 14 deletions
diff --git a/src/argaze/utils/README.md b/src/argaze/utils/README.md
index cd7b0bc..2c4f5e7 100644
--- a/src/argaze/utils/README.md
+++ b/src/argaze/utils/README.md
@@ -78,8 +78,15 @@ python ./src/argaze/utils/export_tobii_segment_movements.py -s SEGMENT_PATH -r I
python ./src/argaze/utils/export_tobii_segment_aruco_visual_scan.py -s SEGMENT_PATH -c export/tobii_camera.json -m 7.5 -a AOI_SCENE -r IN OUT -i MARKERS_ID
```
-- Track ArUco markers (-i MARKERS_ID) into Tobii camera video stream (-t IP_ADDRESS). Load an aoi scene (-a AOI_SCENE) .obj file, position it virtually relatively to any detected ArUco markers and project the scene into camera frame. Then, detect if Tobii gaze point is inside any AOI:
+- Track ArUco marker (-i MARKER_ID) into Tobii camera video stream (-t IP_ADDRESS). Load an aoi scene (-a AOI_SCENE) .obj file, position it virtually relatively to any detected ArUco markers and project the scene into camera frame. Then, detect if Tobii gaze point is inside any AOI and send the look at pointer over Ivy default bus:
```
-python ./src/argaze/utils/live_tobii_aruco_aois.py -t IP_ADDRESS -c export/tobii_camera.json -m 7.5 -a AOI_SCENE -i MARKERS_ID
+python ./src/argaze/utils/live_tobii_aruco_aoi_ivy_controller.py -t IP_ADDRESS -c export/tobii_camera.json -m 6 -a AOI_SCENE -i MARKER_ID
```
+
+- Define AOI scene from a ArUco marker (-a AOI_SCENE) and bind to Ivy default bus to receive live look at pointer data.:
+
+```
+python ./src/argaze/utils/live_tobii_aruco_aoi_ivy_application.py.py -a AOI_SCENE -i MARKERS_ID
+```
+
diff --git a/src/argaze/utils/live_tobii_aruco_aoi_ivy_application.py b/src/argaze/utils/live_tobii_aruco_aoi_ivy_application.py
index 5737bbc..3b3b8e0 100644
--- a/src/argaze/utils/live_tobii_aruco_aoi_ivy_application.py
+++ b/src/argaze/utils/live_tobii_aruco_aoi_ivy_application.py
@@ -14,7 +14,7 @@ from ivy.std_api import *
def main():
"""
- Define screen as an ArUco AOI scene scene and bind to Ivy default bus to receive live look at pointer data.
+ Define AOI scene from a ArUco marker and bind to Ivy default bus to receive live look at pointer data.
"""
# Manage arguments
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 3129fa4..aa4365d 100644
--- a/src/argaze/utils/live_tobii_aruco_aoi_ivy_controller.py
+++ b/src/argaze/utils/live_tobii_aruco_aoi_ivy_controller.py
@@ -29,14 +29,10 @@ def main():
parser.add_argument('-a', '--aoi_scene', metavar='AOI_SCENE', type=str, default='aoi3D_scene.obj', help='obj aoi scene filepath')
parser.add_argument('-d', '--dictionary', metavar='DICT', type=str, default='DICT_ARUCO_ORIGINAL', help='aruco marker dictionnary (DICT_4X4_50, DICT_4X4_100, DICT_4X4_250, DICT_4X4_1000, DICT_5X5_50, DICT_5X5_100, DICT_5X5_250, DICT_5X5_1000, DICT_6X6_50, DICT_6X6_100, DICT_6X6_250, DICT_6X6_1000, DICT_7X7_50, DICT_7X7_100, DICT_7X7_250, DICT_7X7_1000, DICT_ARUCO_ORIGINAL,DICT_APRILTAG_16h5, DICT_APRILTAG_25h9, DICT_APRILTAG_36h10, DICT_APRILTAG_36h11)')
parser.add_argument('-m', '--marker_size', metavar='MKR', type=float, default=6, help='aruco marker size (cm)')
- parser.add_argument('-i', '--markers_id', metavar='MARKERS_ID', nargs='*', type=int, default=[], help='markers id to track')
+ parser.add_argument('-i', '--marker_id', metavar='MARKER_ID', type=int, default=0, help='marker id to track')
args = parser.parse_args()
- empty_marker_set = len(args.markers_id) == 0
- if empty_marker_set:
- print(f'Track any Aruco markers from the {args.dictionary} dictionary')
- else:
- print(f'Track Aruco markers {args.markers_id} from the {args.dictionary} dictionary')
+ print(f'Track Aruco markers {args.marker_id} from the {args.dictionary} dictionary')
# Enable Ivy bus
IvyInit(os.path.basename(__file__))
@@ -106,11 +102,7 @@ def main():
for (i, marker_id) in enumerate(aruco_tracker.get_markers_ids()):
- # TODO : Select different 3D scenes depending on aruco id
-
- in_marker_set = marker_id in list(args.markers_id)
-
- if not empty_marker_set and not in_marker_set:
+ if marker_id != args.marker_id:
continue
aoi3D_scene.rotation = aruco_tracker.get_marker_rotation(i)