From f3d26bcd939041f99e7c796b60dddf0099760a0c Mon Sep 17 00:00:00 2001 From: cyy_mac Date: Thu, 26 Mar 2026 04:54:17 +0800 Subject: [PATCH] reproject rect change --- .../include/armor_detector/armor_reproject.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/rm_auto_aim/armor_detector/include/armor_detector/armor_reproject.hpp b/src/rm_auto_aim/armor_detector/include/armor_detector/armor_reproject.hpp index 1e94d57..e7800b9 100644 --- a/src/rm_auto_aim/armor_detector/include/armor_detector/armor_reproject.hpp +++ b/src/rm_auto_aim/armor_detector/include/armor_detector/armor_reproject.hpp @@ -50,11 +50,12 @@ namespace fyt::auto_aim { static inline std::vector getArmorCornerPoints(bool is_big) { double w = is_big ? LARGE_ARMOR_WIDTH : SMALL_ARMOR_WIDTH; double h = is_big ? LARGE_ARMOR_HEIGHT : SMALL_ARMOR_HEIGHT; + // Rotate 90 degrees: y' = z, z' = -y return std::vector{ - cv::Point3f(0, w / 2, -h / 2), // 0: bottom-left - cv::Point3f(0, w / 2, h / 2), // 1: top-left - cv::Point3f(0, -w / 2, h / 2), // 2: top-right - cv::Point3f(0, -w / 2, -h / 2) // 3: bottom-right + cv::Point3f(0, -h / 2, -w / 2), // 0: bottom-left (rotated) + cv::Point3f(0, h / 2, -w / 2), // 1: top-left (rotated) + cv::Point3f(0, h / 2, w / 2), // 2: top-right (rotated) + cv::Point3f(0, -h / 2, w / 2) // 3: bottom-right (rotated) }; }