diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/argaze/AreaOfInterest/AOIFeatures.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/argaze/AreaOfInterest/AOIFeatures.py b/src/argaze/AreaOfInterest/AOIFeatures.py index 01bb484..f74920e 100644 --- a/src/argaze/AreaOfInterest/AOIFeatures.py +++ b/src/argaze/AreaOfInterest/AOIFeatures.py @@ -93,6 +93,9 @@ class AreaOfInterest(numpy.ndarray): def looked_region(self, gaze_position, gaze_radius): """Get intersection shape with gaze circle as the looked area, (looked area / AOI area) and (looked area / gaze circle area).""" + if self.dimension() != 2: + raise RuntimeError(f'Bad area dimension ({self.dimension()})') + self_polygon = Polygon(self) gaze_circle = Point(gaze_position).buffer(gaze_radius) |