fixed bug in performance test matrix generation

This commit is contained in:
Alexey Spizhevoy
2011-01-25 11:45:29 +00:00
parent 7e3c69c82f
commit 397a63539c
3 changed files with 14 additions and 23 deletions

View File

@@ -4,22 +4,12 @@
using namespace std;
using namespace cv;
void Test::gen(Mat& mat, int rows, int cols, int type)
{
mat.create(rows, cols, type);
Mat mat8u(rows, cols * mat.elemSize(), CV_8U, mat.data, mat.step);
RNG rng(0);
rng.fill(mat, RNG::UNIFORM, Scalar(0), Scalar(256));
}
void Test::gen(Mat& mat, int rows, int cols, int type, double low, double high)
void Test::gen(Mat& mat, int rows, int cols, int type, Scalar low, Scalar high)
{
mat.create(rows, cols, type);
RNG rng(0);
rng.fill(mat, RNG::UNIFORM, Scalar::all(low), Scalar::all(high));
rng.fill(mat, RNG::UNIFORM, low, high);
}