From 1045f7b1805815c1b631ba5e5d274cec74fe5e3d Mon Sep 17 00:00:00 2001 From: Prohurtz <48768484+RedHawk989@users.noreply.github.com> Date: Sat, 18 Feb 2023 16:27:30 -0600 Subject: [PATCH] correct frame shape --- EyeTrackApp/intensity_eye_open.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EyeTrackApp/intensity_eye_open.py b/EyeTrackApp/intensity_eye_open.py index 3f4e900..8c0a78d 100644 --- a/EyeTrackApp/intensity_eye_open.py +++ b/EyeTrackApp/intensity_eye_open.py @@ -162,8 +162,8 @@ class IntensityBasedOpeness: changed = False newval_flg = False oob = False - if int_x >= frame.shape[0]: - int_x = frame.shape[0] - 1 + if int_x >= frame.shape[1]: + int_x = frame.shape[1] - 1 obb = True print('CAUGHT X OUT OF BOUNDS') @@ -171,8 +171,8 @@ class IntensityBasedOpeness: int_x = True print('CAUGHT X UNDER BOUNDS') - if int_y >= frame.shape[1]: - int_y = frame.shape[1] - 1 + if int_y >= frame.shape[0]: + int_y = frame.shape[0] - 1 oob = True print('CAUGHT Y OUT OF BOUNDS')