opencv/modules/core/perf/perf_lut.cpp
Alexander Alekhin 4a297a2443 ts: refactor OpenCV tests
- removed tr1 usage (dropped in C++17)
- moved includes of vector/map/iostream/limits into ts.hpp
- require opencv_test + anonymous namespace (added compile check)
- fixed norm() usage (must be from cvtest::norm for checks) and other conflict functions
- added missing license headers
2018-02-03 19:39:47 +00:00

28 lines
509 B
C++

#include "perf_precomp.hpp"
namespace opencv_test { namespace {
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);
}
}} // namespace