Skip to content

Commit a25c443

Browse files
author
elenagvo
committed
add perf test for boxFilter CV8U to CV16U
1 parent c2c7333 commit a25c443

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

modules/imgproc/perf/perf_blur.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ typedef perf::TestBaseWithParam<Size_MatType_BorderType3x3_t> Size_MatType_Borde
4343
typedef std::tr1::tuple<Size, MatType, BorderType> Size_MatType_BorderType_t;
4444
typedef perf::TestBaseWithParam<Size_MatType_BorderType_t> Size_MatType_BorderType;
4545

46+
typedef std::tr1::tuple<Size, int, BorderType3x3> Size_ksize_BorderType_t;
47+
typedef perf::TestBaseWithParam<Size_ksize_BorderType_t> Size_ksize_BorderType;
48+
4649
PERF_TEST_P(Size_MatType_BorderType3x3, gaussianBlur3x3,
4750
testing::Combine(
4851
testing::Values(szODD, szQVGA, szVGA, sz720p),
@@ -134,6 +137,28 @@ PERF_TEST_P(Size_MatType_BorderType3x3, box3x3,
134137
SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE);
135138
}
136139

140+
PERF_TEST_P(Size_ksize_BorderType, box_CV8U_CV16U,
141+
testing::Combine(
142+
testing::Values(szODD, szQVGA, szVGA, sz720p),
143+
testing::Values(3, 5, 15),
144+
BorderType3x3::all()
145+
)
146+
)
147+
{
148+
Size size = get<0>(GetParam());
149+
int ksize = get<1>(GetParam());
150+
BorderType3x3 btype = get<2>(GetParam());
151+
152+
Mat src(size, CV_8UC1);
153+
Mat dst(size, CV_16UC1);
154+
155+
declare.in(src, WARMUP_RNG).out(dst);
156+
157+
TEST_CYCLE() boxFilter(src, dst, CV_16UC1, Size(ksize, ksize), Point(-1,-1), false, btype);
158+
159+
SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE);
160+
}
161+
137162
PERF_TEST_P(Size_MatType_BorderType3x3, box3x3_inplace,
138163
testing::Combine(
139164
testing::Values(szODD, szQVGA, szVGA, sz720p),

0 commit comments

Comments
 (0)