Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
a08044d6
Commit
a08044d6
authored
Sep 25, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8833 from terfendail:resizenn_perftest
parents
aea25e7f
22fcbaed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
perf_resize.cpp
modules/imgproc/perf/perf_resize.cpp
+28
-0
No files found.
modules/imgproc/perf/perf_resize.cpp
View file @
a08044d6
...
...
@@ -120,3 +120,31 @@ PERF_TEST_P(MatInfo_Size_Scale_Area, ResizeArea,
//difference equal to 1 is allowed because of different possible rounding modes: round-to-nearest vs bankers' rounding
SANITY_CHECK
(
dst
,
1
);
}
typedef
MatInfo_Size_Scale_Area
MatInfo_Size_Scale_NN
;
PERF_TEST_P
(
MatInfo_Size_Scale_NN
,
ResizeNN
,
testing
::
Combine
(
testing
::
Values
(
CV_8UC1
,
CV_8UC2
,
CV_8UC4
),
testing
::
Values
(
szVGA
,
szqHD
,
sz720p
,
sz1080p
,
sz2160p
),
testing
::
Values
(
2.4
,
3.4
,
1.3
)
)
)
{
int
matType
=
get
<
0
>
(
GetParam
());
Size
from
=
get
<
1
>
(
GetParam
());
double
scale
=
get
<
2
>
(
GetParam
());
cv
::
Mat
src
(
from
,
matType
);
Size
to
(
cvRound
(
from
.
width
*
scale
),
cvRound
(
from
.
height
*
scale
));
cv
::
Mat
dst
(
to
,
matType
);
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
dst
);
declare
.
time
(
100
);
TEST_CYCLE
()
resize
(
src
,
dst
,
dst
.
size
(),
0
,
0
,
INTER_NEAREST
);
EXPECT_GT
(
countNonZero
(
dst
.
reshape
(
1
)),
0
);
SANITY_CHECK_NOTHING
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment