aboutsummaryrefslogtreecommitdiff
path: root/src/argaze/utils/README.md
blob: ffe2c16a4a12a1ef9da6981c5d1b0f45e37bc567 (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
Collection of command-line high level features based on ArGaze toolkit.

Use -help to get arguments documentation.

## Ready-to-use commands

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

- Ask for command help (replace UTILS_SCRIPT)

```
python ./src/argaze/utils/UTILS_SCRIPT.py -h
```

- Export 50 4x4 markers at 300 dpi into an export/markers folder:

```
python ./src/argaze/utils/export_aruco_markers.py -o export/markers
```

- Export a 7 columns and 5 rows calibration board with 5cm squares and 3cm markers inside at 50 dpi into an export folder:

```
python ./src/argaze/utils/export_calibration_board.py 7 5 5 3 -o export
```

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

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

- Display Tobii Glasses Pro 2 camera video stream (replace IP_ADDRESS) and gaze

```
python ./src/argaze/utils/live_tobii_session.py -t IP_ADDRESS
```

- Record a Tobii Glasses Pro 2 'Test' session for a participant '1' on Tobii interface's SD card (replace IP_ADDRESS).

```
python ./src/argaze/utils/record_tobii_session.py -t IP_ADDRESS -p Test -i 1
```

- Explore Tobii Glasses Pro 2 interface's SD Card (replace DRIVE_PATH, PROJECT_PATH, RECORDING_PATH, SEGMENT_PATH)

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

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

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

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

- Export Tobii segment fixations (replace SEGMENT_PATH) into a fixations.json file into the segment folder

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

- Track any 6cm ArUco marker into calibrated Tobii camera video stream (replace IP_ADDRESS). Load an roi scene (replace ROI_SCENE) .obj file, position it virtually like the detected ArUco markers and project the scene into camera frame. Then, detect if Tobii gaze point is inside any ROI. Export all collected datas into an export folder.

```
python ./src/argaze/utils/track_aruco_rois_with_tobii_glasses.py -t IP_ADDRESS -c export/tobii_camera.json -s ROI_SCENE -o export/data
```