aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/ArFeatures.py7
-rw-r--r--src/argaze/ArUcoMarkers/ArUcoCamera.py2
-rw-r--r--src/argaze/PupillAnalysis/WorkloadIndex.py2
-rw-r--r--src/argaze/PupillFeatures.py4
4 files changed, 9 insertions, 6 deletions
diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py
index abe4ed7..8889155 100644
--- a/src/argaze/ArFeatures.py
+++ b/src/argaze/ArFeatures.py
@@ -1253,24 +1253,27 @@ class ArScene(DataFeatures.PipelineStepObject):
)
@DataFeatures.PipelineStepMethod
- def estimate_pose(self, detected_features: any) -> Tuple[numpy.array, numpy.array]:
+ def estimate_pose(self, timestamp: int|float, detected_features: any) -> Tuple[numpy.array, numpy.array, any]:
"""Define abstract estimate scene pose method.
Parameters:
+ timestamp: method call timestamp (unit does'nt matter)
detected_features: any features detected by parent ArCamera that will help in scene pose estimation.
Returns:
tvec: scene translation vector
rvec: scene rotation matrix
+ extra: any data about pose estimation
"""
raise NotImplementedError('estimate_pose() method not implemented')
@DataFeatures.PipelineStepMethod
- def project(self, tvec: numpy.array, rvec: numpy.array, visual_hfov: float = 0., visual_vfov: float = 0.) -> Iterator[Union[str, AOI2DScene.AOI2DScene]]:
+ def project(self, timestamp: int|float, tvec: numpy.array, rvec: numpy.array, visual_hfov: float = 0., visual_vfov: float = 0.) -> Iterator[Union[str, AOI2DScene.AOI2DScene]]:
"""Project layers according estimated pose and optional field of view clipping angles.
Parameters:
+ timestamp: method call timestamp (unit does'nt matter)
tvec: translation vector
rvec: rotation vector
visual_hfov: horizontal field of view clipping angle
diff --git a/src/argaze/ArUcoMarkers/ArUcoCamera.py b/src/argaze/ArUcoMarkers/ArUcoCamera.py
index f6297a8..99f530f 100644
--- a/src/argaze/ArUcoMarkers/ArUcoCamera.py
+++ b/src/argaze/ArUcoMarkers/ArUcoCamera.py
@@ -173,7 +173,7 @@ class ArUcoCamera(ArFeatures.ArCamera):
tvec, rmat, _ = scene.estimate_pose(timestamp, self.__aruco_detector.detected_markers)
# Project scene into camera frame according estimated pose
- for layer_name, layer_projection in scene.project(tvec, rmat, self.visual_hfov, self.visual_vfov):
+ for layer_name, layer_projection in scene.project(timestamp, tvec, rmat, self.visual_hfov, self.visual_vfov):
try:
diff --git a/src/argaze/PupillAnalysis/WorkloadIndex.py b/src/argaze/PupillAnalysis/WorkloadIndex.py
index f97dce3..38be6ca 100644
--- a/src/argaze/PupillAnalysis/WorkloadIndex.py
+++ b/src/argaze/PupillAnalysis/WorkloadIndex.py
@@ -44,7 +44,7 @@ class PupillDiameterAnalyzer(PupillFeatures.PupillDiameterAnalyzer):
return self.__period
@DataFeatures.PipelineStepMethod
- def analyze(self, pupill_diameter: PupillFeatures.PupillDiameter) -> float:
+ def analyze(self, timestamp: int|float, pupill_diameter: PupillFeatures.PupillDiameter) -> float:
"""Analyze workload index from successive timestamped pupill diameters."""
# Ignore non valid pupill diameter
diff --git a/src/argaze/PupillFeatures.py b/src/argaze/PupillFeatures.py
index 492e7ca..bf3b4a9 100644
--- a/src/argaze/PupillFeatures.py
+++ b/src/argaze/PupillFeatures.py
@@ -53,7 +53,7 @@ class PupillDiameterAnalyzer(DataFeatures.PipelineStepObject):
"""Abstract class to define what should provide a pupill diameter analyser."""
@DataFeatures.PipelineStepMethod
- def analyze(self, pupill_diameter: PupillDiameterType) -> any:
+ def analyze(self, timestamp: int|float, pupill_diameter: PupillDiameterType) -> any:
"""Analyze pupill diameter from successive timestamped pupill diameters."""
raise NotImplementedError('analyze() method not implemented')
@@ -68,7 +68,7 @@ class PupillDiameterAnalyzer(DataFeatures.PipelineStepObject):
# Iterate on pupill diameters
for pupill_diameter in ts_pupill_diameters:
- analysis = self.analyze(pupill_diameter)
+ analysis = self.analyze(pupill_diameter.timestamp, pupill_diameter)
if analysis is not None: