aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/GazeAnalysis/DeviationCircleCoverage.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py
index b59d2df..f0decfc 100644
--- a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py
+++ b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py
@@ -83,7 +83,10 @@ class AOIMatcher(GazeFeatures.AOIMatcher):
for aoi_name, circle_ratio_sum in self.__circle_ratio_sum.items():
- self.__aois_coverages[aoi_name] = int(100 * circle_ratio_sum / self.__look_count) / 100
+ circle_ratio_mean = circle_ratio_sum / self.__look_count
+
+ # filter circle ration mean greater than 1
+ self.__aois_coverages[aoi_name] = circle_ratio_mean if circle_ratio_mean < 1 else 1
# Update matched gaze movement
self.__matched_gaze_movement = gaze_movement
@@ -100,6 +103,10 @@ class AOIMatcher(GazeFeatures.AOIMatcher):
self.__post_init__()
+ elif not gaze_movement.valid:
+
+ self.__post_init__()
+
return (None, None)
def draw(self, image: numpy.array, aoi_scene: AOIFeatures.AOIScene, draw_matched_fixation: dict = None, draw_matched_fixation_positions: dict = None, draw_matched_region: dict = None, draw_looked_aoi: dict = None, update_looked_aoi: bool = False, looked_aoi_name_color: tuple = None, looked_aoi_name_offset: tuple = (0, 0)):