diff --git a/modules/softcascade/src/detector.cpp b/modules/softcascade/src/detector.cpp index dcdfe31162..1a3cae2006 100644 --- a/modules/softcascade/src/detector.cpp +++ b/modules/softcascade/src/detector.cpp @@ -43,7 +43,8 @@ #include "precomp.hpp" cv::softcascade::Detection::Detection(const cv::Rect& b, const float c, int k) -: x(b.x), y(b.y), w(b.width), h(b.height), confidence(c), kind(k) {} +: x(static_cast(b.x)), y(static_cast(b.y)), + w(static_cast(b.width)), h(static_cast(b.height)), confidence(c), kind(k) {} cv::Rect cv::softcascade::Detection::bb() const {