fix armor_detect

This commit is contained in:
cyy_mac
2026-03-25 19:31:27 +08:00
parent 1524268099
commit 54a51d3846

View File

@@ -151,7 +151,7 @@ cv::Point2f LightCornerCorrector::findCorner(const cv::Mat &gray_img,
std::vector<cv::Point2f> candidates;
// Limit candidates for performance - use subsampling for wide lights
int n = std::max(1, light.width - 2);
int n = std::max(1, static_cast<int>(light.width) - 2);
int stride = std::max(1, n / 5); // Limit to ~5 samples regardless of width
int half_n = std::round(n / 2);