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
c37acef0
Commit
c37acef0
authored
Oct 11, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3328 from ilya-lavrenov:warp_tests
parents
b4c3f465
faf91a46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
15 deletions
+27
-15
test_imgwarp_strict.cpp
modules/imgproc/test/test_imgwarp_strict.cpp
+27
-15
No files found.
modules/imgproc/test/test_imgwarp_strict.cpp
View file @
c37acef0
...
...
@@ -89,7 +89,7 @@ protected:
Size
randSize
(
RNG
&
rng
)
const
;
const
char
*
interpolation_to_string
(
int
inter_type
)
const
;
String
interpolation_to_string
(
int
inter_type
)
const
;
int
interpolation
;
Mat
src
;
...
...
@@ -109,21 +109,29 @@ CV_ImageWarpBaseTest::~CV_ImageWarpBaseTest()
{
}
const
char
*
CV_ImageWarpBaseTest
::
interpolation_to_string
(
int
inter
)
const
String
CV_ImageWarpBaseTest
::
interpolation_to_string
(
int
inter
)
const
{
bool
inverse
=
(
inter
&
WARP_INVERSE_MAP
)
!=
0
;
inter
&=
~
WARP_INVERSE_MAP
;
String
str
;
if
(
inter
==
INTER_NEAREST
)
return
"INTER_NEAREST"
;
if
(
inter
==
INTER_LINEAR
)
return
"INTER_LINEAR"
;
if
(
inter
==
INTER_AREA
)
return
"INTER_AREA"
;
if
(
inter
==
INTER_CUBIC
)
return
"INTER_CUBIC"
;
if
(
inter
==
INTER_LANCZOS4
)
return
"INTER_LANCZOS4"
;
if
(
inter
==
INTER_LANCZOS4
+
1
)
return
"INTER_AREA_FAST"
;
return
"Unsupported/Unkown interpolation type"
;
str
=
"INTER_NEAREST"
;
else
if
(
inter
==
INTER_LINEAR
)
str
=
"INTER_LINEAR"
;
else
if
(
inter
==
INTER_AREA
)
str
=
"INTER_AREA"
;
else
if
(
inter
==
INTER_CUBIC
)
str
=
"INTER_CUBIC"
;
else
if
(
inter
==
INTER_LANCZOS4
)
str
=
"INTER_LANCZOS4"
;
else
if
(
inter
==
INTER_LANCZOS4
+
1
)
str
=
"INTER_AREA_FAST"
;
if
(
inverse
)
str
+=
" | WARP_INVERSE_MAP"
;
return
str
.
empty
()
?
"Unsupported/Unkown interpolation type"
:
str
;
}
Size
CV_ImageWarpBaseTest
::
randSize
(
RNG
&
rng
)
const
...
...
@@ -271,7 +279,7 @@ void CV_ImageWarpBaseTest::validate_results() const
scale_x
=
cvRound
(
scale_x
);
}
PRINT_TO_LOG
(
"Interpolation: %s
\n
"
,
interpolation_to_string
(
area_fast
?
INTER_LANCZOS4
+
1
:
interpolation
));
PRINT_TO_LOG
(
"Interpolation: %s
\n
"
,
interpolation_to_string
(
area_fast
?
INTER_LANCZOS4
+
1
:
interpolation
)
.
c_str
()
);
PRINT_TO_LOG
(
"Scale (x, y): (%lf, %lf)
\n
"
,
scale_x
,
scale_y
);
PRINT_TO_LOG
(
"Elemsize: %d
\n
"
,
src
.
elemSize1
());
PRINT_TO_LOG
(
"Channels: %d
\n
"
,
cn
);
...
...
@@ -769,6 +777,10 @@ const char* CV_Remap_Test::borderType_to_string() const
return
"BORDER_REPLICATE"
;
if
(
borderType
==
BORDER_REFLECT
)
return
"BORDER_REFLECT"
;
if
(
borderType
==
BORDER_WRAP
)
return
"BORDER_WRAP"
;
if
(
borderType
==
BORDER_REFLECT_101
)
return
"BORDER_REFLECT_101"
;
return
"Unsupported/Unkown border type"
;
}
...
...
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