mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 19:20:28 +08:00
4a297a2443
- 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
28 lines
509 B
C++
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
|