diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/GazeAnalysis/DeviationCircleCoverage.py | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py index b1d4c6a..e8c4838 100644 --- a/src/argaze/GazeAnalysis/DeviationCircleCoverage.py +++ b/src/argaze/GazeAnalysis/DeviationCircleCoverage.py @@ -78,8 +78,12 @@ class AOIMatcher(GazeFeatures.AOIMatcher): # Update looked aoi data self.__looked_aoi_data = most_likely_looked_aoi_data - # Update looked aoi coverage mean - self.__looked_aoi_coverage_mean = int(100 * max_coverage / self.__look_count) / 100 + # Update all looked aoi coverage means + self.__aois_coverages = {} + + for aoi_name, coverage in self.__looked_aoi_coverage.items(): + + self.__aois_coverages[aoi_name] = int(100 * coverage / self.__look_count) / 100 # Update matched gaze movement self.__matched_gaze_movement = gaze_movement @@ -88,7 +92,7 @@ class AOIMatcher(GazeFeatures.AOIMatcher): self.__matched_region = matched_region # Return - if self.looked_aoi_coverage_mean > self.coverage_threshold: + if self.__aois_coverages[most_likely_looked_aoi_data[0]] > self.coverage_threshold: return self.__looked_aoi_data @@ -156,14 +160,8 @@ class AOIMatcher(GazeFeatures.AOIMatcher): return self.__looked_aoi_data[0] @property - def looked_aoi_coverage_mean(self) -> float: - """Get looked aoi coverage mean for current fixation. - It represents the ratio of fixation deviation circle surface that used to cover the looked aoi.""" - - return self.__looked_aoi_coverage_mean - - @property - def looked_aoi_coverage(self) -> dict: - """Get all looked aois coverage for current fixation.""" + def aois_coverages(self) -> dict: + """Get all aois coverage means for current fixation. + It represents the ratio of fixation deviation circle surface that used to cover the aoi.""" - return self.__looked_aoi_coverage
\ No newline at end of file + return self.__aois_coverages
\ No newline at end of file |