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
|
File
======
ArGaze provides a ready-made contexts to read data from various file format.
To select a desired context, the JSON samples have to be edited and saved inside an [ArContext configuration](../configuration_and_execution.md) file.
Notice that the *pipeline* entry is mandatory.
```json
{
JSON sample
"pipeline": ...
}
```
Read more about [ArContext base class in code reference](../../../argaze.md/#argaze.ArFeatures.ArContext).
## CSV
::: argaze.utils.contexts.File.CSV
### 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_splitted.csv",
"timestamp_column": "Timestamp (ms)",
"x_column": "Gaze Position X (px)",
"y_column": "Gaze Position Y (px)",
"pipeline": ...
}
}
```
### 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": ...
}
}
```
|