Test for sending taken photo to nodered

This commit is contained in:
2025-12-31 13:27:47 +01:00
parent 01594d02ed
commit b4330706cd
4 changed files with 17 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
import cv2
import numpy as np
from pathlib import Path
from ultralytics.engine.results import Results
from hardware.camera.camera import Camera
@@ -39,10 +40,10 @@ class DetectionService:
def stop(self):
self.camera.close()
def analyze_single_frame(self) -> str | None:
def analyze_single_frame(self) -> tuple[np.ndarray, str | None]:
frame = self.camera.take_photo()
fen = self.__get_fen(frame)
return fen
return frame, fen
def __run_complete_detection(self, frame : np.ndarray, display=False) -> dict[str, list[Results]] :