فهرست منبع

add track_id in draw image

leon 1 ماه پیش
والد
کامیت
0d7be34e6d
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/nodes/draw/drawNode.cpp

+ 1 - 1
src/nodes/draw/drawNode.cpp

@@ -43,7 +43,7 @@ void DrawNode::work()
                 std::tuple<int, int, int, int> pbox = std::make_tuple(box.left, box.top, box.right, box.bottom);
                 int x, y;
                 std::tie(x, y) = pm.selectOptimalPosition(pbox, image_width, image_height, box.label);
-                std::string text = str_format("%s %.2f", box.label.c_str(), box.score);
+                std::string text = str_format("%s %.2f id=%d", box.label.c_str(), box.score, b.track_id);
                 cv::putText(image, text, cv::Point(x, y), cv::FONT_HERSHEY_SIMPLEX, 1, cv::Scalar(0, 255, 0), 2);
             }
             metaData->draw_image = image;