aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2024-04-10 14:41:30 +0200
committerThéo de la Hogue2024-04-10 14:41:30 +0200
commitbcfb82055c1736262ce974dc5dd10b365dda8d5c (patch)
tree346e7005a693a980fae01530ec9fb3d68d4a707a
parent1ec6a4d22f941cf640de8e7b1502f92aec884aa2 (diff)
downloadargaze-bcfb82055c1736262ce974dc5dd10b365dda8d5c.zip
argaze-bcfb82055c1736262ce974dc5dd10b365dda8d5c.tar.gz
argaze-bcfb82055c1736262ce974dc5dd10b365dda8d5c.tar.bz2
argaze-bcfb82055c1736262ce974dc5dd10b365dda8d5c.tar.xz
Improving annotations and documentation.
-rw-r--r--docs/index.md2
-rw-r--r--docs/use_cases/simone_a320_cockpit_simulator.md2
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/timestamped_gaze_positions_edition.md2
-rw-r--r--docs/user_guide/gaze_analysis_pipeline/visualisation.md2
-rw-r--r--src/argaze/ArFeatures.py2
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoOpticCalibrator.py8
-rw-r--r--src/argaze/AreaOfInterest/AOI2DScene.py2
-rw-r--r--src/argaze/DataFeatures.py6
-rw-r--r--src/argaze/__init__.py2
9 files changed, 15 insertions, 13 deletions
diff --git a/docs/index.md b/docs/index.md
index e257039..3c398ba 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -2,7 +2,7 @@
title: What is ArGaze?
---
-# Build real time or post-processing eye tracking applications
+# Build real-time or post-processing eye tracking applications
**Useful links**: [Installation](installation.md) | [Source Repository](https://git.recherche.enac.fr/projects/argaze/repository) | [Issue Tracker](https://git.recherche.enac.fr/projects/argaze/issues) | [Contact](mailto:achil-contact@recherche.enac.fr)
diff --git a/docs/use_cases/simone_a320_cockpit_simulator.md b/docs/use_cases/simone_a320_cockpit_simulator.md
index 4a4bc4f..a3f2138 100644
--- a/docs/use_cases/simone_a320_cockpit_simulator.md
+++ b/docs/use_cases/simone_a320_cockpit_simulator.md
@@ -23,6 +23,6 @@ Finally, a python script connect Tobii eyetracker glasses to ArGaze toolkit. The
![AOI and gaze projection](../img/simone_projection.png)
-A demonstration movie to see ArUco detection and AOI projection in real time
+A demonstration movie to see ArUco detection and AOI projection in real-time
![type:video](http://achil.recherche.enac.fr/videos/marker_detection_and_aoi_projection.mp4)
diff --git a/docs/user_guide/gaze_analysis_pipeline/timestamped_gaze_positions_edition.md b/docs/user_guide/gaze_analysis_pipeline/timestamped_gaze_positions_edition.md
index afe4140..9a04bb6 100644
--- a/docs/user_guide/gaze_analysis_pipeline/timestamped_gaze_positions_edition.md
+++ b/docs/user_guide/gaze_analysis_pipeline/timestamped_gaze_positions_edition.md
@@ -28,7 +28,7 @@ for timestamped_gaze_position in ts_gaze_positions:
## Edit timestamped gaze positions from live stream
-When gaze positions comes from a real time input, gaze position can be edited thanks to [GazePosition](../../argaze.md/#argaze.GazeFeatures.GazePosition) class.
+When gaze positions comes from a real-time input, gaze position can be edited thanks to [GazePosition](../../argaze.md/#argaze.GazeFeatures.GazePosition) class.
Besides, timestamps can be edited from the incoming data stream or, if not available, they can be edited thanks to the python [time package](https://docs.python.org/3/library/time.html).
``` python
diff --git a/docs/user_guide/gaze_analysis_pipeline/visualisation.md b/docs/user_guide/gaze_analysis_pipeline/visualisation.md
index a197f0c..b139f9b 100644
--- a/docs/user_guide/gaze_analysis_pipeline/visualisation.md
+++ b/docs/user_guide/gaze_analysis_pipeline/visualisation.md
@@ -1,7 +1,7 @@
Visualize pipeline steps
========================
-Visualisation is not a pipeline step but each [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) pipeline steps outputs can be drawn in real time or afterward, depending of application purpose.
+Visualisation is not a pipeline step but each [ArFrame](../../argaze.md/#argaze.ArFeatures.ArFrame) pipeline steps outputs can be drawn in real-time or afterward, depending of application purpose.
![ArFrame visualisation](../../img/visualisation.png)
diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py
index 32d1542..56b6158 100644
--- a/src/argaze/ArFeatures.py
+++ b/src/argaze/ArFeatures.py
@@ -386,7 +386,7 @@ class ArLayer(DataFeatures.SharedObject, DataFeatures.PipelineStepObject):
Parameters:
image: image where to draw.
- draw_aoi_scene: [AOI2DScene.draw][argaze.AreaOfInterest.AOI2DScene.draw] parameters (if None, no aoi scene is drawn)
+ draw_aoi_scene: [AOI2DScene.draw][argaze.AreaOfInterest.AOI2DScene.AOI2DScene.draw] parameters (if None, no aoi scene is drawn)
draw_aoi_matching: [AOIMatcher.draw][argaze.GazeFeatures.AOIMatcher.draw] parameters (which depends on the loaded aoi matcher module,
if None, no aoi matching is drawn)
"""
diff --git a/src/argaze/ArUcoMarkers/ArUcoOpticCalibrator.py b/src/argaze/ArUcoMarkers/ArUcoOpticCalibrator.py
index 459a03e..b90baef 100644
--- a/src/argaze/ArUcoMarkers/ArUcoOpticCalibrator.py
+++ b/src/argaze/ArUcoMarkers/ArUcoOpticCalibrator.py
@@ -19,6 +19,7 @@ __license__ = "GPLv3"
from dataclasses import dataclass, field
from argaze import DataFeatures
+from argaze.ArUcoMarkers import ArUcoBoard
import json
import numpy
@@ -113,17 +114,18 @@ class OpticParameters():
class ArUcoOpticCalibrator():
"""Handle optic calibration process."""
- def __init__(self, ):
+ def __init__(self):
+
# Calibration data
self.__corners_set_number = 0
self.__corners_set = []
self.__corners_set_ids = []
- def calibrate(self, board, dimensions=None) -> OpticParameters:
+ def calibrate(self, board: ArUcoMarkers.ArUcoBoard, dimensions: list = None) -> OpticParameters:
"""Retrieve K and D parameters from stored calibration data.
Parameters:
- board:
+ board: [ArUcoMarkers.ArUcoBoard](argaze.md/#argaze.ArUcoMarkers.ArUcoBoard) instance
dimensions: camera image dimensions
Returns:
diff --git a/src/argaze/AreaOfInterest/AOI2DScene.py b/src/argaze/AreaOfInterest/AOI2DScene.py
index 0affe35..0b71d7e 100644
--- a/src/argaze/AreaOfInterest/AOI2DScene.py
+++ b/src/argaze/AreaOfInterest/AOI2DScene.py
@@ -107,7 +107,7 @@ class AOI2DScene(AOIFeatures.AOIScene):
return AOI2DScene(new_areas)
- def draw(self, image: numpy.array, draw_aoi: dict = None, exclude=None):
+ def draw(self, image: numpy.array, draw_aoi: dict = None, exclude: list = None):
"""Draw AOI polygons on image.
Parameters:
diff --git a/src/argaze/DataFeatures.py b/src/argaze/DataFeatures.py
index 8ffc9d7..c89fdea 100644
--- a/src/argaze/DataFeatures.py
+++ b/src/argaze/DataFeatures.py
@@ -117,7 +117,7 @@ def from_json(filepath: str) -> any:
The directory where configuration file is will be the global working directory.
Parameters:
- configuration_filepath: path to json configuration file
+ filepath: path to json configuration file
"""
logging.debug('DataFeatures.from_json')
@@ -219,11 +219,11 @@ def from_dict(expected_value_type: type, data: dict) -> any:
return expected_value_type(**data)
-def as_dict(obj, filter: bool = True) -> dict:
+def as_dict(obj: any, filter: bool = True) -> dict:
"""Export object as dictionary.
Parameters:
- obj:
+ obj: object to export as dictionary
filter: remove None attribute values.
"""
_dict = {}
diff --git a/src/argaze/__init__.py b/src/argaze/__init__.py
index c492882..7224a85 100644
--- a/src/argaze/__init__.py
+++ b/src/argaze/__init__.py
@@ -12,7 +12,7 @@ def load(filepath: str) -> any:
The directory where configuration file is will be the global working directory.
Parameters:
- configuration_filepath: path to json configuration file
+ filepath: path to json configuration file
"""
from argaze import DataFeatures