diff --git a/EyeTrackApp/intensity_eye_open.py b/EyeTrackApp/intensity_eye_open.py index a38bb03..3f4e900 100644 --- a/EyeTrackApp/intensity_eye_open.py +++ b/EyeTrackApp/intensity_eye_open.py @@ -162,7 +162,7 @@ class IntensityBasedOpeness: changed = False newval_flg = False oob = False - if int_x >= frame.shape[1]: + if int_x >= frame.shape[0]: int_x = frame.shape[0] - 1 obb = True print('CAUGHT X OUT OF BOUNDS') @@ -171,15 +171,15 @@ class IntensityBasedOpeness: int_x = True print('CAUGHT X UNDER BOUNDS') - if int_x >= frame.shape[1]: - int_x = frame.shape[0] - 1 + if int_y >= frame.shape[1]: + int_y = frame.shape[1] - 1 oob = True - print('CAUGHT X OUT OF BOUNDS') + print('CAUGHT Y OUT OF BOUNDS') - if int_x < 0: - int_x = 1 + if int_y < 0: + int_y = 1 oob = True - print('CAUGHT X UNDER BOUNDS') + print('CAUGHT Y UNDER BOUNDS') if oob != True: data_val = self.data[int_y, int_x]