aboutsummaryrefslogtreecommitdiff
path: root/docs/user_guide/gaze_analysis_pipeline/visualization.md
blob: 32395c32c98eb4fb9631d178c8a6399f4940ad09 (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
Visualize pipeline steps
========================

Visualization is not a pipeline step, but each [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) pipeline step output can be drawn in real-time or afterward, depending on the application purposes.

![ArFrame visualization](../../img/visualization.png)

## Add image parameters to ArFrame JSON configuration

[ArFrame.image](../../argaze.md/#argaze.ArFeatures.ArFrame.image) method parameters can be configured thanks to a dedicated JSON entry.

Here is an extract from the JSON ArFrame configuration file with a sample where image parameters are added:

```json
{
    "argaze.ArFeatures.ArFrame": {
        "name": "My FullHD screen",
        "size": [1920, 1080],
        ...
        "image_parameters": {
            "draw_gaze_positions": {
                "color": [0, 255, 255],
                "size": 2
            },
            "draw_fixations": {
                "deviation_circle_color": [255, 255, 255],
                "duration_border_color": [127, 0, 127],
                "duration_factor": 1e-2,
                "draw_positions": {
                    "position_color": [0, 255, 255],
                    "line_color": [0, 0, 0]
                }
            }, 
            "draw_saccades": {
                "line_color": [255, 0, 255]
            },
            "draw_scan_path": {
                "draw_fixations": {
                    "deviation_circle_color": [255, 0, 255],
                    "duration_border_color": [127, 0, 127],
                    "duration_factor": 1e-2
                }, 
                "draw_saccades": {
                    "line_color": [255, 0, 255]
                }
            },
            "draw_layers": {
                "MyLayer": {
                    "draw_aoi_scene": {
                        "draw_aoi": {
                            "color": [255, 255, 255],
                            "border_size": 1
                        }
                    },
                    "draw_aoi_matching": {
                        "draw_matched_fixation": {
                            "deviation_circle_color": [255, 255, 255],
                            "draw_positions": {
                                "position_color": [0, 255, 0],
                                "line_color": [0, 0, 0]
                            }
                        },
                        "draw_matched_region": {
                            "color": [0, 255, 0],
                            "border_size": 4
                        }, 
                        "draw_looked_aoi": {
                            "color": [0, 255, 0],
                            "border_size": 2
                        },
                        "looked_aoi_name_color": [255, 255, 255],
                        "looked_aoi_name_offset": [0, -10]
                    }
                }
            }
        }
    }
}
```

!!! warning
    Most of *image_parameters* entries work if related ArFrame/ArLayer pipeline steps are enabled.  
    For example, a JSON *draw_scan_path* entry needs GazeMovementIdentifier and ScanPath steps to be enabled.

!!! note "Export to video file"

    Video exportation is detailed in [gaze analysis recording chapter](recording.md).