From bfa147b2929f1545cdd9ecd460a4e3e2bb165595 Mon Sep 17 00:00:00 2001 From: Prohurtz <48768484+RedHawk989@users.noreply.github.com> Date: Fri, 17 Mar 2023 16:40:56 -0500 Subject: [PATCH] small tweaks --- EyeTrackApp/intensity_eye_open.py | 33 ++++++++++++++++--------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/EyeTrackApp/intensity_eye_open.py b/EyeTrackApp/intensity_eye_open.py index 4cd0a11..4c3736c 100644 --- a/EyeTrackApp/intensity_eye_open.py +++ b/EyeTrackApp/intensity_eye_open.py @@ -137,7 +137,7 @@ class IntensityBasedOpeness: self.data[0, -1] = self.maxval self.data[1:4, -1] = self.now_roi cv2.imwrite(self.imgfile, u32_1ch_to_u16_3ch(self.data)) - print("SAVED: {}".format(self.imgfile)) + #print("SAVED: {}".format(self.imgfile)) def change_roi(self, roiinfo: dict): self.now_roi[:] = [v for v in roiinfo.values()] @@ -161,24 +161,25 @@ class IntensityBasedOpeness: newval_flg = False oob = False - # if int_x >= frame.shape[1]: #TODO: deprecate once wider testing is done - # int_x = frame.shape[1] - 1 - # obb = True - # print('CAUGHT X OUT OF BOUNDS') + if int_x >= frame.shape[1]: + int_x = frame.shape[1] - 1 + oob = True + # print('CAUGHT X OUT OF BOUNDS') - #if int_x < 0: - # int_x = True - # print('CAUGHT X UNDER BOUNDS') + if int_x < 0: + int_x = True + oob = True + # print('CAUGHT X UNDER BOUNDS') - # if int_y >= frame.shape[0]: - # int_y = frame.shape[0] - 1 - # oob = True - # print('CAUGHT Y OUT OF BOUNDS') + if int_y >= frame.shape[0]: + int_y = frame.shape[0] - 1 + oob = True + # print('CAUGHT Y OUT OF BOUNDS') - # if int_y < 0: - # int_y = 1 - # oob = True - # print('CAUGHT Y UNDER BOUNDS') + if int_y < 0: + int_y = 1 + oob = True + # print('CAUGHT Y UNDER BOUNDS') if oob != True: data_val = self.data[int_y, int_x]