upd req + cleanup

This commit is contained in:
moscovskayaliza
2026-06-23 10:21:31 +03:00
parent 991530ff26
commit fa76967f0b
2 changed files with 8 additions and 21 deletions
-14
View File
@@ -50,12 +50,6 @@ def main():
# Захват кадра с камеры # Захват кадра с камеры
camera = create_camera(camera_type=cfg.CAMERA_TYPE, camera_id=cfg.CAMERA_ID, mirror=cfg.MIRROR_CAMERA) camera = create_camera(camera_type=cfg.CAMERA_TYPE, camera_id=cfg.CAMERA_ID, mirror=cfg.MIRROR_CAMERA)
'''
cap = cv2.VideoCapture(cfg.CAMERA_ID)
if not cap.isOpened():
print("Ошибка: не удалось открыть камеру")
sys.exit(1)
'''
enabled = False enabled = False
# включение управления жестами # включение управления жестами
@@ -66,13 +60,6 @@ def main():
dome_processed = False dome_processed = False
while True: while True:
'''
ret, frame = cap.read()
if not ret:
break
if cfg.MIRROR_CAMERA:
frame = cv2.flip(frame, 1)
'''
frame = camera.get_frame() frame = camera.get_frame()
if frame is None: if frame is None:
continue continue
@@ -145,7 +132,6 @@ def main():
if cv2.waitKey(1) & 0xFF == ord('q'): if cv2.waitKey(1) & 0xFF == ord('q'):
break break
#cap.release()
camera.release() camera.release()
cv2.destroyAllWindows() cv2.destroyAllWindows()
robot.quit() robot.quit()
+8 -7
View File
@@ -1,7 +1,8 @@
opencv-python opencv-python==4.12.0
mediapipe mediapipe==0.10.11
numpy numpy==1.24.3
pygame pygame==2.6.1
scikit-learn scikit-learn==1.3.2
pandas pandas==2.0.3
joblib joblib==1.4.2
depthai==2.28.0