mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
fix visualzation and tune blob fallback
This commit is contained in:
parent
d0edbba3fd
commit
6dd14474fb
@ -311,6 +311,12 @@ class CameraWidget:
|
||||
and not eye_info.blink
|
||||
):
|
||||
graph.update(background_color="white")
|
||||
|
||||
if eye_info.y < 0: # flip visualzation to be correct
|
||||
eye_info.y = abs(eye_info.y)
|
||||
elif eye_info.y >= 0:
|
||||
eye_info.y = -abs(eye_info.y)
|
||||
|
||||
graph.draw_circle(
|
||||
(eye_info.x * -100, eye_info.y * -100),
|
||||
25,
|
||||
|
||||
@ -258,7 +258,7 @@ class EyeProcessor:
|
||||
# something to do blob tracking on.
|
||||
_, larger_threshold = cv2.threshold(
|
||||
self.current_image_gray,
|
||||
int(self.config.threshold + 15),
|
||||
int(self.config.threshold + 20),
|
||||
255,
|
||||
cv2.THRESH_BINARY,
|
||||
)
|
||||
@ -321,7 +321,7 @@ class EyeProcessor:
|
||||
# if our blob width/height are within suitable (yet arbitrary) boundaries, call that good.
|
||||
#
|
||||
# TODO This should be scaled based on camera resolution.
|
||||
if not 8 <= h <= 30 or not 8 <= w <= 30:
|
||||
if not 6 <= h <= 25 or not 6 <= w <= 25:
|
||||
continue
|
||||
cx = x + int(w / 2)
|
||||
cy = y + int(h / 2)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user