fix: tighten blink vec (needs testing/re-write, just minor fix)

This commit is contained in:
Prohurtz 2023-09-26 23:22:36 -05:00
parent 66292a5a8c
commit 1c2760b382

View File

@ -287,6 +287,7 @@ class EyeProcessor:
self.rawy,
self.eyeopen,
) = self.er_leap.run(self.current_image_gray)
print(self.eyeopen)
if (
len(self.prev_y_list) >= 200
@ -299,7 +300,7 @@ class EyeProcessor:
# print(abs(self.eyeopen - self.past_blink))
blink_vec = min(abs(self.eyeopen - self.past_blink), 1) # clamp to 1
if blink_vec >= 0.1 or blink_vec == 0.0 and (self.out_y - self.prev_y) < 0.0:
if blink_vec >= 0.17:
# if blink_vec >= 0.1 or blink_vec == 0.0 and (self.out_y - self.prev_y) < 0.0:
# self.out_x = sum(self.prev_x_list) / len(self.prev_x_list)
self.out_y = sum(self.prev_y_list) / len(self.prev_y_list)