1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#include "perf_precomp.hpp"
using namespace std;
using namespace cv;
using namespace perf;
using std::tr1::get;
#ifdef HAVE_OPENVX
PERF_TEST_P(Size_MatType, Accumulate,
testing::Combine(
testing::Values(::perf::szODD, ::perf::szQVGA, ::perf::szVGA, ::perf::sz1080p),
testing::Values(CV_16SC1, CV_32FC1)
)
)
#else
PERF_TEST_P( Size_MatType, Accumulate,
testing::Combine(
testing::Values(::perf::szODD, ::perf::szQVGA, ::perf::szVGA, ::perf::sz1080p),
testing::Values(CV_32FC1)
)
)
#endif
{
Size sz = get<0>(GetParam());
int dstType = get<1>(GetParam());
Mat src(sz, CV_8UC1);
Mat dst(sz, dstType);
declare.time(100);
declare.in(src, WARMUP_RNG).out(dst);
TEST_CYCLE() accumulate(src, dst);
SANITY_CHECK_NOTHING();
}
#ifdef HAVE_OPENVX
PERF_TEST_P(Size_MatType, AccumulateSquare,
testing::Combine(
testing::Values(::perf::szODD, ::perf::szQVGA, ::perf::szVGA, ::perf::sz1080p),
testing::Values(CV_16SC1, CV_32FC1)
)
)
#else
PERF_TEST_P( Size_MatType, AccumulateSquare,
testing::Combine(
testing::Values(::perf::szODD, ::perf::szQVGA, ::perf::szVGA, ::perf::sz1080p),
testing::Values(CV_32FC1)
)
)
#endif
{
Size sz = get<0>(GetParam());
int dstType = get<1>(GetParam());
Mat src(sz, CV_8UC1);
Mat dst(sz, dstType);
declare.time(100);
declare.in(src, WARMUP_RNG).out(dst);
TEST_CYCLE() accumulateSquare(src, dst);
SANITY_CHECK_NOTHING();
}
#ifdef HAVE_OPENVX
PERF_TEST_P(Size_MatType, AccumulateWeighted,
testing::Combine(
testing::Values(::perf::szODD, ::perf::szQVGA, ::perf::szVGA, ::perf::sz1080p),
testing::Values(CV_8UC1, CV_32FC1)
)
)
#else
PERF_TEST_P( Size_MatType, AccumulateWeighted,
testing::Combine(
testing::Values(::perf::szODD, ::perf::szQVGA, ::perf::szVGA, ::perf::sz1080p),
testing::Values(CV_32FC1)
)
)
#endif
{
Size sz = get<0>(GetParam());
int dstType = get<1>(GetParam());
Mat src(sz, CV_8UC1);
Mat dst(sz, dstType);
declare.time(100);
declare.in(src, WARMUP_RNG).out(dst);
TEST_CYCLE() accumulateWeighted(src, dst, 0.314);
SANITY_CHECK_NOTHING();
}