From 30e6b0ef872d4af7e3765f711b22082de535ec93 Mon Sep 17 00:00:00 2001 From: CaoWangrenbo Date: Mon, 27 Oct 2025 16:11:28 +0800 Subject: [PATCH] =?UTF-8?q?pref:=20=E5=8A=A0=E7=B2=97=E6=A0=87=E8=AE=B0?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E5=B9=B6=E6=96=B0=E5=BB=BArequirements.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cam_web.py | 4 ++-- requirements.txt | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 requirements.txt diff --git a/cam_web.py b/cam_web.py index da6f2d8..5e8623c 100644 --- a/cam_web.py +++ b/cam_web.py @@ -127,8 +127,8 @@ def draw_detections_on_image(image: np.ndarray, detections: list) -> np.ndarray: # 添加标签 label_text = f"{label} ({obj_id})" - cv2.putText(marked_image, label_text, (x_min, y_min - 10), - cv2.FONT_HERSHEY_SIMPLEX, 0.5, color, 1) + cv2.putText(marked_image, label_text, (x_min, y_min + 10), + cv2.FONT_HERSHEY_SIMPLEX, 0.5, color, 2) return marked_image diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..734892a --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +flask +flask-socketio +opencv-python +pynng \ No newline at end of file