mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
use radius to crop for IBO
This commit is contained in:
parent
9597482b1d
commit
a116f7afc7
@ -272,6 +272,7 @@ class EyeProcessor:
|
||||
# self.output_images_and_update(thresh, EyeInformation(InformationOrigin.HSRAC, 0, 0, 0, False))
|
||||
def HSFM(self):
|
||||
# todo: added process to initialise er_hsf when resolution changes
|
||||
|
||||
cx, cy, frame = self.er_hsf.run(self.current_image_gray)
|
||||
self.eyeopen = self.ibo.intense(cx, cy, self.current_image_gray)
|
||||
out_x, out_y = cal_osc(self, cx, cy)
|
||||
|
||||
@ -145,10 +145,10 @@ class IntensityBasedOpeness:
|
||||
self.check(frame.shape)
|
||||
int_x, int_y = int(x), int(y)
|
||||
|
||||
# upper_x = min(int_x + 25, frame.shape[1]) #TODO make this a setting
|
||||
# lower_x = max(int_x - 25, 0)
|
||||
# upper_y = min(int_y + 25, frame.shape[0])
|
||||
# lower_y = max(int_y - 25, 0)
|
||||
upper_x = min(int_x + 25, frame.shape[1]) #TODO make this a setting
|
||||
lower_x = max(int_x - 25, 0)
|
||||
upper_y = min(int_y + 25, frame.shape[0])
|
||||
lower_y = max(int_y - 25, 0)
|
||||
|
||||
# frame_crop = frame[lower_y:upper_y, lower_x:upper_x]
|
||||
frame_crop = frame
|
||||
@ -162,7 +162,8 @@ class IntensityBasedOpeness:
|
||||
changed = False
|
||||
newval_flg = False
|
||||
oob = False
|
||||
if int_x >= frame.shape[1]:
|
||||
|
||||
if int_x >= frame.shape[1]: # TODO: these checks should be able to be removed, cause seems to be fixed.
|
||||
int_x = frame.shape[1] - 1
|
||||
obb = True
|
||||
print('CAUGHT X OUT OF BOUNDS')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user