fix: image 长宽等于 0 时提前返回

This commit is contained in:
uye
2025-11-24 12:48:08 +08:00
parent bf30c84b4f
commit 31520afb37

View File

@@ -76,7 +76,7 @@ Rect asst::VisionHelper::correct_rect(const Rect& rect, const Rect& main_roi)
Rect VisionHelper::correct_rect(const Rect& rect, const cv::Mat& image)
{
if (image.empty()) {
if (image.empty() || image.cols <= 0 || image.rows <= 0) {
Log.error(__FUNCTION__, "image is empty");
return rect;
}