aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/ArFeatures.py8
-rw-r--r--src/argaze/GazeAnalysis/DeviationCircleCoverage.py2
-rw-r--r--src/argaze/GazeAnalysis/FocusPointInside.py2
3 files changed, 8 insertions, 4 deletions
diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py
index 6553697..252870e 100644
--- a/src/argaze/ArFeatures.py
+++ b/src/argaze/ArFeatures.py
@@ -393,7 +393,7 @@ class ArLayer():
self.__gaze_movement = gaze_movement
# Init looked aoi
- looked_aoi = None
+ looked_aoi_name, looked_aoi = (None, None)
# Init aoi scan path analysis report
aoi_scan_path_analysis = {}
@@ -419,7 +419,7 @@ class ArLayer():
# Update looked aoi thanks to aoi matcher
# Note: don't filter finished/unfinished fixation/saccade as we don't know how the aoi matcher works internally
- looked_aoi = self.aoi_matcher.match(self.aoi_scene, gaze_movement, exclude=[self.name])
+ looked_aoi_name, looked_aoi = self.aoi_matcher.match(self.aoi_scene, gaze_movement, exclude=[self.name])
# Assess aoi matching time in ms
execution_times['aoi_matcher'] = (time.perf_counter() - matching_start) * 1e3
@@ -430,9 +430,9 @@ class ArLayer():
if GazeFeatures.is_fixation(gaze_movement):
# Append fixation to aoi scan path
- if self.aoi_scan_path is not None and looked_aoi is not None:
+ if self.aoi_scan_path is not None and looked_aoi_name is not None:
- aoi_scan_step = self.aoi_scan_path.append_fixation(timestamp, gaze_movement, looked_aoi)
+ aoi_scan_step = self.aoi_scan_path.append_fixation(timestamp, gaze_movement, looked_aoi_name)
# Is there a new step?
if aoi_scan_step is not None and len(self.aoi_scan_path) > 1:
diff --git a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py
index e1b33f1..99453d6 100644
--- a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py
+++ b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py
@@ -96,6 +96,8 @@ class AOIMatcher(GazeFeatures.AOIMatcher):
self.__post_init__()
+ return self.__looked_aoi_data
+
def draw(self, image: numpy.array, draw_matched_fixation: dict = None, draw_matched_fixation_positions: dict = None, draw_matched_region: dict = None, draw_looked_aoi: dict = None, looked_aoi_name_color: tuple = None, looked_aoi_name_offset: tuple = (0, 0)):
"""Draw matching into image.
diff --git a/src/argaze/GazeAnalysis/FocusPointInside.py b/src/argaze/GazeAnalysis/FocusPointInside.py
index c071f82..57c9467 100644
--- a/src/argaze/GazeAnalysis/FocusPointInside.py
+++ b/src/argaze/GazeAnalysis/FocusPointInside.py
@@ -52,6 +52,8 @@ class AOIMatcher(GazeFeatures.AOIMatcher):
self.__post_init__()
+ return self.__looked_aoi_data
+
def draw(self, image: numpy.array, draw_matched_fixation: dict = None, draw_matched_fixation_positions: dict = None, draw_looked_aoi: dict = None, looked_aoi_name_color: tuple = None, looked_aoi_name_offset: tuple = (0, 0)):
"""Draw matching into image.