diff --git a/modules/objdetect/src/softcascade.cpp b/modules/objdetect/src/softcascade.cpp index 56e8f430f..2a6ed8d6e 100644 --- a/modules/objdetect/src/softcascade.cpp +++ b/modules/objdetect/src/softcascade.cpp @@ -102,7 +102,7 @@ struct Feature if (useBoxes) rect = cv::Rect(x, y, w, h); else - rect = cv::Rect(x, y, w + x, h + x); + rect = cv::Rect(x, y, w + x, h + y); // 1 / area rarea = 1.f / ((rect.width - rect.x) * (rect.height - rect.y));