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
683be581
Commit
683be581
authored
Dec 29, 2011
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added perf test for INTER_AREA resize
parent
7fafa3b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
2 deletions
+31
-2
perf_geometric_transformations.cpp
modules/imgproc/perf/perf_geometric_transformations.cpp
+31
-2
No files found.
modules/imgproc/perf/perf_geometric_transformations.cpp
View file @
683be581
...
...
@@ -24,7 +24,7 @@ PERF_TEST_P(MatInfo_Size_Size, resizeUpLinear,
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
dst
);
TEST_CYCLE
(
100
)
cv
::
resize
(
src
,
dst
,
to
);
SIMPLE_TEST_CYCLE
(
)
cv
::
resize
(
src
,
dst
,
to
);
SANITY_CHECK
(
dst
,
1
+
1e-6
);
}
...
...
@@ -48,8 +48,37 @@ PERF_TEST_P(MatInfo_Size_Size, resizeDownLinear,
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
dst
);
TEST_CYCLE
(
100
)
cv
::
resize
(
src
,
dst
,
to
);
SIMPLE_TEST_CYCLE
(
)
cv
::
resize
(
src
,
dst
,
to
);
SANITY_CHECK
(
dst
,
1
+
1e-6
);
}
typedef
tr1
::
tuple
<
MatType
,
Size
,
int
>
MatInfo_Size_Scale_t
;
typedef
TestBaseWithParam
<
MatInfo_Size_Scale_t
>
MatInfo_Size_Scale
;
PERF_TEST_P
(
MatInfo_Size_Scale
,
resizeAreaFast
,
testing
::
Combine
(
testing
::
Values
(
CV_8UC1
,
CV_8UC4
),
testing
::
Values
(
szVGA
,
szqHD
,
sz720p
,
sz1080p
),
testing
::
Values
(
2
,
4
)
)
)
{
int
matType
=
tr1
::
get
<
0
>
(
GetParam
());
Size
from
=
tr1
::
get
<
1
>
(
GetParam
());
int
scale
=
tr1
::
get
<
2
>
(
GetParam
());
from
.
width
=
(
from
.
width
/
scale
)
*
scale
;
from
.
height
=
(
from
.
height
/
scale
)
*
scale
;
cv
::
Mat
src
(
from
,
matType
);
cv
::
Mat
dst
(
from
.
height
/
scale
,
from
.
width
/
scale
,
matType
);
declare
.
in
(
src
,
WARMUP_RNG
).
out
(
dst
);
SIMPLE_TEST_CYCLE
()
cv
::
resize
(
src
,
dst
,
dst
.
size
(),
0
,
0
,
INTER_AREA
);
//difference equal to 1 is allowed because of different possible rounding modes: round-to-nearest vs bankers' rounding
SANITY_CHECK
(
dst
,
1
);
}
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