diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/ArUcoMarkers/ArUcoDetector.py | 2 | ||||
-rw-r--r-- | src/argaze/AreaOfInterest/AOIFeatures.py | 3 | ||||
-rw-r--r-- | src/argaze/GazeFeatures.py | 21 |
3 files changed, 21 insertions, 5 deletions
diff --git a/src/argaze/ArUcoMarkers/ArUcoDetector.py b/src/argaze/ArUcoMarkers/ArUcoDetector.py index e62a42e..e6a305f 100644 --- a/src/argaze/ArUcoMarkers/ArUcoDetector.py +++ b/src/argaze/ArUcoMarkers/ArUcoDetector.py @@ -18,7 +18,7 @@ from argaze.ArUcoMarkers import ArUcoMarkersDictionary, ArUcoMarker, ArUcoOpticC import numpy import cv2 as cv -import cv2.aruco as aruco +from cv2 import aruco ArUcoMarkerDictionaryType = TypeVar('ArUcoMarkerDictionary', bound="ArUcoMarkerDictionary") # Type definition for type annotation convenience diff --git a/src/argaze/AreaOfInterest/AOIFeatures.py b/src/argaze/AreaOfInterest/AOIFeatures.py index 5637baa..77a92fd 100644 --- a/src/argaze/AreaOfInterest/AOIFeatures.py +++ b/src/argaze/AreaOfInterest/AOIFeatures.py @@ -357,6 +357,7 @@ class AOIScene(): delattr(self, key) def __or__(self, other): + """Merge another scene using | operator.""" assert(other.dimension == self.__dimension) @@ -366,6 +367,7 @@ class AOIScene(): return AOIScene(self.dimension, merged_areas) def __ror__(self, other): + """Merge another scene using | operator.""" assert(other.dimension == self.__dimension) @@ -375,6 +377,7 @@ class AOIScene(): return AOIScene(self.dimension, merged_areas) def __ior__(self, other): + """Merge scene with another scene in-place using |= operator.""" assert(other.dimension == self.__dimension) diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py index a4cf244..12cccbc 100644 --- a/src/argaze/GazeFeatures.py +++ b/src/argaze/GazeFeatures.py @@ -508,9 +508,16 @@ TimeStampedGazeStatusType = TypeVar('TimeStampedGazeStatus', bound="TimeStampedG # Type definition for type annotation convenience class TimeStampedGazeStatus(DataStructures.TimeStampedBuffer): - """Define timestamped buffer to store gaze status.""" + """Define timestamped buffer to store list of gaze statusa. + + !!! note + List of gaze status are required as a gaze position can belongs to two consecutive gaze movements as last and first position. + """ + + def __setitem__(self, key, value: list): + + assert(isinstance(value, list)) - def __setitem__(self, key, value: GazeStatus): super().__setitem__(key, value) class GazeMovementIdentifier(): @@ -550,7 +557,13 @@ class GazeMovementIdentifier(): raise NotImplementedError('current_saccade getter not implemented') def browse(self, ts_gaze_positions: TimeStampedGazePositions) -> Tuple[TimeStampedGazeMovementsType, TimeStampedGazeMovementsType, TimeStampedGazeStatusType]: - """Identify fixations and saccades browsing timestamped gaze positions.""" + """Identify fixations and saccades browsing timestamped gaze positions. + + Returns: + timestamped_fixations: all fixations stored by timestamped. + timestamped_saccades: all saccades stored by timestamped. + timestamped_gaze_status: all gaze status stored by timestamped. + """ assert(type(ts_gaze_positions) == TimeStampedGazePositions) @@ -874,7 +887,7 @@ class AOIScanStepError(Exception): @dataclass(frozen=True) class AOIScanStep(): - """Define a aoi scan step as a set of successive gaze movements onto a same AOI. + """Define an aoi scan step as a set of successive gaze movements onto a same AOI. !!! warning |