fix: re-add try

This commit is contained in:
Prohurtz 2024-07-30 15:40:54 -05:00
parent df29fc0380
commit aa0b0903fc

View File

@ -180,23 +180,23 @@ class EyeProcessor:
self.one_euro_filter = OneEuroFilter(noisy_point, min_cutoff=min_cutoff, beta=beta)
def output_images_and_update(self, threshold_image, output_information: EyeInfo):
# try:
image_stack = np.concatenate(
(
cv2.cvtColor(self.current_image_gray, cv2.COLOR_GRAY2BGR),
cv2.cvtColor(threshold_image, cv2.COLOR_GRAY2BGR),
),
axis=1,
)
self.image_queue_outgoing.put((image_stack, output_information))
if self.image_queue_outgoing.qsize() > 3:
self.image_queue_outgoing.get()
try:
image_stack = np.concatenate(
(
cv2.cvtColor(self.current_image_gray, cv2.COLOR_GRAY2BGR),
cv2.cvtColor(threshold_image, cv2.COLOR_GRAY2BGR),
),
axis=1,
)
self.image_queue_outgoing.put((image_stack, output_information))
if self.image_queue_outgoing.qsize() > 3:
self.image_queue_outgoing.get()
self.previous_image = self.current_image
self.previous_rotation = self.config.rotation_angle
self.previous_image = self.current_image
self.previous_rotation = self.config.rotation_angle
# except: # If this fails it likely means that the images are not the same size for some reason.
# print("\033[91m[ERROR] Size of frames to display are of unequal sizes.\033[0m")
except: # If this fails it likely means that the images are not the same size for some reason.
print("\033[91m[ERROR] Size of frames to display are of unequal sizes.\033[0m")
def capture_crop_rotate_image(self):
# Get our current frame