1 #include "perf_precomp.hpp" 2 3 using namespace std; 4 using namespace cv; 5 using namespace perf; 6 using std::tr1::make_tuple; 7 using std::tr1::get; 8 9 typedef std::tr1::tuple<Size, MatType, int> Size_Depth_Channels_t; 10 typedef perf::TestBaseWithParam<Size_Depth_Channels_t> Size_Depth_Channels; 11 12 PERF_TEST_P( Size_Depth_Channels, split, 13 testing::Combine 14 ( 15 testing::Values(TYPICAL_MAT_SIZES), 16 testing::Values(CV_8U, CV_16S, CV_32F, CV_64F), 17 testing::Values(2, 3, 4) 18 ) 19 ) 20 { 21 Size sz = get<0>(GetParam()); 22 int depth = get<1>(GetParam()); 23 int channels = get<2>(GetParam()); 24 25 Mat m(sz, CV_MAKETYPE(depth, channels)); 26 randu(m, 0, 255); 27 28 vector<Mat> mv; 29 int runs = (sz.width <= 640) ? 8 : 1; 30 TEST_CYCLE_MULTIRUN(runs) split(m, (vector<Mat>&)mv); 31 32 SANITY_CHECK(mv, 1e-12); 33 } 34