aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorThéo de la Hogue2024-04-03 15:45:01 +0200
committerThéo de la Hogue2024-04-03 15:45:01 +0200
commitc877940289e22f9cce5e4e6ba9eaed7a05314ade (patch)
tree295ae60a7f4fdb2f8bfc12eafca8c6c503fc55e0 /docs
parent9729d633983a1f013cb5675e172e4a329ec8815e (diff)
downloadargaze-c877940289e22f9cce5e4e6ba9eaed7a05314ade.zip
argaze-c877940289e22f9cce5e4e6ba9eaed7a05314ade.tar.gz
argaze-c877940289e22f9cce5e4e6ba9eaed7a05314ade.tar.bz2
argaze-c877940289e22f9cce5e4e6ba9eaed7a05314ade.tar.xz
Renaming logging doc file into recording. Updating examples.
Diffstat (limited to 'docs')
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/recording.md (renamed from docs/user_guide/gaze_analysis_pipeline/logging.md)16
1 files changed, 10 insertions, 6 deletions
diff --git a/docs/user_guide/gaze_analysis_pipeline/logging.md b/docs/user_guide/gaze_analysis_pipeline/recording.md
index 6ef3a85..72aee58 100644
--- a/docs/user_guide/gaze_analysis_pipeline/logging.md
+++ b/docs/user_guide/gaze_analysis_pipeline/recording.md
@@ -5,7 +5,7 @@ Record gaze analysis
## Export gaze analysis to CSV file
-[ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) and [ArLayer](../../argaze.md/#argaze.ArFeatures.ArLayer) have an *observers* attribute to enable pipeline execution recording.
+[ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) and [ArLayer](../../argaze.md/#argaze.ArFeatures.ArLayer) have an **observers** attribute to enable pipeline execution recording.
Here is an extract from the JSON ArFrame configuration file where recording is enabled for the [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) and for one [ArLayer](../../argaze.md/#argaze.ArFeatures.ArLayer) by loaded classes from Python files:
@@ -117,7 +117,7 @@ Assuming that [ArGaze.GazeAnalysis.NGram](../../argaze.md/#argaze.GazeAnalysis.N
As explained in [pipeline steps visualisation chapter](visualisation.md), it is possible to get [ArFrame.image](../../argaze.md/#argaze.ArFeatures.ArFrame.image) once timestamped gaze positions have been processed by [ArFrame.look](../../argaze.md/#argaze.ArFeatures.ArFrame.look) method.
-Here is the JSON ArFrame configuration file where [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) observers are extended with a new my_frame_logger.VideoRecorder instance:
+Here is the JSON ArFrame configuration file where [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) observers are extended with a new my_recorders.VideoRecorder instance:
```json
{
@@ -125,7 +125,7 @@ Here is the JSON ArFrame configuration file where [ArFrame](../../argaze.md/#arg
"size": [1920, 1080],
"observers": {
...
- "my_frame_logger.VideoRecorder": {
+ "my_recorders.FrameImageRecorder": {
"path": "./video.mp4",
"width": 1920,
"height": 1080,
@@ -135,18 +135,22 @@ Here is the JSON ArFrame configuration file where [ArFrame](../../argaze.md/#arg
}
```
-Here is *my_frame_logger.py* file extended with a new VideoRecorder class:
+Here is *my_recorders.py* file extended with a new VideoRecorder class:
```python
...
-class VideoRecorder(DataFeatures.PipelineStepObserver, UtilsFeatures.VideoWriter):
+class FrameImageRecorder(UtilsFeatures.VideoWriter):
+
+ def __init__(self, **kwargs):
+
+ # Init VideoWriter
+ super().__init__(**kwargs)
def on_look(self, timestamp, ar_frame, exception):
"""Record frame image into video file."""
self.write(ar_frame.image())
-
```
Assuming that [ArFrame.image_parameters](../../argaze.md/#argaze.ArFeatures.ArFrame.image_parameters) are provided, ***video.mp4*** file would be created. \ No newline at end of file