mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
fixed gpu performance tests
This commit is contained in:
parent
464b8a570c
commit
1f3f4599cc
@ -17,9 +17,7 @@ PERF_TEST_P(DevInfo_Size_MatType, transpose, testing::Combine(testing::ValuesIn(
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst(size.width, size.height, type);
|
GpuMat dst(size.width, size.height, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
transpose(src, dst);
|
transpose(src, dst);
|
||||||
}
|
}
|
||||||
@ -48,9 +46,7 @@ PERF_TEST_P(DevInfo_Size_MatType_FlipCode, flip, testing::Combine(testing::Value
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst(size, type);
|
GpuMat dst(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
flip(src, dst, flipCode);
|
flip(src, dst, flipCode);
|
||||||
}
|
}
|
||||||
@ -78,9 +74,7 @@ PERF_TEST_P(DevInfo_Size_MatType, LUT, testing::Combine(testing::ValuesIn(device
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst(size, type);
|
GpuMat dst(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
LUT(src, lut, dst);
|
LUT(src, lut, dst);
|
||||||
}
|
}
|
||||||
@ -108,9 +102,7 @@ PERF_TEST_P(DevInfo_Size, cartToPolar, testing::Combine(testing::ValuesIn(device
|
|||||||
GpuMat magnitude(size, CV_32FC1);
|
GpuMat magnitude(size, CV_32FC1);
|
||||||
GpuMat angle(size, CV_32FC1);
|
GpuMat angle(size, CV_32FC1);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
cartToPolar(x, y, magnitude, angle);
|
cartToPolar(x, y, magnitude, angle);
|
||||||
}
|
}
|
||||||
@ -140,9 +132,7 @@ PERF_TEST_P(DevInfo_Size, polarToCart, testing::Combine(testing::ValuesIn(device
|
|||||||
GpuMat x(size, CV_32FC1);
|
GpuMat x(size, CV_32FC1);
|
||||||
GpuMat y(size, CV_32FC1);
|
GpuMat y(size, CV_32FC1);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
polarToCart(magnitude, angle, x, y);
|
polarToCart(magnitude, angle, x, y);
|
||||||
}
|
}
|
||||||
@ -173,9 +163,7 @@ PERF_TEST_P(DevInfo_Size_MatType, addMat, testing::Combine(testing::ValuesIn(dev
|
|||||||
GpuMat b(b_host);
|
GpuMat b(b_host);
|
||||||
GpuMat c(size, type);
|
GpuMat c(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
add(a, b, c);
|
add(a, b, c);
|
||||||
}
|
}
|
||||||
@ -203,9 +191,7 @@ PERF_TEST_P(DevInfo_Size_MatType, addScalar, testing::Combine(testing::ValuesIn(
|
|||||||
Scalar b(1,2,3,4);
|
Scalar b(1,2,3,4);
|
||||||
GpuMat c(size, type);
|
GpuMat c(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
add(a, b, c);
|
add(a, b, c);
|
||||||
}
|
}
|
||||||
@ -234,9 +220,7 @@ PERF_TEST_P(DevInfo_Size_MatType, subtractMat, testing::Combine(testing::ValuesI
|
|||||||
GpuMat b(b_host);
|
GpuMat b(b_host);
|
||||||
GpuMat c(size, type);
|
GpuMat c(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
subtract(a, b, c);
|
subtract(a, b, c);
|
||||||
}
|
}
|
||||||
@ -254,7 +238,7 @@ PERF_TEST_P(DevInfo_Size, multiplyMat, testing::Combine(testing::ValuesIn(device
|
|||||||
|
|
||||||
setDevice(devInfo.deviceID());
|
setDevice(devInfo.deviceID());
|
||||||
|
|
||||||
Mat a_host(size, CV_8UC1);
|
Mat a_host(size, CV_8UC4);
|
||||||
Mat b_host(size, CV_32FC1);
|
Mat b_host(size, CV_32FC1);
|
||||||
|
|
||||||
declare.in(a_host, b_host, WARMUP_RNG);
|
declare.in(a_host, b_host, WARMUP_RNG);
|
||||||
@ -263,9 +247,7 @@ PERF_TEST_P(DevInfo_Size, multiplyMat, testing::Combine(testing::ValuesIn(device
|
|||||||
GpuMat b(b_host);
|
GpuMat b(b_host);
|
||||||
GpuMat c;
|
GpuMat c;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
multiply(a, b, c);
|
multiply(a, b, c);
|
||||||
}
|
}
|
||||||
@ -293,9 +275,7 @@ PERF_TEST_P(DevInfo_Size_MatType, multiplyScalar, testing::Combine(testing::Valu
|
|||||||
Scalar b(1,2,3,4);
|
Scalar b(1,2,3,4);
|
||||||
GpuMat c(size, type);
|
GpuMat c(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
multiply(a, b, c);
|
multiply(a, b, c);
|
||||||
}
|
}
|
||||||
@ -320,9 +300,7 @@ PERF_TEST_P(DevInfo_Size, exp, testing::Combine(testing::ValuesIn(devices()),
|
|||||||
GpuMat a(a_host);
|
GpuMat a(a_host);
|
||||||
GpuMat b(size, CV_32FC1);
|
GpuMat b(size, CV_32FC1);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
exp(a, b);
|
exp(a, b);
|
||||||
}
|
}
|
||||||
@ -349,9 +327,7 @@ PERF_TEST_P(DevInfo_Size_MatType, pow, testing::Combine(testing::ValuesIn(device
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst(size, type);
|
GpuMat dst(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
pow(src, 2.0, dst);
|
pow(src, 2.0, dst);
|
||||||
}
|
}
|
||||||
@ -382,9 +358,7 @@ PERF_TEST_P(DevInfo_Size_MatType_CmpOp, compare, testing::Combine(testing::Value
|
|||||||
GpuMat src2(src2_host);
|
GpuMat src2(src2_host);
|
||||||
GpuMat dst(size, type);
|
GpuMat dst(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
compare(src1, src2, dst, cmpop);
|
compare(src1, src2, dst, cmpop);
|
||||||
}
|
}
|
||||||
@ -411,9 +385,7 @@ PERF_TEST_P(DevInfo_Size_MatType, bitwise_not, testing::Combine(testing::ValuesI
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst(size, type);
|
GpuMat dst(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
bitwise_not(src, dst);
|
bitwise_not(src, dst);
|
||||||
}
|
}
|
||||||
@ -442,9 +414,7 @@ PERF_TEST_P(DevInfo_Size_MatType, bitwise_and, testing::Combine(testing::ValuesI
|
|||||||
GpuMat src2(src2_host);
|
GpuMat src2(src2_host);
|
||||||
GpuMat dst(size, type);
|
GpuMat dst(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
bitwise_and(src1, src2, dst);
|
bitwise_and(src1, src2, dst);
|
||||||
}
|
}
|
||||||
@ -473,9 +443,7 @@ PERF_TEST_P(DevInfo_Size_MatType, min, testing::Combine(testing::ValuesIn(device
|
|||||||
GpuMat src2(src2_host);
|
GpuMat src2(src2_host);
|
||||||
GpuMat dst(size, type);
|
GpuMat dst(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
min(src1, src2, dst);
|
min(src1, src2, dst);
|
||||||
}
|
}
|
||||||
@ -501,9 +469,7 @@ PERF_TEST_P(DevInfo_Size, meanStdDev, testing::Combine(testing::ValuesIn(devices
|
|||||||
Scalar mean;
|
Scalar mean;
|
||||||
Scalar stddev;
|
Scalar stddev;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
meanStdDev(src, mean, stddev);
|
meanStdDev(src, mean, stddev);
|
||||||
}
|
}
|
||||||
@ -532,9 +498,7 @@ PERF_TEST_P(DevInfo_Size_MatType_NormType, norm, testing::Combine(testing::Value
|
|||||||
double dst;
|
double dst;
|
||||||
GpuMat buf;
|
GpuMat buf;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
dst = norm(src, normType, buf);
|
dst = norm(src, normType, buf);
|
||||||
}
|
}
|
||||||
@ -561,9 +525,7 @@ PERF_TEST_P(DevInfo_Size_NormType, normDiff, testing::Combine(testing::ValuesIn(
|
|||||||
GpuMat src2(src2_host);
|
GpuMat src2(src2_host);
|
||||||
double dst;
|
double dst;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
dst = norm(src1, src2, normType);
|
dst = norm(src1, src2, normType);
|
||||||
}
|
}
|
||||||
@ -589,9 +551,7 @@ PERF_TEST_P(DevInfo_Size_MatType, sum, testing::Combine(testing::ValuesIn(device
|
|||||||
Scalar dst;
|
Scalar dst;
|
||||||
GpuMat buf;
|
GpuMat buf;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
dst = sum(src, buf);
|
dst = sum(src, buf);
|
||||||
}
|
}
|
||||||
@ -617,9 +577,7 @@ PERF_TEST_P(DevInfo_Size_MatType, minMax, testing::Combine(testing::ValuesIn(dev
|
|||||||
double minVal, maxVal;
|
double minVal, maxVal;
|
||||||
GpuMat buf;
|
GpuMat buf;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
minMax(src, &minVal, &maxVal, GpuMat(), buf);
|
minMax(src, &minVal, &maxVal, GpuMat(), buf);
|
||||||
}
|
}
|
||||||
@ -647,9 +605,7 @@ PERF_TEST_P(DevInfo_Size_MatType, minMaxLoc, testing::Combine(testing::ValuesIn(
|
|||||||
Point minLoc, maxLoc;
|
Point minLoc, maxLoc;
|
||||||
GpuMat valbuf, locbuf;
|
GpuMat valbuf, locbuf;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
minMaxLoc(src, &minVal, &maxVal, &minLoc, &maxLoc, GpuMat(), valbuf, locbuf);
|
minMaxLoc(src, &minVal, &maxVal, &minLoc, &maxLoc, GpuMat(), valbuf, locbuf);
|
||||||
}
|
}
|
||||||
@ -676,9 +632,7 @@ PERF_TEST_P(DevInfo_Size_MatType, countNonZero, testing::Combine(testing::Values
|
|||||||
int dst=0;
|
int dst=0;
|
||||||
GpuMat buf;
|
GpuMat buf;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
dst = countNonZero(src, buf);
|
dst = countNonZero(src, buf);
|
||||||
}
|
}
|
||||||
@ -705,9 +659,7 @@ PERF_TEST_P(DevInfo_Size_MatType, addWeighted, testing::Combine(testing::ValuesI
|
|||||||
GpuMat src2(src2_host);
|
GpuMat src2(src2_host);
|
||||||
GpuMat dst(size, type);
|
GpuMat dst(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
addWeighted(src1, 0.5, src2, 0.5, 0.0, dst);
|
addWeighted(src1, 0.5, src2, 0.5, 0.0, dst);
|
||||||
}
|
}
|
||||||
@ -736,9 +688,7 @@ PERF_TEST_P(DevInfo_Size_MatType_FlipCode, reduce, testing::Combine(testing::Val
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst(size, type);
|
GpuMat dst(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
reduce(src, dst, dim, CV_REDUCE_MIN);
|
reduce(src, dst, dim, CV_REDUCE_MIN);
|
||||||
}
|
}
|
||||||
@ -769,7 +719,7 @@ PERF_TEST_P(DevInfo_Size, gemm, testing::Combine(testing::ValuesIn(devices()),
|
|||||||
|
|
||||||
declare.time(5.0);
|
declare.time(5.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
gemm(src1, src2, 1.0, src3, 1.0, dst);
|
gemm(src1, src2, 1.0, src3, 1.0, dst);
|
||||||
}
|
}
|
||||||
|
@ -13,9 +13,7 @@ PERF_TEST_P(DevInfo, transformPoints, testing::ValuesIn(devices()))
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
transformPoints(src, Mat::ones(1, 3, CV_32FC1), Mat::ones(1, 3, CV_32FC1), dst);
|
transformPoints(src, Mat::ones(1, 3, CV_32FC1), Mat::ones(1, 3, CV_32FC1), dst);
|
||||||
}
|
}
|
||||||
@ -38,9 +36,7 @@ PERF_TEST_P(DevInfo, projectPoints, testing::ValuesIn(devices()))
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
projectPoints(src, Mat::ones(1, 3, CV_32FC1), Mat::ones(1, 3, CV_32FC1), Mat::ones(3, 3, CV_32FC1), Mat(), dst);
|
projectPoints(src, Mat::ones(1, 3, CV_32FC1), Mat::ones(1, 3, CV_32FC1), Mat::ones(3, 3, CV_32FC1), Mat(), dst);
|
||||||
}
|
}
|
||||||
@ -65,7 +61,7 @@ PERF_TEST_P(DevInfo, solvePnPRansac, testing::ValuesIn(devices()))
|
|||||||
|
|
||||||
declare.time(3.0);
|
declare.time(3.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
solvePnPRansac(object, image, Mat::ones(3, 3, CV_32FC1), Mat(1, 8, CV_32F, Scalar::all(0)), rvec, tvec);
|
solvePnPRansac(object, image, Mat::ones(3, 3, CV_32FC1), Mat(1, 8, CV_32F, Scalar::all(0)), rvec, tvec);
|
||||||
}
|
}
|
||||||
@ -93,9 +89,9 @@ PERF_TEST_P(DevInfo, StereoBM, testing::ValuesIn(devices()))
|
|||||||
|
|
||||||
StereoBM_GPU bm(0, 256);
|
StereoBM_GPU bm(0, 256);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
declare.time(5.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
bm(img_l, img_r, dst);
|
bm(img_l, img_r, dst);
|
||||||
}
|
}
|
||||||
@ -126,7 +122,7 @@ PERF_TEST_P(DevInfo, StereoBeliefPropagation, testing::ValuesIn(devices()))
|
|||||||
|
|
||||||
declare.time(10.0);
|
declare.time(10.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
bp(img_l, img_r, dst);
|
bp(img_l, img_r, dst);
|
||||||
}
|
}
|
||||||
@ -157,7 +153,7 @@ PERF_TEST_P(DevInfo, StereoConstantSpaceBP, testing::ValuesIn(devices()))
|
|||||||
|
|
||||||
declare.time(10.0);
|
declare.time(10.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
bp(img_l, img_r, dst);
|
bp(img_l, img_r, dst);
|
||||||
}
|
}
|
||||||
@ -186,9 +182,7 @@ PERF_TEST_P(DevInfo, DisparityBilateralFilter, testing::ValuesIn(devices()))
|
|||||||
|
|
||||||
DisparityBilateralFilter f(128);
|
DisparityBilateralFilter f(128);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
f(disp, img, dst);
|
f(disp, img, dst);
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ PERF_TEST_P(DevInfo_DescSize, BruteForceMatcher_match, testing::Combine(testing:
|
|||||||
|
|
||||||
declare.time(3.0);
|
declare.time(3.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
matcher.matchSingle(query, train, trainIdx, distance);
|
matcher.matchSingle(query, train, trainIdx, distance);
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ PERF_TEST_P(DevInfo_K_DescSize, BruteForceMatcher_knnMatch, testing::Combine(tes
|
|||||||
|
|
||||||
declare.time(3.0);
|
declare.time(3.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
matcher.knnMatchSingle(query, train, trainIdx, distance, allDist, k);
|
matcher.knnMatchSingle(query, train, trainIdx, distance, allDist, k);
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ PERF_TEST_P(DevInfo_DescSize, BruteForceMatcher_radiusMatch, testing::Combine(te
|
|||||||
|
|
||||||
declare.time(3.0);
|
declare.time(3.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
matcher.radiusMatchSingle(query, train, trainIdx, distance, nMatches, 2.0);
|
matcher.radiusMatchSingle(query, train, trainIdx, distance, nMatches, 2.0);
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ PERF_TEST_P(DevInfo, SURF, testing::ValuesIn(devices()))
|
|||||||
|
|
||||||
declare.time(2.0);
|
declare.time(2.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
surf(img, GpuMat(), keypoints, descriptors);
|
surf(img, GpuMat(), keypoints, descriptors);
|
||||||
}
|
}
|
||||||
|
@ -21,9 +21,7 @@ PERF_TEST_P(DevInfo_Size_MatType_KernelSize, boxFilter, testing::Combine(testing
|
|||||||
|
|
||||||
Ptr<FilterEngine_GPU> filter = createBoxFilter_GPU(type, type, Size(ksize, ksize));
|
Ptr<FilterEngine_GPU> filter = createBoxFilter_GPU(type, type, Size(ksize, ksize));
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
filter->apply(src, dst);
|
filter->apply(src, dst);
|
||||||
}
|
}
|
||||||
@ -56,9 +54,7 @@ PERF_TEST_P(DevInfo_Size_MatType_MorphOp_KernelSize, morphologyFilter, testing::
|
|||||||
|
|
||||||
Ptr<FilterEngine_GPU> filter = createMorphologyFilter_GPU(op, type, Mat::ones(ksize, ksize, CV_8U));
|
Ptr<FilterEngine_GPU> filter = createMorphologyFilter_GPU(op, type, Mat::ones(ksize, ksize, CV_8U));
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
filter->apply(src, dst);
|
filter->apply(src, dst);
|
||||||
}
|
}
|
||||||
@ -89,9 +85,9 @@ PERF_TEST_P(DevInfo_Size_MatType_KernelSize, linearFilter, testing::Combine(test
|
|||||||
|
|
||||||
Ptr<FilterEngine_GPU> filter = createLinearFilter_GPU(type, type, Mat::ones(ksize, ksize, CV_8U));
|
Ptr<FilterEngine_GPU> filter = createLinearFilter_GPU(type, type, Mat::ones(ksize, ksize, CV_8U));
|
||||||
|
|
||||||
declare.time(1.0).iterations(100);
|
declare.time(1.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
filter->apply(src, dst);
|
filter->apply(src, dst);
|
||||||
}
|
}
|
||||||
@ -123,9 +119,9 @@ PERF_TEST_P(DevInfo_Size_MatType_KernelSize, separableLinearFilter, testing::Com
|
|||||||
Mat kernel = getGaussianKernel(ksize, 0.5, CV_32F);
|
Mat kernel = getGaussianKernel(ksize, 0.5, CV_32F);
|
||||||
Ptr<FilterEngine_GPU> filter = createSeparableLinearFilter_GPU(type, type, kernel, kernel, Point(-1,-1));
|
Ptr<FilterEngine_GPU> filter = createSeparableLinearFilter_GPU(type, type, kernel, kernel, Point(-1,-1));
|
||||||
|
|
||||||
declare.time(1.0).iterations(100);
|
declare.time(1.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
filter->apply(src, dst, Rect(0, 0, src.cols, src.rows));
|
filter->apply(src, dst, Rect(0, 0, src.cols, src.rows));
|
||||||
}
|
}
|
||||||
|
@ -29,9 +29,9 @@ PERF_TEST_P(DevInfo_Size_MatType_Interpolation_BorderMode, remap, testing::Combi
|
|||||||
GpuMat xmap(xmap_host);
|
GpuMat xmap(xmap_host);
|
||||||
GpuMat ymap(ymap_host);
|
GpuMat ymap(ymap_host);
|
||||||
|
|
||||||
declare.time(3.0).iterations(100);
|
declare.time(3.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
remap(src, dst, xmap, ymap, interpolation, borderMode);
|
remap(src, dst, xmap, ymap, interpolation, borderMode);
|
||||||
}
|
}
|
||||||
@ -56,9 +56,9 @@ PERF_TEST_P(DevInfo, meanShiftFiltering, testing::ValuesIn(devices()))
|
|||||||
GpuMat src(rgba);
|
GpuMat src(rgba);
|
||||||
GpuMat dst(src.size(), CV_8UC4);
|
GpuMat dst(src.size(), CV_8UC4);
|
||||||
|
|
||||||
declare.time(5.0).iterations(100);
|
declare.time(5.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
meanShiftFiltering(src, dst, 50, 50);
|
meanShiftFiltering(src, dst, 50, 50);
|
||||||
}
|
}
|
||||||
@ -84,9 +84,9 @@ PERF_TEST_P(DevInfo, meanShiftProc, testing::ValuesIn(devices()))
|
|||||||
GpuMat dstr(src.size(), CV_8UC4);
|
GpuMat dstr(src.size(), CV_8UC4);
|
||||||
GpuMat dstsp(src.size(), CV_16SC2);
|
GpuMat dstsp(src.size(), CV_16SC2);
|
||||||
|
|
||||||
declare.time(5.0).iterations(100);
|
declare.time(5.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
meanShiftProc(src, dstr, dstsp, 50, 50);
|
meanShiftProc(src, dstr, dstsp, 50, 50);
|
||||||
}
|
}
|
||||||
@ -113,9 +113,9 @@ PERF_TEST_P(DevInfo, meanShiftSegmentation, testing::ValuesIn(devices()))
|
|||||||
GpuMat src(rgba);
|
GpuMat src(rgba);
|
||||||
Mat dst(src.size(), CV_8UC4);
|
Mat dst(src.size(), CV_8UC4);
|
||||||
|
|
||||||
declare.time(5.0).iterations(100);
|
declare.time(5.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
meanShiftSegmentation(src, dst, 10, 10, 20);
|
meanShiftSegmentation(src, dst, 10, 10, 20);
|
||||||
}
|
}
|
||||||
@ -140,9 +140,7 @@ PERF_TEST_P(DevInfo_Size_MatType, drawColorDisp, testing::Combine(testing::Value
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst(size, CV_8UC4);
|
GpuMat dst(size, CV_8UC4);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
drawColorDisp(src, dst, 255);
|
drawColorDisp(src, dst, 255);
|
||||||
}
|
}
|
||||||
@ -169,9 +167,7 @@ PERF_TEST_P(DevInfo_Size_MatType, reprojectImageTo3D, testing::Combine(testing::
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst(size, CV_32FC4);
|
GpuMat dst(size, CV_32FC4);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
reprojectImageTo3D(src, dst, Mat::ones(4, 4, CV_32FC1));
|
reprojectImageTo3D(src, dst, Mat::ones(4, 4, CV_32FC1));
|
||||||
}
|
}
|
||||||
@ -202,9 +198,7 @@ PERF_TEST_P(DevInfo_Size_MatType_CvtColorInfo, cvtColor, testing::Combine(testin
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst(size, CV_MAKETYPE(type, info.dcn));
|
GpuMat dst(size, CV_MAKETYPE(type, info.dcn));
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
cvtColor(src, dst, info.code, info.dcn);
|
cvtColor(src, dst, info.code, info.dcn);
|
||||||
}
|
}
|
||||||
@ -231,9 +225,7 @@ PERF_TEST_P(DevInfo_Size_MatType, threshold, testing::Combine(testing::ValuesIn(
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst(size, type);
|
GpuMat dst(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
threshold(src, dst, 100.0, 255.0, THRESH_BINARY);
|
threshold(src, dst, 100.0, 255.0, THRESH_BINARY);
|
||||||
}
|
}
|
||||||
@ -264,9 +256,9 @@ PERF_TEST_P(DevInfo_Size_MatType_Interpolation_SizeCoeff, resize, testing::Combi
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
|
|
||||||
declare.time(1.0).iterations(100);
|
declare.time(1.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
resize(src, dst, Size(), f, f, interpolation);
|
resize(src, dst, Size(), f, f, interpolation);
|
||||||
}
|
}
|
||||||
@ -301,9 +293,7 @@ PERF_TEST_P(DevInfo_Size_MatType_Interpolation, warpAffine, testing::Combine(tes
|
|||||||
reflect[1][2] = size.height;
|
reflect[1][2] = size.height;
|
||||||
Mat M(2, 3, CV_64F, (void*)reflect);
|
Mat M(2, 3, CV_64F, (void*)reflect);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
warpAffine(src, dst, M, size, interpolation);
|
warpAffine(src, dst, M, size, interpolation);
|
||||||
}
|
}
|
||||||
@ -339,9 +329,7 @@ PERF_TEST_P(DevInfo_Size_MatType_Interpolation, warpPerspective, testing::Combin
|
|||||||
reflect[1][2] = size.height;
|
reflect[1][2] = size.height;
|
||||||
Mat M(3, 3, CV_64F, (void*)reflect);
|
Mat M(3, 3, CV_64F, (void*)reflect);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
warpPerspective(src, dst, M, size, interpolation);
|
warpPerspective(src, dst, M, size, interpolation);
|
||||||
}
|
}
|
||||||
@ -362,9 +350,7 @@ PERF_TEST_P(DevInfo_Size, buildWarpPlaneMaps, testing::Combine(testing::ValuesIn
|
|||||||
GpuMat map_x(size, CV_32FC1);
|
GpuMat map_x(size, CV_32FC1);
|
||||||
GpuMat map_y(size, CV_32FC1);
|
GpuMat map_y(size, CV_32FC1);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
buildWarpPlaneMaps(size, Rect(0, 0, size.width, size.height), Mat::eye(3, 3, CV_32FC1),
|
buildWarpPlaneMaps(size, Rect(0, 0, size.width, size.height), Mat::eye(3, 3, CV_32FC1),
|
||||||
Mat::ones(3, 3, CV_32FC1), Mat::zeros(1, 3, CV_32F), 1.0, map_x, map_y);
|
Mat::ones(3, 3, CV_32FC1), Mat::zeros(1, 3, CV_32F), 1.0, map_x, map_y);
|
||||||
@ -388,9 +374,7 @@ PERF_TEST_P(DevInfo_Size, buildWarpCylindricalMaps, testing::Combine(testing::Va
|
|||||||
GpuMat map_x(size, CV_32FC1);
|
GpuMat map_x(size, CV_32FC1);
|
||||||
GpuMat map_y(size, CV_32FC1);
|
GpuMat map_y(size, CV_32FC1);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
buildWarpCylindricalMaps(size, Rect(0, 0, size.width, size.height), Mat::eye(3, 3, CV_32FC1),
|
buildWarpCylindricalMaps(size, Rect(0, 0, size.width, size.height), Mat::eye(3, 3, CV_32FC1),
|
||||||
Mat::ones(3, 3, CV_32FC1), 1.0, map_x, map_y);
|
Mat::ones(3, 3, CV_32FC1), 1.0, map_x, map_y);
|
||||||
@ -414,9 +398,7 @@ PERF_TEST_P(DevInfo_Size, buildWarpSphericalMaps, testing::Combine(testing::Valu
|
|||||||
GpuMat map_x(size, CV_32FC1);
|
GpuMat map_x(size, CV_32FC1);
|
||||||
GpuMat map_y(size, CV_32FC1);
|
GpuMat map_y(size, CV_32FC1);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
buildWarpSphericalMaps(size, Rect(0, 0, size.width, size.height), Mat::eye(3, 3, CV_32FC1),
|
buildWarpSphericalMaps(size, Rect(0, 0, size.width, size.height), Mat::eye(3, 3, CV_32FC1),
|
||||||
Mat::ones(3, 3, CV_32FC1), 1.0, map_x, map_y);
|
Mat::ones(3, 3, CV_32FC1), 1.0, map_x, map_y);
|
||||||
@ -448,9 +430,7 @@ PERF_TEST_P(DevInfo_Size_MatType_Interpolation, rotate, testing::Combine(testing
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst(size, type);
|
GpuMat dst(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
rotate(src, dst, size, 30.0, 0, 0, interpolation);
|
rotate(src, dst, size, 30.0, 0, 0, interpolation);
|
||||||
}
|
}
|
||||||
@ -479,9 +459,7 @@ PERF_TEST_P(DevInfo_Size_MatType_BorderMode, copyMakeBorder, testing::Combine(te
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
copyMakeBorder(src, dst, 5, 5, 5, 5, borderType);
|
copyMakeBorder(src, dst, 5, 5, 5, 5, borderType);
|
||||||
}
|
}
|
||||||
@ -507,9 +485,7 @@ PERF_TEST_P(DevInfo_Size, integralBuffered, testing::Combine(testing::ValuesIn(d
|
|||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
GpuMat buf;
|
GpuMat buf;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
integralBuffered(src, dst, buf);
|
integralBuffered(src, dst, buf);
|
||||||
}
|
}
|
||||||
@ -534,9 +510,7 @@ PERF_TEST_P(DevInfo_Size, integral, testing::Combine(testing::ValuesIn(devices()
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat sum, sqsum;
|
GpuMat sum, sqsum;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
integral(src, sum, sqsum);
|
integral(src, sum, sqsum);
|
||||||
}
|
}
|
||||||
@ -563,9 +537,7 @@ PERF_TEST_P(DevInfo_Size, sqrIntegral, testing::Combine(testing::ValuesIn(device
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
sqrIntegral(src, dst);
|
sqrIntegral(src, dst);
|
||||||
}
|
}
|
||||||
@ -590,9 +562,7 @@ PERF_TEST_P(DevInfo_Size, columnSum, testing::Combine(testing::ValuesIn(devices(
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
columnSum(src, dst);
|
columnSum(src, dst);
|
||||||
}
|
}
|
||||||
@ -624,9 +594,7 @@ PERF_TEST_P(DevInfo_MatType, cornerHarris, testing::Combine(testing::ValuesIn(de
|
|||||||
int ksize = 7;
|
int ksize = 7;
|
||||||
double k = 0.5;
|
double k = 0.5;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
cornerHarris(src, dst, Dx, Dy, blockSize, ksize, k);
|
cornerHarris(src, dst, Dx, Dy, blockSize, ksize, k);
|
||||||
}
|
}
|
||||||
@ -661,9 +629,7 @@ PERF_TEST_P(DevInfo_MatType, cornerMinEigenVal, testing::Combine(testing::Values
|
|||||||
int blockSize = 3;
|
int blockSize = 3;
|
||||||
int ksize = 7;
|
int ksize = 7;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
cornerMinEigenVal(src, dst, Dx, Dy, blockSize, ksize);
|
cornerMinEigenVal(src, dst, Dx, Dy, blockSize, ksize);
|
||||||
}
|
}
|
||||||
@ -696,9 +662,7 @@ PERF_TEST_P(DevInfo_Size_MatType, mulSpectrums, testing::Combine(testing::Values
|
|||||||
GpuMat b(b_host);
|
GpuMat b(b_host);
|
||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
mulSpectrums(a, b, dst, 0);
|
mulSpectrums(a, b, dst, 0);
|
||||||
}
|
}
|
||||||
@ -723,9 +687,9 @@ PERF_TEST_P(DevInfo_Size, dft, testing::Combine(testing::ValuesIn(devices()),
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
|
|
||||||
declare.time(2.0).iterations(100);
|
declare.time(2.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
dft(src, dst, size);
|
dft(src, dst, size);
|
||||||
}
|
}
|
||||||
@ -754,9 +718,9 @@ PERF_TEST_P(DevInfo_Int_Int, convolve, testing::Combine(testing::ValuesIn(device
|
|||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
ConvolveBuf buf;
|
ConvolveBuf buf;
|
||||||
|
|
||||||
declare.time(2.0).iterations(100);
|
declare.time(2.0);
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
convolve(image, templ, dst, false, buf);
|
convolve(image, templ, dst, false, buf);
|
||||||
}
|
}
|
||||||
@ -783,9 +747,7 @@ PERF_TEST_P(DevInfo_Size_MatType, pyrDown, testing::Combine(testing::ValuesIn(de
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
pyrDown(src, dst);
|
pyrDown(src, dst);
|
||||||
}
|
}
|
||||||
@ -812,9 +774,7 @@ PERF_TEST_P(DevInfo_Size_MatType, pyrUp, testing::Combine(testing::ValuesIn(devi
|
|||||||
GpuMat src(src_host);
|
GpuMat src(src_host);
|
||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
pyrUp(src, dst);
|
pyrUp(src, dst);
|
||||||
}
|
}
|
||||||
@ -845,9 +805,7 @@ PERF_TEST_P(DevInfo_Size_MatType, blendLinear, testing::Combine(testing::ValuesI
|
|||||||
GpuMat weights2(size, CV_32FC1, Scalar::all(0.5));
|
GpuMat weights2(size, CV_32FC1, Scalar::all(0.5));
|
||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
blendLinear(img1, img2, weights1, weights2, dst);
|
blendLinear(img1, img2, weights1, weights2, dst);
|
||||||
}
|
}
|
||||||
@ -870,9 +828,7 @@ PERF_TEST_P(DevInfo, Canny, testing::ValuesIn(devices()))
|
|||||||
GpuMat dst;
|
GpuMat dst;
|
||||||
CannyBuf buf;
|
CannyBuf buf;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
Canny(image, buf, dst, 50.0, 100.0);
|
Canny(image, buf, dst, 50.0, 100.0);
|
||||||
}
|
}
|
||||||
@ -898,9 +854,7 @@ PERF_TEST_P(DevInfo_Size, calcHist, testing::Combine(testing::ValuesIn(devices()
|
|||||||
GpuMat hist;
|
GpuMat hist;
|
||||||
GpuMat buf;
|
GpuMat buf;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
calcHist(src, hist, buf);
|
calcHist(src, hist, buf);
|
||||||
}
|
}
|
||||||
@ -927,9 +881,7 @@ PERF_TEST_P(DevInfo_Size, equalizeHist, testing::Combine(testing::ValuesIn(devic
|
|||||||
GpuMat hist;
|
GpuMat hist;
|
||||||
GpuMat buf;
|
GpuMat buf;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
equalizeHist(src, dst, hist, buf);
|
equalizeHist(src, dst, hist, buf);
|
||||||
}
|
}
|
||||||
|
@ -18,9 +18,7 @@ PERF_TEST_P(DevInfo_Size_MatType, merge, testing::Combine(testing::ValuesIn(devi
|
|||||||
|
|
||||||
GpuMat dst(size, CV_MAKETYPE(type, num_channels));
|
GpuMat dst(size, CV_MAKETYPE(type, num_channels));
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
merge(src, dst);
|
merge(src, dst);
|
||||||
}
|
}
|
||||||
@ -48,9 +46,7 @@ PERF_TEST_P(DevInfo_Size_MatType, split, testing::Combine(testing::ValuesIn(devi
|
|||||||
for (int i = 0; i < num_channels; ++i)
|
for (int i = 0; i < num_channels; ++i)
|
||||||
dst[i] = GpuMat(size, type);
|
dst[i] = GpuMat(size, type);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
split(src, dst);
|
split(src, dst);
|
||||||
}
|
}
|
||||||
@ -75,9 +71,7 @@ PERF_TEST_P(DevInfo_Size_MatType, setTo, testing::Combine(testing::ValuesIn(devi
|
|||||||
GpuMat src(size, type);
|
GpuMat src(size, type);
|
||||||
Scalar val(1, 2, 3, 4);
|
Scalar val(1, 2, 3, 4);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
src.setTo(val);
|
src.setTo(val);
|
||||||
}
|
}
|
||||||
@ -108,9 +102,7 @@ PERF_TEST_P(DevInfo_Size_MatType, setToMasked, testing::Combine(testing::ValuesI
|
|||||||
randu(mask_host, 0.0, 2.0);
|
randu(mask_host, 0.0, 2.0);
|
||||||
GpuMat mask(mask_host);
|
GpuMat mask(mask_host);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
src.setTo(val, mask);
|
src.setTo(val, mask);
|
||||||
}
|
}
|
||||||
@ -141,9 +133,7 @@ PERF_TEST_P(DevInfo_Size_MatType, copyToMasked, testing::Combine(testing::Values
|
|||||||
randu(mask_host, 0.0, 2.0);
|
randu(mask_host, 0.0, 2.0);
|
||||||
GpuMat mask(mask_host);
|
GpuMat mask(mask_host);
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
src.copyTo(dst, mask);
|
src.copyTo(dst, mask);
|
||||||
}
|
}
|
||||||
@ -175,9 +165,7 @@ PERF_TEST_P(DevInfo_Size_MatType_MatType, convertTo, testing::Combine(testing::V
|
|||||||
double a = 0.5;
|
double a = 0.5;
|
||||||
double b = 1.0;
|
double b = 1.0;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
TEST_CYCLE(100)
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
|
||||||
{
|
{
|
||||||
src.convertTo(dst, type2, a, b);
|
src.convertTo(dst, type2, a, b);
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,10 @@ PERF_TEST_P(DevInfo, HOGDescriptor, testing::ValuesIn(devices()))
|
|||||||
GpuMat img(img_host);
|
GpuMat img(img_host);
|
||||||
vector<Rect> found_locations;
|
vector<Rect> found_locations;
|
||||||
|
|
||||||
declare.time(0.5).iterations(100);
|
|
||||||
|
|
||||||
gpu::HOGDescriptor hog;
|
gpu::HOGDescriptor hog;
|
||||||
hog.setSVMDetector(gpu::HOGDescriptor::getDefaultPeopleDetector());
|
hog.setSVMDetector(gpu::HOGDescriptor::getDefaultPeopleDetector());
|
||||||
|
|
||||||
SIMPLE_TEST_CYCLE()
|
TEST_CYCLE(100)
|
||||||
{
|
{
|
||||||
hog.detectMultiScale(img, found_locations);
|
hog.detectMultiScale(img, found_locations);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user