fix: 临时修复rect完全超限时的超限返回值

This commit is contained in:
status102
2026-04-22 16:22:51 +08:00
parent 3d29fcb8ed
commit beedbd37cc

View File

@@ -92,7 +92,7 @@ Rect VisionHelper::correct_rect(const Rect& rect, const cv::Mat& image)
}
if (rect.x >= image.cols || rect.y >= image.rows) {
Log.error(__FUNCTION__, "roi is out of range", image.cols, image.rows, rect.to_string());
return rect;
return { 1, 1, 0, 0 }; // 临时修复, 后续需调整默认rect的行为
}
Rect res = rect;