Open Source Computer Vision Library https://opencv.org/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

96 lines
2.4 KiB

#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() { dst.setTo(cv::Scalar::all(0)); accumulate(src, dst); }
SANITY_CHECK(dst);
}
#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() { dst.setTo(cv::Scalar::all(0)); accumulateSquare(src, dst); }
SANITY_CHECK(dst);
}
#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() { dst.setTo(cv::Scalar::all(0)); accumulateWeighted(src, dst, 0.314); }
SANITY_CHECK(dst);
}