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
5ab3fe48
Commit
5ab3fe48
authored
Sep 17, 2012
by
Ilya Lavrenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed resize_area test
parent
7e358388
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
test_imgwarp.cpp
modules/imgproc/test/test_imgwarp.cpp
+6
-3
No files found.
modules/imgproc/test/test_imgwarp.cpp
View file @
5ab3fe48
...
@@ -1494,7 +1494,7 @@ TEST(Imgproc_resize_area, regression)
...
@@ -1494,7 +1494,7 @@ TEST(Imgproc_resize_area, regression)
cv
::
Mat
expected
(
5
,
5
,
CV_16UC1
,
expected_data
);
cv
::
Mat
expected
(
5
,
5
,
CV_16UC1
,
expected_data
);
cv
::
Mat
actual
(
expected
.
size
(),
expected
.
type
());
cv
::
Mat
actual
(
expected
.
size
(),
expected
.
type
());
cv
::
resize
(
src
,
actual
,
actual
.
size
(),
0.0
,
0.0
,
INTER_AREA
);
cv
::
resize
(
src
,
actual
,
cv
::
Size
(),
0.3
,
0.3
,
INTER_AREA
);
ASSERT_EQ
(
actual
.
type
(),
expected
.
type
());
ASSERT_EQ
(
actual
.
type
(),
expected
.
type
());
ASSERT_EQ
(
actual
.
size
(),
expected
.
size
());
ASSERT_EQ
(
actual
.
size
(),
expected
.
size
());
...
@@ -1504,12 +1504,13 @@ TEST(Imgproc_resize_area, regression)
...
@@ -1504,12 +1504,13 @@ TEST(Imgproc_resize_area, regression)
int
elem_diff
=
1.0
f
;
int
elem_diff
=
1.0
f
;
Size
dsize
=
actual
.
size
();
Size
dsize
=
actual
.
size
();
for
(
int
dy
=
0
;
dy
<
dsize
.
height
;
++
dy
)
bool
next
=
true
;
for
(
int
dy
=
0
;
dy
<
dsize
.
height
&&
next
;
++
dy
)
{
{
ushort
*
eD
=
expected
.
ptr
<
ushort
>
(
dy
);
ushort
*
eD
=
expected
.
ptr
<
ushort
>
(
dy
);
ushort
*
aD
=
actual
.
ptr
<
ushort
>
(
dy
);
ushort
*
aD
=
actual
.
ptr
<
ushort
>
(
dy
);
for
(
int
dx
=
0
;
dx
<
dsize
.
width
;
++
dx
)
for
(
int
dx
=
0
;
dx
<
dsize
.
width
&&
next
;
++
dx
)
if
(
fabs
(
static_cast
<
float
>
(
aD
[
dx
]
-
eD
[
dx
]))
>
elem_diff
)
if
(
fabs
(
static_cast
<
float
>
(
aD
[
dx
]
-
eD
[
dx
]))
>
elem_diff
)
{
{
cvtest
::
TS
::
ptr
()
->
printf
(
cvtest
::
TS
::
SUMMARY
,
"Inf norm: %f
\n
"
,
static_cast
<
float
>
(
norm
(
actual
,
expected
,
NORM_INF
)));
cvtest
::
TS
::
ptr
()
->
printf
(
cvtest
::
TS
::
SUMMARY
,
"Inf norm: %f
\n
"
,
static_cast
<
float
>
(
norm
(
actual
,
expected
,
NORM_INF
)));
...
@@ -1521,6 +1522,8 @@ TEST(Imgproc_resize_area, regression)
...
@@ -1521,6 +1522,8 @@ TEST(Imgproc_resize_area, regression)
std
::
cout
<<
"actual result:
\n
"
<<
actual
(
Range
(
rmin
,
rmax
),
Range
(
cmin
,
cmax
))
<<
std
::
endl
;
std
::
cout
<<
"actual result:
\n
"
<<
actual
(
Range
(
rmin
,
rmax
),
Range
(
cmin
,
cmax
))
<<
std
::
endl
;
std
::
cout
<<
"expected result:
\n
"
<<
expected
(
Range
(
rmin
,
rmax
),
Range
(
cmin
,
cmax
))
<<
std
::
endl
;
std
::
cout
<<
"expected result:
\n
"
<<
expected
(
Range
(
rmin
,
rmax
),
Range
(
cmin
,
cmax
))
<<
std
::
endl
;
next
=
false
;
}
}
}
}
...
...
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