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
22fcbaed
Commit
22fcbaed
authored
May 31, 2017
by
Vitaly Tuzov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added performance test for nearest neighbor resize
parent
cc547e82
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 @
22fcbaed
...
...
@@ -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