From 8dda41633d32108e024aa2c26804a3c0c27c24f7 Mon Sep 17 00:00:00 2001 From: sladro Date: Thu, 8 Jan 2026 14:16:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=B5=8B=E8=AF=95=E4=BA=BA?= =?UTF-8?q?=E8=84=B8=E8=AF=86=E5=88=AB,=E5=85=B3=E9=97=AD=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E6=A1=86=E4=BD=93=EF=BC=8C=E4=B8=8B=E4=B8=80=E6=AD=A5?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95=E8=AF=86=E5=88=AB=E4=BA=BA?= =?UTF-8?q?=E8=84=B8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- configs/test_cam1_face_det_recog_rtsp_server.json | 1 + plugins/osd/osd_node.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configs/test_cam1_face_det_recog_rtsp_server.json b/configs/test_cam1_face_det_recog_rtsp_server.json index 80d29a6..54733d8 100644 --- a/configs/test_cam1_face_det_recog_rtsp_server.json +++ b/configs/test_cam1_face_det_recog_rtsp_server.json @@ -69,6 +69,7 @@ "enable": true, "draw_bbox": true, "draw_text": true, + "draw_face_det": false, "line_width": 2, "font_scale": 1, "labels": [] diff --git a/plugins/osd/osd_node.cpp b/plugins/osd/osd_node.cpp index 14a7cf2..8605153 100644 --- a/plugins/osd/osd_node.cpp +++ b/plugins/osd/osd_node.cpp @@ -287,6 +287,7 @@ public: id_ = config.ValueOr("id", "osd"); draw_bbox_ = config.ValueOr("draw_bbox", true); draw_text_ = config.ValueOr("draw_text", true); + draw_face_det_ = config.ValueOr("draw_face_det", draw_face_det_); line_width_ = config.ValueOr("line_width", 2); font_scale_ = config.ValueOr("font_scale", 1); @@ -319,7 +320,8 @@ public: bool Start() override { LogInfo(std::string("[osd] start id=") + id_ + " draw_bbox=" + (draw_bbox_ ? "true" : "false") + - " draw_text=" + (draw_text_ ? "true" : "false")); + " draw_text=" + (draw_text_ ? "true" : "false") + + " draw_face_det=" + (draw_face_det_ ? "true" : "false")); return true; } @@ -336,7 +338,7 @@ public: out = CloneFrameForWrite(out); } DrawDetections(out); - DrawFaceDet(out); + if (draw_face_det_) DrawFaceDet(out); DrawFaceRecog(out); } @@ -518,6 +520,7 @@ private: std::string id_; bool draw_bbox_ = true; bool draw_text_ = true; + bool draw_face_det_ = true; int line_width_ = 2; int font_scale_ = 1; std::vector labels_;