aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/AreaOfInterest/AOI2DScene.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/argaze/AreaOfInterest/AOI2DScene.py b/src/argaze/AreaOfInterest/AOI2DScene.py
index d1f7fa0..6930613 100644
--- a/src/argaze/AreaOfInterest/AOI2DScene.py
+++ b/src/argaze/AreaOfInterest/AOI2DScene.py
@@ -58,7 +58,7 @@ class AOI2DScene(AOIFeatures.AOIScene):
# Draw form
aoi.draw(frame, color)
- def circlecast(self, gaze_position: GazeFeatures.GazePosition) -> Tuple[str, "AOIFeatures.AreaOfInterest", numpy.array, float, float]:
+ def circlecast(self, center:tuple, radius:float) -> Tuple[str, "AOIFeatures.AreaOfInterest", numpy.array, float, float]:
"""Iterate over areas to know which aoi is looked considering gaze position value and its precision.
* **Returns:**
- aoi name
@@ -70,14 +70,14 @@ class AOI2DScene(AOIFeatures.AOIScene):
for name, aoi in self.items():
- looked_region, aoi_ratio, gaze_ratio = aoi.circle_intersection(gaze_position.value, gaze_position.precision)
+ looked_region, aoi_ratio, gaze_ratio = aoi.circle_intersection(center, radius)
yield name, aoi, looked_region, aoi_ratio, gaze_ratio
- def draw_circlecast(self, frame, gaze_position: GazeFeatures.GazePosition, exclude=[], base_color=(0, 0, 255), looked_color=(0, 255, 0)):
+ def draw_circlecast(self, frame, center:tuple, radius:float, exclude=[], base_color=(0, 0, 255), looked_color=(0, 255, 0)):
"""Draw AOIs with their looked status and looked region."""
- for name, aoi, looked_region, aoi_ratio, gaze_ratio in self.circlecast(gaze_position):
+ for name, aoi, looked_region, aoi_ratio, gaze_ratio in self.circlecast(center, radius):
if name in exclude:
continue