Merge pull request #2015 from apavlenko:2.4_fix_ts_rng-fill

pull/2017/head
Andrey Pavlenko 11 years ago committed by OpenCV Buildbot
commit 459e7d4a80
  1. 4
      modules/ts/src/ts_func.cpp

@ -116,7 +116,7 @@ Mat randomMat(RNG& rng, Size size, int type, double minVal, double maxVal, bool
Mat m(size0, type); Mat m(size0, type);
rng.fill(m, RNG::UNIFORM, Scalar::all(minVal), Scalar::all(maxVal)); rng.fill(m, RNG::UNIFORM, minVal, maxVal);
if( size0 == size ) if( size0 == size )
return m; return m;
return m(Rect((size0.width-size.width)/2, (size0.height-size.height)/2, size.width, size.height)); return m(Rect((size0.width-size.width)/2, (size0.height-size.height)/2, size.width, size.height));
@ -142,7 +142,7 @@ Mat randomMat(RNG& rng, const vector<int>& size, int type, double minVal, double
Mat m(dims, &size0[0], type); Mat m(dims, &size0[0], type);
rng.fill(m, RNG::UNIFORM, Scalar::all(minVal), Scalar::all(maxVal)); rng.fill(m, RNG::UNIFORM, minVal, maxVal);
if( eqsize ) if( eqsize )
return m; return m;
return m(&r[0]); return m(&r[0]);

Loading…
Cancel
Save