aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/argaze/GazeAnalysis/DeviationCircleCoverage.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py
index 22da916..db707c0 100644
--- a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py
+++ b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py
@@ -33,8 +33,8 @@ class AOIMatcher(GazeFeatures.AOIMatcher):
self.__look_count = 0
self.__looked_aoi_data = (None, None)
- self.__looked_aoi_coverage_mean = 0
- self.__looked_aoi_coverage = {}
+ self.__circle_ratio_sum = {}
+ self.__aois_coverages = {}
self.__matched_gaze_movement = None
self.__matched_region = None
@@ -59,16 +59,16 @@ class AOIMatcher(GazeFeatures.AOIMatcher):
# Sum circle ratio to update aoi coverage
try:
- self.__looked_aoi_coverage[name] += circle_ratio
+ self.__circle_ratio_sum[name] += circle_ratio
except KeyError:
- self.__looked_aoi_coverage[name] = circle_ratio
+ self.__circle_ratio_sum[name] = circle_ratio
# Update maximal coverage and most likely looked aoi
- if self.__looked_aoi_coverage[name] > max_coverage:
+ if self.__circle_ratio_sum[name] > max_coverage:
- max_coverage = self.__looked_aoi_coverage[name]
+ max_coverage = self.__circle_ratio_sum[name]
most_likely_looked_aoi_data = (name, aoi)
matched_region = region
@@ -78,12 +78,12 @@ class AOIMatcher(GazeFeatures.AOIMatcher):
# Update looked aoi data
self.__looked_aoi_data = most_likely_looked_aoi_data
- # Update all looked aoi coverage means
+ # Calculate looked aoi circle ratio means
self.__aois_coverages = {}
- for aoi_name, coverage in self.__looked_aoi_coverage.items():
+ for aoi_name, circle_ratio_sum in self.__circle_ratio_sum.items():
- self.__aois_coverages[aoi_name] = int(100 * coverage / self.__look_count) / 100
+ self.__aois_coverages[aoi_name] = int(100 * circle_ratio_sum / self.__look_count) / 100
# Update matched gaze movement
self.__matched_gaze_movement = gaze_movement