diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/ArFeatures.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py index d4d016f..3e381ef 100644 --- a/src/argaze/ArFeatures.py +++ b/src/argaze/ArFeatures.py @@ -465,7 +465,8 @@ class ArFrame(): 'gaze_movement_identifier': None, 'aoi_matcher': None, 'scan_step_analyzers':{}, - 'aoi_scan_step_analyzers': {} + 'aoi_scan_step_analyzers': {}, + 'heatmap': None } # Catch any error @@ -539,7 +540,6 @@ class ArFrame(): scan_step = self.scan_path.append_saccade(timestamp, finished_gaze_movement) - # Is there a new step? if scan_step and len(self.scan_path) > 1: @@ -572,14 +572,26 @@ class ArFrame(): # Update current fixation fixation = current_fixation + # Store aoi matching start date + matching_start = time.time() + # Does the fixation match an aoi? self.__update_looked_aoi_data(fixation) + # Assess aoi matching time in ms + times['aoi_matcher'] = (time.time() - matching_start) * 1e3 + # Update heatmap if self.heatmap: + # Store heatmap start date + heatmap_start = time.time() + self.heatmap.update(self.__gaze_position.value, sigma=0.05) + # Assess heatmap time in ms + times['heatmap'] = (time.time() - heatmap_start) * 1e3 + except Exception as e: print(e) |