2017-04-14 18:35:07 +08:00
|
|
|
#include "perf_precomp.hpp"
|
|
|
|
|
2017-11-05 21:48:40 +08:00
|
|
|
namespace opencv_test { namespace {
|
2017-04-14 18:35:07 +08:00
|
|
|
using namespace perf;
|
|
|
|
|
|
|
|
typedef perf::TestBaseWithParam<Size> SizePrm;
|
|
|
|
|
|
|
|
PERF_TEST_P( SizePrm, LUT,
|
|
|
|
testing::Values(szQVGA, szVGA, sz1080p)
|
|
|
|
)
|
|
|
|
{
|
|
|
|
Size sz = GetParam();
|
|
|
|
|
|
|
|
int maxValue = 255;
|
|
|
|
|
|
|
|
Mat src(sz, CV_8UC1);
|
|
|
|
randu(src, 0, maxValue);
|
|
|
|
Mat lut(1, 256, CV_8UC1);
|
|
|
|
randu(lut, 0, maxValue);
|
|
|
|
Mat dst(sz, CV_8UC1);
|
|
|
|
|
|
|
|
TEST_CYCLE() LUT(src, lut, dst);
|
|
|
|
|
|
|
|
SANITY_CHECK(dst, 0.1);
|
|
|
|
}
|
2017-11-05 21:48:40 +08:00
|
|
|
|
|
|
|
}} // namespace
|