From c56c0e140b7a45e18ccdf70012d2e41f194f235e Mon Sep 17 00:00:00 2001 From: LaurentBerger Date: Tue, 29 Nov 2016 12:10:33 +0100 Subject: [PATCH] Solve exception for 3D Mat --- modules/core/src/convert.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/convert.cpp b/modules/core/src/convert.cpp index de36cc67a2..9d65f3b906 100644 --- a/modules/core/src/convert.cpp +++ b/modules/core/src/convert.cpp @@ -5692,7 +5692,7 @@ void cv::normalize( InputArray _src, InputOutputArray _dst, double a, double b, { double smin = 0, smax = 0; double dmin = MIN( a, b ), dmax = MAX( a, b ); - minMaxLoc( _src, &smin, &smax, 0, 0, _mask ); + minMaxIdx( _src, &smin, &smax, 0, 0, _mask ); scale = (dmax - dmin)*(smax - smin > DBL_EPSILON ? 1./(smax - smin) : 0); shift = dmin - smin*scale; }