Commit c56c0e14 authored by LaurentBerger's avatar LaurentBerger

Solve exception for 3D Mat

parent fb456eb6
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment