From: Leonid Beynenson Date: Tue, 12 Jul 2011 16:33:26 +0000 (+0000) Subject: Fixed bug in the operator of cv::Ranges-s intersection (operator &). X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~6655 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ddc661882a541fe8f506197544c511779c5447b;p=platform%2Fupstream%2Fopencv.git Fixed bug in the operator of cv::Ranges-s intersection (operator &). --- diff --git a/modules/core/include/opencv2/core/operations.hpp b/modules/core/include/opencv2/core/operations.hpp index 60b4926..94d3df3 100644 --- a/modules/core/include/opencv2/core/operations.hpp +++ b/modules/core/include/opencv2/core/operations.hpp @@ -2000,7 +2000,7 @@ static inline bool operator !(const Range& r) static inline Range operator & (const Range& r1, const Range& r2) { - Range r(std::max(r1.start, r2.start), std::min(r2.start, r2.end)); + Range r(std::max(r1.start, r2.start), std::min(r1.end, r2.end)); r.end = std::max(r.end, r.start); return r; }