• Alexander Alekhin's avatar
    ts: refactor OpenCV tests · 4a297a24
    Alexander Alekhin authored
    - 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
    4a297a24
perf_lut.cpp 509 Bytes
#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