Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/core/perf/perf_split.cpp
16354 views
1
#include "perf_precomp.hpp"
2
3
namespace opencv_test
4
{
5
using namespace perf;
6
7
typedef tuple<Size, MatType, int> Size_Depth_Channels_t;
8
typedef perf::TestBaseWithParam<Size_Depth_Channels_t> Size_Depth_Channels;
9
10
PERF_TEST_P( Size_Depth_Channels, split,
11
testing::Combine
12
(
13
testing::Values(TYPICAL_MAT_SIZES),
14
testing::Values(CV_8U, CV_16S, CV_32F, CV_64F),
15
testing::Values(2, 3, 4)
16
)
17
)
18
{
19
Size sz = get<0>(GetParam());
20
int depth = get<1>(GetParam());
21
int channels = get<2>(GetParam());
22
23
Mat m(sz, CV_MAKETYPE(depth, channels));
24
randu(m, 0, 255);
25
26
vector<Mat> mv;
27
int runs = (sz.width <= 640) ? 8 : 1;
28
TEST_CYCLE_MULTIRUN(runs) split(m, (vector<Mat>&)mv);
29
30
SANITY_CHECK(mv, 2e-5);
31
}
32
33
} // namespace
34
35