1
#include "perf_precomp.hpp"
6
using std::tr1::make_tuple;
9
CV_ENUM(InpaintingMethod, INPAINT_NS, INPAINT_TELEA)
10
typedef std::tr1::tuple<Size, InpaintingMethod> InpaintArea_InpaintingMethod_t;
11
typedef perf::TestBaseWithParam<InpaintArea_InpaintingMethod_t> InpaintArea_InpaintingMethod;
14
PERF_TEST_P(InpaintArea_InpaintingMethod, inpaint,
16
testing::Values(::perf::szSmall24, ::perf::szSmall32, ::perf::szSmall64),
17
InpaintingMethod::all()
21
Mat src = imread(getDataPath("gpu/hog/road.png"));
23
Size sz = get<0>(GetParam());
24
int inpaintingMethod = get<1>(GetParam());
26
Mat mask(src.size(), CV_8UC1, Scalar(0));
27
Mat result(src.size(), src.type());
29
Rect inpaintArea(src.cols/3, src.rows/3, sz.width, sz.height);
30
mask(inpaintArea).setTo(255);
32
declare.in(src, mask).out(result).time(120);
34
TEST_CYCLE() inpaint(src, mask, result, 10.0, inpaintingMethod);
36
Mat inpaintedArea = result(inpaintArea);
37
SANITY_CHECK(inpaintedArea);