aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/ArFeatures.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/argaze/ArFeatures.py b/src/argaze/ArFeatures.py
index 2e278ea..13b952d 100644
--- a/src/argaze/ArFeatures.py
+++ b/src/argaze/ArFeatures.py
@@ -993,13 +993,14 @@ class ArFrame():
# Return look data
return self.__gaze_position, identified_gaze_movement, scan_step_analysis, layer_analysis, execution_times, exception
- def __image(self, background_weight: float = None, heatmap_weight: float = None, draw_scan_path: dict = None, draw_layers: dict = None, draw_gaze_positions: dict = None, draw_fixations: dict = None, draw_saccades: dict = None) -> numpy.array:
+ def __image(self, background_weight: float = None, heatmap_weight: float = None, draw_gaze_position_calibrator: dict = None, draw_scan_path: dict = None, draw_layers: dict = None, draw_gaze_positions: dict = None, draw_fixations: dict = None, draw_saccades: dict = None) -> numpy.array:
"""
Get background image with overlaid visualisations.
Parameters:
background_weight: weight of background overlay
heatmap_weight: weight of heatmap overlay
+ draw_gaze_position_calibrator: [GazeFeatures.GazePositionCalibrator.draw](argaze.md/#argaze.GazeFeatures.GazePositionCalibrator.draw) parameters (if None, nothing is drawn)
draw_scan_path: [GazeFeatures.ScanPath.draw](argaze.md/#argaze.GazeFeatures.ScanPath.draw) parameters (if None, no scan path is drawn)
draw_layers: dictionary of [ArLayer.draw](argaze.md/#argaze.ArFeatures.ArLayer.draw) parameters per layer (if None, no layer is drawn)
draw_gaze_positions: [GazeFeatures.GazePosition.draw](argaze.md/#argaze.GazeFeatures.GazePosition.draw) parameters (if None, no gaze position is drawn)
@@ -1032,6 +1033,11 @@ class ArFrame():
image = numpy.full((self.size[1], self.size[0], 3), 0).astype(numpy.uint8)
+ # Draw gaze position calibrator
+ if draw_gaze_position_calibrator is not None:
+
+ self.gaze_position_calibrator.draw(image, size=self.size, **draw_gaze_position_calibrator)
+
# Draw scan path if required
if draw_scan_path is not None and self.scan_path is not None: