From bb97ad182da6150593d25bedaa7c1e1b8489c328 Mon Sep 17 00:00:00 2001 From: WenmuZhou <572459439@qq.com> Date: Fri, 9 Sep 2022 12:31:58 +0000 Subject: [PATCH] update vis --- deploy/cpp_infer/src/utility.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deploy/cpp_infer/src/utility.cpp b/deploy/cpp_infer/src/utility.cpp index eae54c09..0e6ba17f 100644 --- a/deploy/cpp_infer/src/utility.cpp +++ b/deploy/cpp_infer/src/utility.cpp @@ -73,9 +73,10 @@ void Utility::VisualizeBboxes(const cv::Mat &srcimg, for (int n = 0; n < structure_result.cell_box.size(); n++) { if (structure_result.cell_box[n].size() == 8) { cv::Point rook_points[4]; - for (int m = 0; m < 4; m++) { - rook_points[m] = cv::Point(int(structure_result.cell_box[n][m]), - int(structure_result.cell_box[n][m + 1])); + for (int m = 0; m < structure_result.cell_box[n].size(); m += 2) { + rook_points[m / 2] = + cv::Point(int(structure_result.cell_box[n][m]), + int(structure_result.cell_box[n][m + 1])); } const cv::Point *ppt[1] = {rook_points}; int npt[] = {4}; -- GitLab