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_;