mirror of
https://github.com/EyeTrackVR/EyeTrackVR.git
synced 2025-11-04 14:39:42 +08:00
fix serial cam, cleaning
This commit is contained in:
parent
57f854ec44
commit
8c668555b8
@ -5,6 +5,9 @@ import queue
|
||||
import cv2
|
||||
import serial
|
||||
import time
|
||||
|
||||
import numpy as np
|
||||
|
||||
WAIT_TIME = 0.1
|
||||
|
||||
|
||||
@ -34,6 +37,12 @@ class Camera:
|
||||
self.cancellation_event = cancellation_event
|
||||
self.current_capture_source = config.capture_source
|
||||
self.wired_camera: "cv2.VideoCapture" = None
|
||||
|
||||
self.serial_connection = None
|
||||
self.frame_number = 0
|
||||
self.start = True
|
||||
self.serialByteBuffer = b''
|
||||
|
||||
self.error_message = "\033[93m[WARN] Capture source {} not found, retrying...\033[0m"
|
||||
|
||||
def set_output_queue(self, camera_output_outgoing: "queue.Queue"):
|
||||
|
||||
@ -443,16 +443,10 @@ class HSRAC_cls(object):
|
||||
|
||||
# crop_start_time = timeit.default_timer()
|
||||
cx, cy, w, h, theta = ransac_data
|
||||
# print(cx, cy)
|
||||
if w >= 2.1 * h: # new blink detection algo lmao this works pretty good actually
|
||||
print("RAN BLINK")
|
||||
# return center_x, center_y, frame, frame, True
|
||||
|
||||
# cx = center_x - (csx - cx) # we find the difference between the crop size and ransac point, and subtract from the center point from HSF
|
||||
# cy = center_y - (csy - cy)
|
||||
# if w >= 2.1 * h: # new blink detection algo lmao this works pretty good actually
|
||||
#print("RAN BLINK")
|
||||
|
||||
# csy = frame.shape[0]
|
||||
# csx = frame.shape[1]
|
||||
csy = gray_frame.shape[0]
|
||||
csx = gray_frame.shape[1]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user