2011-12-30 00:46:16 +08:00
|
|
|
#include "perf_precomp.hpp"
|
2022-03-14 21:10:04 +08:00
|
|
|
#include <numeric>
|
2012-09-19 22:03:50 +08:00
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
namespace opencv_test
|
|
|
|
{
|
2011-12-30 00:46:16 +08:00
|
|
|
using namespace perf;
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
typedef Size_MatType BinaryOpTest;
|
2011-12-30 00:46:16 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, min)
|
2011-12-30 00:46:16 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Mat b = Mat(sz, type);
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::min(a, b, c);
|
2011-12-30 00:46:16 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
SANITY_CHECK_NOTHING();
|
|
|
|
}
|
|
|
|
|
|
|
|
PERF_TEST_P_(BinaryOpTest, minScalarDouble)
|
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Scalar b;
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
|
|
|
TEST_CYCLE() cv::min(a, b, c);
|
|
|
|
|
|
|
|
SANITY_CHECK_NOTHING();
|
2011-12-30 00:46:16 +08:00
|
|
|
}
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, minScalarSameType)
|
2011-12-30 00:46:16 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Scalar b;
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
if (CV_MAT_DEPTH(type) < CV_32S)
|
|
|
|
{
|
|
|
|
b = Scalar(1, 0, 3, 4); // don't pass non-integer values for 8U/8S/16U/16S processing
|
|
|
|
}
|
|
|
|
else if (CV_MAT_DEPTH(type) == CV_32S)
|
|
|
|
{
|
|
|
|
b = Scalar(1, 0, -3, 4); // don't pass non-integer values for 32S processing
|
|
|
|
}
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::min(a, b, c);
|
2011-12-30 00:46:16 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
SANITY_CHECK_NOTHING();
|
2011-12-30 00:46:16 +08:00
|
|
|
}
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, max)
|
2011-12-30 00:46:16 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Mat b = Mat(sz, type);
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::max(a, b, c);
|
2011-12-30 00:46:16 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
SANITY_CHECK_NOTHING();
|
|
|
|
}
|
|
|
|
|
|
|
|
PERF_TEST_P_(BinaryOpTest, maxScalarDouble)
|
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Scalar b;
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
|
|
|
TEST_CYCLE() cv::max(a, b, c);
|
|
|
|
|
|
|
|
SANITY_CHECK_NOTHING();
|
2011-12-30 00:46:16 +08:00
|
|
|
}
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, maxScalarSameType)
|
2011-12-30 00:46:16 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Scalar b;
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
if (CV_MAT_DEPTH(type) < CV_32S)
|
|
|
|
{
|
|
|
|
b = Scalar(1, 0, 3, 4); // don't pass non-integer values for 8U/8S/16U/16S processing
|
|
|
|
}
|
|
|
|
else if (CV_MAT_DEPTH(type) == CV_32S)
|
|
|
|
{
|
|
|
|
b = Scalar(1, 0, -3, 4); // don't pass non-integer values for 32S processing
|
|
|
|
}
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::max(a, b, c);
|
2011-12-30 00:46:16 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
SANITY_CHECK_NOTHING();
|
2011-12-30 00:46:16 +08:00
|
|
|
}
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, absdiff)
|
2011-12-30 00:46:16 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Mat b = Mat(sz, type);
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
2012-10-08 22:06:17 +08:00
|
|
|
if (CV_MAT_DEPTH(type) == CV_32S)
|
|
|
|
{
|
|
|
|
//see ticket 1529: absdiff can be without saturation on 32S
|
|
|
|
a /= 2;
|
|
|
|
b /= 2;
|
|
|
|
}
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::absdiff(a, b, c);
|
2011-12-30 00:46:16 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
SANITY_CHECK_NOTHING();
|
2011-12-30 00:46:16 +08:00
|
|
|
}
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, absdiffScalarDouble)
|
2011-12-30 00:46:16 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Scalar b;
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
2012-10-08 22:06:17 +08:00
|
|
|
if (CV_MAT_DEPTH(type) == CV_32S)
|
|
|
|
{
|
|
|
|
//see ticket 1529: absdiff can be without saturation on 32S
|
|
|
|
a /= 2;
|
|
|
|
b /= 2;
|
|
|
|
}
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::absdiff(a, b, c);
|
2011-12-30 00:46:16 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
SANITY_CHECK_NOTHING();
|
|
|
|
}
|
|
|
|
|
|
|
|
PERF_TEST_P_(BinaryOpTest, absdiffScalarSameType)
|
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Scalar b;
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
|
|
|
if (CV_MAT_DEPTH(type) < CV_32S)
|
|
|
|
{
|
|
|
|
b = Scalar(1, 0, 3, 4); // don't pass non-integer values for 8U/8S/16U/16S processing
|
|
|
|
}
|
|
|
|
else if (CV_MAT_DEPTH(type) == CV_32S)
|
|
|
|
{
|
|
|
|
//see ticket 1529: absdiff can be without saturation on 32S
|
|
|
|
a /= 2;
|
|
|
|
b = Scalar(1, 0, -3, 4); // don't pass non-integer values for 32S processing
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_CYCLE() cv::absdiff(a, b, c);
|
|
|
|
|
|
|
|
SANITY_CHECK_NOTHING();
|
2011-12-30 00:46:16 +08:00
|
|
|
}
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, add)
|
2011-12-30 00:46:16 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Mat b = Mat(sz, type);
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
2012-11-28 18:13:24 +08:00
|
|
|
declare.time(50);
|
2011-12-30 00:46:16 +08:00
|
|
|
|
2012-10-08 22:06:17 +08:00
|
|
|
if (CV_MAT_DEPTH(type) == CV_32S)
|
|
|
|
{
|
|
|
|
//see ticket 1529: add can be without saturation on 32S
|
|
|
|
a /= 2;
|
|
|
|
b /= 2;
|
|
|
|
}
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::add(a, b, c);
|
2011-12-30 00:46:16 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
SANITY_CHECK_NOTHING();
|
2011-12-30 00:46:16 +08:00
|
|
|
}
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, addScalarDouble)
|
2011-12-30 00:46:16 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Scalar b;
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
2012-10-08 22:06:17 +08:00
|
|
|
if (CV_MAT_DEPTH(type) == CV_32S)
|
|
|
|
{
|
|
|
|
//see ticket 1529: add can be without saturation on 32S
|
|
|
|
a /= 2;
|
|
|
|
b /= 2;
|
|
|
|
}
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::add(a, b, c);
|
2011-12-30 00:46:16 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
SANITY_CHECK_NOTHING();
|
|
|
|
}
|
|
|
|
|
|
|
|
PERF_TEST_P_(BinaryOpTest, addScalarSameType)
|
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Scalar b;
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
|
|
|
if (CV_MAT_DEPTH(type) < CV_32S)
|
|
|
|
{
|
|
|
|
b = Scalar(1, 0, 3, 4); // don't pass non-integer values for 8U/8S/16U/16S processing
|
|
|
|
}
|
|
|
|
else if (CV_MAT_DEPTH(type) == CV_32S)
|
|
|
|
{
|
|
|
|
//see ticket 1529: add can be without saturation on 32S
|
|
|
|
a /= 2;
|
|
|
|
b = Scalar(1, 0, -3, 4); // don't pass non-integer values for 32S processing
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_CYCLE() cv::add(a, b, c, noArray(), type);
|
|
|
|
|
|
|
|
SANITY_CHECK_NOTHING();
|
2011-12-30 00:46:16 +08:00
|
|
|
}
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, subtract)
|
2011-12-30 00:46:16 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Mat b = Mat(sz, type);
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
2012-10-08 22:06:17 +08:00
|
|
|
if (CV_MAT_DEPTH(type) == CV_32S)
|
|
|
|
{
|
|
|
|
//see ticket 1529: subtract can be without saturation on 32S
|
|
|
|
a /= 2;
|
|
|
|
b /= 2;
|
|
|
|
}
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::subtract(a, b, c);
|
2011-12-30 00:46:16 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
SANITY_CHECK_NOTHING();
|
2011-12-30 00:46:16 +08:00
|
|
|
}
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, subtractScalarDouble)
|
2011-12-30 00:46:16 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Scalar b;
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
2012-10-08 22:06:17 +08:00
|
|
|
if (CV_MAT_DEPTH(type) == CV_32S)
|
|
|
|
{
|
|
|
|
//see ticket 1529: subtract can be without saturation on 32S
|
|
|
|
a /= 2;
|
|
|
|
b /= 2;
|
|
|
|
}
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::subtract(a, b, c);
|
2011-12-30 00:46:16 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
SANITY_CHECK_NOTHING();
|
|
|
|
}
|
|
|
|
|
|
|
|
PERF_TEST_P_(BinaryOpTest, subtractScalarSameType)
|
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type);
|
|
|
|
cv::Scalar b;
|
|
|
|
cv::Mat c = Mat(sz, type);
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
|
|
|
if (CV_MAT_DEPTH(type) < CV_32S)
|
|
|
|
{
|
|
|
|
b = Scalar(1, 0, 3, 4); // don't pass non-integer values for 8U/8S/16U/16S processing
|
|
|
|
}
|
|
|
|
else if (CV_MAT_DEPTH(type) == CV_32S)
|
|
|
|
{
|
|
|
|
//see ticket 1529: subtract can be without saturation on 32S
|
|
|
|
a /= 2;
|
|
|
|
b = Scalar(1, 0, -3, 4); // don't pass non-integer values for 32S processing
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_CYCLE() cv::subtract(a, b, c, noArray(), type);
|
|
|
|
|
|
|
|
SANITY_CHECK_NOTHING();
|
2011-12-30 00:46:16 +08:00
|
|
|
}
|
2014-01-04 18:56:32 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, multiply)
|
2014-01-04 18:56:32 +08:00
|
|
|
{
|
2014-01-04 19:01:32 +08:00
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
2014-01-13 19:55:49 +08:00
|
|
|
cv::Mat a(sz, type), b(sz, type), c(sz, type);
|
2014-01-04 18:56:32 +08:00
|
|
|
|
2014-01-04 19:01:32 +08:00
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
if (CV_MAT_DEPTH(type) == CV_32S)
|
|
|
|
{
|
2014-01-04 20:09:30 +08:00
|
|
|
//According to docs, saturation is not applied when result is 32bit integer
|
|
|
|
a /= (2 << 16);
|
|
|
|
b /= (2 << 16);
|
2014-01-04 19:01:32 +08:00
|
|
|
}
|
2014-01-04 18:56:32 +08:00
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::multiply(a, b, c);
|
2014-01-04 18:56:32 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
SANITY_CHECK_NOTHING();
|
2014-01-04 18:56:32 +08:00
|
|
|
}
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, multiplyScale)
|
2014-01-04 18:56:32 +08:00
|
|
|
{
|
2014-01-04 19:01:32 +08:00
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
2014-01-13 19:55:49 +08:00
|
|
|
cv::Mat a(sz, type), b(sz, type), c(sz, type);
|
2014-01-04 19:01:32 +08:00
|
|
|
double scale = 0.5;
|
2014-01-04 18:56:32 +08:00
|
|
|
|
2014-01-04 19:01:32 +08:00
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
2014-01-04 18:56:32 +08:00
|
|
|
|
2014-01-04 19:01:32 +08:00
|
|
|
if (CV_MAT_DEPTH(type) == CV_32S)
|
|
|
|
{
|
|
|
|
//According to docs, saturation is not applied when result is 32bit integer
|
|
|
|
a /= (2 << 16);
|
|
|
|
b /= (2 << 16);
|
|
|
|
}
|
2014-01-04 18:56:32 +08:00
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::multiply(a, b, c, scale);
|
2014-01-04 18:56:32 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
SANITY_CHECK_NOTHING();
|
2014-01-04 18:56:32 +08:00
|
|
|
}
|
2015-01-12 15:59:30 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, divide)
|
2015-01-12 15:59:30 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a(sz, type), b(sz, type), c(sz, type);
|
|
|
|
double scale = 0.5;
|
|
|
|
|
|
|
|
declare.in(a, b, WARMUP_RNG).out(c);
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::divide(a, b, c, scale);
|
2015-01-12 15:59:30 +08:00
|
|
|
|
|
|
|
SANITY_CHECK_NOTHING();
|
|
|
|
}
|
2015-01-12 15:59:30 +08:00
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
PERF_TEST_P_(BinaryOpTest, reciprocal)
|
2015-01-12 15:59:30 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat b(sz, type), c(sz, type);
|
|
|
|
double scale = 0.5;
|
|
|
|
|
|
|
|
declare.in(b, WARMUP_RNG).out(c);
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
TEST_CYCLE() cv::divide(scale, b, c);
|
2015-01-12 15:59:30 +08:00
|
|
|
|
|
|
|
SANITY_CHECK_NOTHING();
|
|
|
|
}
|
2017-11-05 21:48:40 +08:00
|
|
|
|
2022-03-14 21:10:04 +08:00
|
|
|
|
|
|
|
PERF_TEST_P_(BinaryOpTest, transposeND)
|
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int type = get<1>(GetParam());
|
|
|
|
cv::Mat a = Mat(sz, type).reshape(1);
|
|
|
|
|
|
|
|
std::vector<int> order(a.dims);
|
|
|
|
std::iota(order.begin(), order.end(), 0);
|
|
|
|
std::reverse(order.begin(), order.end());
|
|
|
|
|
|
|
|
std::vector<int> new_sz(a.dims);
|
|
|
|
std::copy(a.size.p, a.size.p + a.dims, new_sz.begin());
|
|
|
|
std::reverse(new_sz.begin(), new_sz.end());
|
|
|
|
cv::Mat b = Mat(new_sz, type);
|
|
|
|
|
|
|
|
declare.in(a,WARMUP_RNG).out(b);
|
|
|
|
|
|
|
|
TEST_CYCLE() cv::transposeND(a, order, b);
|
|
|
|
|
|
|
|
SANITY_CHECK_NOTHING();
|
|
|
|
}
|
|
|
|
|
2018-08-16 00:32:58 +08:00
|
|
|
INSTANTIATE_TEST_CASE_P(/*nothing*/ , BinaryOpTest,
|
|
|
|
testing::Combine(
|
|
|
|
testing::Values(szVGA, sz720p, sz1080p),
|
|
|
|
testing::Values(CV_8UC1, CV_8UC3, CV_8UC4, CV_8SC1, CV_16SC1, CV_16SC2, CV_16SC3, CV_16SC4, CV_32SC1, CV_32FC1)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
} // namespace
|