aboutsummaryrefslogtreecommitdiff
path: root/src/argaze/GazeFeatures.py
diff options
context:
space:
mode:
authorThéo de la Hogue2023-10-17 15:58:55 +0200
committerThéo de la Hogue2023-10-17 15:58:55 +0200
commit322fa8af22f8880d58506fc18f4205ac4d3f937a (patch)
tree99087d4652fe28d89e8deb4d8d0fe2c4520ca6b0 /src/argaze/GazeFeatures.py
parent1d46c5816ba603105dfaa1b5a79f3a167fdc99d8 (diff)
downloadargaze-322fa8af22f8880d58506fc18f4205ac4d3f937a.zip
argaze-322fa8af22f8880d58506fc18f4205ac4d3f937a.tar.gz
argaze-322fa8af22f8880d58506fc18f4205ac4d3f937a.tar.bz2
argaze-322fa8af22f8880d58506fc18f4205ac4d3f937a.tar.xz
adding gaze_position_calibrator to ArFrame.
Diffstat (limited to 'src/argaze/GazeFeatures.py')
-rw-r--r--src/argaze/GazeFeatures.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/argaze/GazeFeatures.py b/src/argaze/GazeFeatures.py
index b918256..eddd01d 100644
--- a/src/argaze/GazeFeatures.py
+++ b/src/argaze/GazeFeatures.py
@@ -201,6 +201,13 @@ class TimeStampedGazePositions(DataStructures.TimeStampedBuffer):
return TimeStampedGazePositions(df.to_dict('index'))
+class GazePositionCalibrationFailed(Exception):
+ """Exception raised by GazePositionCalibrator."""
+
+ def __init__(self, message):
+
+ super().__init__(message)
+
@dataclass
class GazePositionCalibrator():
"""Abstract class to define what should provide a gaze position calibrator algorithm."""
@@ -237,10 +244,10 @@ class GazePositionCalibrator():
observed_gaze_position: where gaze position actually is
Returns:
- expected_gaze_position: where gaze position should be
+ expected_gaze_position: where gaze position should be if the calibrator is ready else, observed gaze position
"""
- raise NotImplementedError('process() method not implemented')
+ raise NotImplementedError('apply() method not implemented')
def draw(self, image: numpy.array):
"""Draw calibration into image.
@@ -252,8 +259,8 @@ class GazePositionCalibrator():
raise NotImplementedError('draw() method not implemented')
@property
- def ready(self) -> bool:
- """Is the calibrator ready?"""
+ def calibrating(self) -> bool:
+ """Is the calibration running?"""
raise NotImplementedError('ready getter not implemented')
@@ -601,7 +608,7 @@ ScanStepType = TypeVar('ScanStep', bound="ScanStep")
# Type definition for type annotation convenience
class ScanStepError(Exception):
- """Exception raised at ScanStepError creation if a aoi scan step doesn't start by a fixation or doesn't end by a saccade."""
+ """Exception raised at ScanStep creation if a aoi scan step doesn't start by a fixation or doesn't end by a saccade."""
def __init__(self, message):
@@ -811,7 +818,7 @@ AOIScanStepType = TypeVar('AOIScanStep', bound="AOIScanStep")
# Type definition for type annotation convenience
class AOIScanStepError(Exception):
- """Exception raised at AOIScanStepError creation if a aoi scan step doesn't start by a fixation or doesn't end by a saccade."""
+ """Exception raised at AOIScanStep creation if a aoi scan step doesn't start by a fixation or doesn't end by a saccade."""
def __init__(self, message, aoi=''):