mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
fix: tighten blink vec (needs testing/re-write, just minor fix)
This commit is contained in:
parent
66292a5a8c
commit
1c2760b382
@ -287,6 +287,7 @@ class EyeProcessor:
|
|||||||
self.rawy,
|
self.rawy,
|
||||||
self.eyeopen,
|
self.eyeopen,
|
||||||
) = self.er_leap.run(self.current_image_gray)
|
) = self.er_leap.run(self.current_image_gray)
|
||||||
|
print(self.eyeopen)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
len(self.prev_y_list) >= 200
|
len(self.prev_y_list) >= 200
|
||||||
@ -299,7 +300,7 @@ class EyeProcessor:
|
|||||||
# print(abs(self.eyeopen - self.past_blink))
|
# print(abs(self.eyeopen - self.past_blink))
|
||||||
blink_vec = min(abs(self.eyeopen - self.past_blink), 1) # clamp to 1
|
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:
|
# 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_x = sum(self.prev_x_list) / len(self.prev_x_list)
|
||||||
self.out_y = sum(self.prev_y_list) / len(self.prev_y_list)
|
self.out_y = sum(self.prev_y_list) / len(self.prev_y_list)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user