2011-11-24 19:39:35 +08:00
|
|
|
#include "perf_precomp.hpp"
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace cv;
|
|
|
|
using namespace perf;
|
|
|
|
using std::tr1::make_tuple;
|
|
|
|
using std::tr1::get;
|
|
|
|
|
2011-12-30 00:46:16 +08:00
|
|
|
PERF_TEST_P(Size_MatType, pyrDown, testing::Combine(
|
|
|
|
testing::Values(sz1080p, sz720p, szVGA, szQVGA, szODD),
|
|
|
|
testing::Values(CV_8UC1, CV_8UC3, CV_8UC4, CV_16SC1, CV_16SC3, CV_16SC4)
|
|
|
|
)
|
|
|
|
)
|
2011-11-24 19:39:35 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int matType = get<1>(GetParam());
|
|
|
|
|
|
|
|
Mat src(sz, matType);
|
2011-12-30 00:46:16 +08:00
|
|
|
Mat dst((sz.height + 1)/2, (sz.width + 1)/2, matType);
|
2011-11-24 19:39:35 +08:00
|
|
|
|
|
|
|
declare.in(src, WARMUP_RNG).out(dst);
|
|
|
|
|
2011-12-30 00:46:16 +08:00
|
|
|
TEST_CYCLE() pyrDown(src, dst);
|
2011-11-24 19:39:35 +08:00
|
|
|
|
|
|
|
SANITY_CHECK(dst);
|
|
|
|
}
|
|
|
|
|
2011-12-30 00:46:16 +08:00
|
|
|
PERF_TEST_P(Size_MatType, pyrUp, testing::Combine(
|
|
|
|
testing::Values(sz720p, szVGA, szQVGA, szODD),
|
|
|
|
testing::Values(CV_8UC1, CV_8UC3, CV_8UC4, CV_16SC1, CV_16SC3, CV_16SC4)
|
|
|
|
)
|
|
|
|
)
|
2011-11-24 19:39:35 +08:00
|
|
|
{
|
|
|
|
Size sz = get<0>(GetParam());
|
|
|
|
int matType = get<1>(GetParam());
|
|
|
|
|
|
|
|
Mat src(sz, matType);
|
|
|
|
Mat dst(sz.height*2, sz.width*2, matType);
|
|
|
|
|
|
|
|
declare.in(src, WARMUP_RNG).out(dst);
|
|
|
|
|
2011-12-30 00:46:16 +08:00
|
|
|
TEST_CYCLE() pyrUp(src, dst);
|
2011-11-24 19:39:35 +08:00
|
|
|
|
|
|
|
SANITY_CHECK(dst);
|
|
|
|
}
|