Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/core/perf/perf_inRange.cpp
16354 views
1
#include "perf_precomp.hpp"
2
3
namespace opencv_test
4
{
5
using namespace perf;
6
7
#define TYPICAL_MAT_TYPES_INRANGE CV_8UC1, CV_8UC4, CV_8SC1, CV_16UC1, CV_16SC1, CV_32SC1, CV_32FC1, CV_32FC4
8
#define TYPICAL_MATS_INRANGE testing::Combine(testing::Values(szVGA, sz720p, sz1080p), testing::Values(TYPICAL_MAT_TYPES_INRANGE))
9
10
PERF_TEST_P(Size_MatType, inRange, TYPICAL_MATS_INRANGE)
11
{
12
Size size = get<0>(GetParam());
13
int type = get<1>(GetParam());
14
Mat src1(size, type);
15
Mat src2(size, type);
16
Mat src3(size, type);
17
Mat dst(size, type);
18
19
declare.in(src1, src2, src3, WARMUP_RNG).out(dst);
20
21
TEST_CYCLE() inRange( src1, src2, src3, dst );
22
23
SANITY_CHECK(dst);
24
}
25
26
} // namespace
27
28