Commit 48bff3bf authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #7748 from LaurentBerger:Normalize3d

parents a1d68ff3 c56c0e14
......@@ -5836,7 +5836,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