aboutsummaryrefslogtreecommitdiff
path: root/src/argaze/utils/README.md
blob: fd1c3322356b25a19988cf99fc46d458caae9811 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
Collection of command-line high level features based on ArGaze toolkit.

## Ready-to-use commands

.. note::
   *Consider that all inline commands below needs to be executed into ArGaze root folder.*

.. note::
   *Use -h option to get command arguments documentation.*

### ArUco factory

- Export all markers from DICT_APRILTAG_16h5 dictionary at 300 dpi into an export/markers folder:

```
python ./src/argaze/utils/aruco_markers_export.py -o export/markers -d DICT_APRILTAG_16h5
```

- Export a 7 columns and 5 rows calibration board made of 5cm squares with 3cm markers from DICT_APRILTAG_16h5 dictionary at 50 dpi into an export folder:

```
python ./src/argaze/utils/aruco_calibration_board_export.py 7 5 5 3 -o export -d DICT_APRILTAG_16h5
```

### Tobii calibration

- Calibrate Tobii Glasses Pro 2 camera (-t IP_ADDRESS) using a 7 columns and 5 rows calibration board made of 5cm squares with 3cm markers from DICT_APRILTAG_16h5 dictionary. Then, export its optical parameters into an tobii_camera.json file:

```
python ./src/argaze/utils/tobii_camera_calibrate.py 7 5 5 3 -t IP_ADDRESS -d DICT_APRILTAG_16h5 -o export/tobii_camera.json
```

- Calibrate Tobii Glasses Pro 2 inertial measure unit (-t IP_ADDRESS) then, export calibration parameters into an imu.json file:

```
python ./src/argaze/utils/tobii_imu_calibrate.py -t IP_ADDRESS -o export/imu.json
```

### Tobii session

- Display Tobii Glasses Pro 2 camera video stream (-t IP_ADDRESS) with a live gaze pointer. Loading calibration file to display inertial sensors data:

```
python ./src/argaze/utils/tobii_stream_display.py -t IP_ADDRESS -i export/imu.json
```

- Record a Tobii Glasses Pro 2 'myProject' session for a 'myUser' participant on Tobii interface's SD card (-t IP_ADDRESS):

```
python ./src/argaze/utils/tobii_segment_record.py -t IP_ADDRESS -p myProject -u myUser
```

### Tobii drive

- Explore Tobii Glasses Pro 2 interface's SD Card (-d DRIVE_PATH, -p PROJECT_PATH, -r RECORDING_PATH, -s SEGMENT_PATH):

```
python ./src/argaze/utils/tobii_sdcard_explore.py -d DRIVE_PATH
```

```
python ./src/argaze/utils/tobii_sdcard_explore.py -p PROJECT_PATH
```

```
python ./src/argaze/utils/tobii_sdcard_explore.py -r RECORDING_PATH
```

```
python ./src/argaze/utils/tobii_sdcard_explore.py -s SEGMENT_PATH
```

### Tobii post-processing

- Replay a time range selection (-r IN OUT) Tobii Glasses Pro 2 session (-s SEGMENT_PATH) synchronizing video and some data together:

```
python ./src/argaze/utils/tobii_segment_display.py -s SEGMENT_PATH -r IN OUT
```

- Export Tobii segment fixations and saccades (-s SEGMENT_PATH) from a time range selection (-r IN OUT) as fixations.csv and saccades.csv files saved into the segment folder:

```
python ./src/argaze/utils/tobii_segment_gaze_movements_export.py -s SEGMENT_PATH -r IN OUT
```

### Tobii with ArUco

- Track ArUco markers into Tobii camera video stream (-t IP_ADDRESS). Load aoi scene .obj file related to each marker (-mi MARKER_ID, PATH_TO_AOI_SCENE), position each scene virtually relatively to its detected ArUco markers then project the scene into camera frame:

```
python ./src/argaze/utils/tobii_stream_aruco_aoi_display.py -t IP_ADDRESS -c export/tobii_camera.json -ms 5 -mi '{"MARKER_ID":"PATH_TO_AOI_SCENE.obj",...}'
```

- Track ArUco markers into a Tobii camera video segment (-s SEGMENT_PATH) into a time range selection (-r IN OUT). Load aoi scene .obj file related to each marker (-mi MARKER_ID, PATH_TO_AOI_SCENE), position each scene virtually relatively to its detected ArUco markers then project the scene into camera frame. Export aoi video and data as a aruco_aoi.csv, aruco_aoi.mp4 files:
```
python ./src/argaze/utils/tobii_segment_aruco_aoi_export.py -s SEGMENT_PATH -c export/tobii_camera.json -r IN OUT -ms 5 -mi '{"MARKER_ID":"PATH_TO_AOI_SCENE.obj",...}'
```