mirror of
https://gitcode.com/gh_mirrors/es/esp32-opencv.git
synced 2025-08-14 18:50:49 +08:00
initial commit
This commit is contained in:
27
modules/core/perf/perf_lut.cpp
Normal file
27
modules/core/perf/perf_lut.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#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
|
Reference in New Issue
Block a user