reproject rect change

This commit is contained in:
cyy_mac
2026-03-26 04:54:17 +08:00
parent 8cfffe8f32
commit f3d26bcd93

View File

@@ -50,11 +50,12 @@ namespace fyt::auto_aim {
static inline std::vector<cv::Point3f> 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>{
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)
};
}