From 49d7beef84526e3498d53bc8bcfe387786d5de88 Mon Sep 17 00:00:00 2001 From: Théo de la Hogue Date: Wed, 4 Sep 2024 18:04:00 +0200 Subject: Improving File CSV context to parse file with left and right eyes data. Documenting the new feature. --- .../eye_tracking_context/context_modules/file.md | 44 +++++++++++++++++++++- docs/user_guide/utils/demonstrations_scripts.md | 13 ++++++- 2 files changed, 53 insertions(+), 4 deletions(-) (limited to 'docs/user_guide') diff --git a/docs/user_guide/eye_tracking_context/context_modules/file.md b/docs/user_guide/eye_tracking_context/context_modules/file.md index 8a66b83..5b5c8e9 100644 --- a/docs/user_guide/eye_tracking_context/context_modules/file.md +++ b/docs/user_guide/eye_tracking_context/context_modules/file.md @@ -19,13 +19,15 @@ Read more about [ArContext base class in code reference](../../../argaze.md/#arg ::: argaze.utils.contexts.File.CSV -### JSON sample +### JSON sample: splitted case + +To use when gaze position coordinates are splitted in two separated columns. ```json { "argaze.utils.contexts.File.CSV": { "name": "CSV file data playback", - "path": "./src/argaze/utils/demo/gaze_positions.csv", + "path": "./src/argaze/utils/demo/gaze_positions_splitted.csv", "timestamp_column": "Timestamp (ms)", "x_column": "Gaze Position X (px)", "y_column": "Gaze Position Y (px)", @@ -33,3 +35,41 @@ Read more about [ArContext base class in code reference](../../../argaze.md/#arg } } ``` + +### JSON sample: joined case + +To use when gaze position coordinates are joined as a list in one single column. + +```json +{ + "argaze.utils.contexts.File.CSV" : { + "name": "CSV file data playback", + "path": "./src/argaze/utils/demo/gaze_positions_xy_joined.csv", + "timestamp_column": "Timestamp (ms)", + "xy_column": "Gaze Position (px)", + "pipeline": ... + } +} +``` + +### JSON sample: left and right eyes + +To use when gaze position coordinates and validity are given for each eye in six separated columns. + +```json +{ + "argaze.utils.contexts.File.CSV": { + "name": "CSV file data playback", + "path": "./src/argaze/utils/demo/gaze_positions_left_right_eyes.csv", + "timestamp_column": "Timestamp (ms)", + "left_eye_x_column": "Left eye X", + "left_eye_y_column": "Left eye Y", + "left_eye_validity_column": "Left eye validity", + "right_eye_x_column": "Right eye X", + "right_eye_y_column": "Right eye Y", + "right_eye_validity_column": "Right eye validity", + "rescale_to_pipeline_size": true, + "pipeline": ... + } +} +``` diff --git a/docs/user_guide/utils/demonstrations_scripts.md b/docs/user_guide/utils/demonstrations_scripts.md index a2698b4..c7560eb 100644 --- a/docs/user_guide/utils/demonstrations_scripts.md +++ b/docs/user_guide/utils/demonstrations_scripts.md @@ -22,18 +22,27 @@ python -m argaze load ./src/argaze/utils/demo/random_context.json ## CSV file context +Load **csv_file_context_xy_joined.json** file to analyze gaze positions from a CSV file where gaze position coordinates are joined as a list in one single column: + +```shell +python -m argaze load ./src/argaze/utils/demo/csv_file_context_xy_joined.json +``` + Load **csv_file_context_xy_splitted.json** file to analyze gaze positions from a CSV file where gaze position coordinates are splitted in two seperated column: ```shell python -m argaze load ./src/argaze/utils/demo/csv_file_context_xy_splitted.json ``` -Load **csv_file_context_xy_list.json** file to analyze gaze positions from a CSV file where gaze position coordinates are stored as a list in one single column: +Load **csv_file_context_left_right_eyes.json** file to analyze gaze positions from a CSV file where gaze position coordinates and validity are given for each eye in six separated columns.: ```shell -python -m argaze load ./src/argaze/utils/demo/csv_file_context_xy_list.json +python -m argaze load ./src/argaze/utils/demo/csv_file_context_left_right_eyes.json ``` +!!! note + The left/right eyes context allows to parse Tobii Spectrum data for example. + ## OpenCV ### Cursor context -- cgit v1.1