From 2ac8b5686249cd4f306bb32d055057e24757e9d7 Mon Sep 17 00:00:00 2001 From: KhalilSelyan Date: Mon, 27 May 2024 19:44:19 +0300 Subject: [PATCH] refactor(traffic_light_roi_visualizer): adjust shape dimensions and font style Signed-off-by: KhalilSelyan --- .../src/traffic_light_roi_visualizer/shape_draw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perception/traffic_light_visualization/src/traffic_light_roi_visualizer/shape_draw.cpp b/perception/traffic_light_visualization/src/traffic_light_roi_visualizer/shape_draw.cpp index b6db0da29847c..393af579f6c69 100644 --- a/perception/traffic_light_visualization/src/traffic_light_roi_visualizer/shape_draw.cpp +++ b/perception/traffic_light_visualization/src/traffic_light_roi_visualizer/shape_draw.cpp @@ -61,7 +61,7 @@ void drawShape( params.image, cv::Rect( // width should take into account the text width - position.x - 2, position.y - 5, shapeImg.cols + 47, shapeImg.rows + 5), + position.x - 2, position.y - 5, shapeImg.cols + 70, shapeImg.rows + 12), params.color, -1); // Filled rectangle @@ -82,7 +82,7 @@ void drawShape( cv::putText( params.image, std::to_string(static_cast(round(params.probability * 100))) + "%", cv::Point(position.x + shapeImg.cols + 5, position.y + shapeImg.rows / 2 + 5), - cv::FONT_HERSHEY_COMPLEX, 0.45, cv::Scalar(0, 0, 0), 2); + cv::FONT_HERSHEY_SIMPLEX, 0.7, cv::Scalar(0, 0, 0), 2, cv::LINE_AA); } void drawCircle(const DrawFunctionParams & params)