From ff9da914ec20d63bc7fb3a0d194e276df4f1d65a Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Thu, 4 Aug 2011 06:17:23 +0000 Subject: [PATCH] Fixed bug in checkRange - integer Mats were always in range --- modules/core/src/mathfuncs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/core/src/mathfuncs.cpp b/modules/core/src/mathfuncs.cpp index 83970fa..88056e0 100644 --- a/modules/core/src/mathfuncs.cpp +++ b/modules/core/src/mathfuncs.cpp @@ -1990,8 +1990,8 @@ bool checkRange(InputArray _src, bool quiet, Point* pt, if( depth < CV_32F ) { - double m = 0, M = 0, badValue = 0; - Point mp, MP, badPt(-1,-1); + double m = 0, M = 0; + Point mp, MP; minMaxLoc(src.reshape(1,0), &m, &M, &mp, &MP); if( M >= maxVal ) { -- 2.7.4