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
e19a12f6
Commit
e19a12f6
authored
Oct 30, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3361 from mshabunin:fix-drawing
parents
cae89a7a
071e78d0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
9 deletions
+16
-9
test_drawing.cpp
modules/imgcodecs/test/test_drawing.cpp
+9
-5
test_grfmt.cpp
modules/imgcodecs/test/test_grfmt.cpp
+6
-3
test_basic_props.cpp
modules/videoio/test/test_basic_props.cpp
+1
-1
No files found.
modules/imgcodecs/test/test_drawing.cpp
View file @
e19a12f6
...
...
@@ -75,11 +75,12 @@ void CV_DrawingTest::run( int )
}
else
{
float
err
=
(
float
)
cvtest
::
norm
(
testImg
,
valImg
,
CV_RELATIVE_L1
);
float
Eps
=
0.9
f
;
// image should match exactly
float
err
=
(
float
)
cvtest
::
norm
(
testImg
,
valImg
,
NORM_L1
);
float
Eps
=
1
;
if
(
err
>
Eps
)
{
ts
->
printf
(
ts
->
LOG
,
"
CV_RELATIVE
_L1 between testImg and valImg is equal %f (larger than %f)
\n
"
,
err
,
Eps
);
ts
->
printf
(
ts
->
LOG
,
"
NORM
_L1 between testImg and valImg is equal %f (larger than %f)
\n
"
,
err
,
Eps
);
ts
->
set_failed_test_info
(
cvtest
::
TS
::
FAIL_BAD_ACCURACY
);
}
else
...
...
@@ -261,6 +262,7 @@ void CV_DrawingTest_C::draw( Mat& _img )
polyline
[
3
]
=
cvPoint
(
0
,
imgSize
.
height
);
CvPoint
*
pts
=
&
polyline
[
0
];
int
n
=
(
int
)
polyline
.
size
();
int
actualSize
=
0
;
cvFillPoly
(
&
img
,
&
pts
,
&
n
,
1
,
cvScalar
(
255
,
255
,
255
)
);
CvPoint
p1
=
cvPoint
(
1
,
1
),
p2
=
cvPoint
(
3
,
3
);
...
...
@@ -290,7 +292,8 @@ void CV_DrawingTest_C::draw( Mat& _img )
polyline
.
resize
(
9
);
pts
=
&
polyline
[
0
];
n
=
(
int
)
polyline
.
size
();
assert
(
cvEllipse2Poly
(
cvPoint
(
430
,
180
),
cvSize
(
100
,
150
),
30
,
0
,
150
,
&
polyline
[
0
],
20
)
==
n
);
actualSize
=
cvEllipse2Poly
(
cvPoint
(
430
,
180
),
cvSize
(
100
,
150
),
30
,
0
,
150
,
&
polyline
[
0
],
20
);
CV_Assert
(
actualSize
==
n
);
cvPolyLine
(
&
img
,
&
pts
,
&
n
,
1
,
false
,
cvScalar
(
0
,
0
,
150
),
4
,
CV_AA
);
n
=
0
;
for
(
vector
<
CvPoint
>::
const_iterator
it
=
polyline
.
begin
();
n
<
(
int
)
polyline
.
size
()
-
1
;
++
it
,
n
++
)
...
...
@@ -301,7 +304,8 @@ void CV_DrawingTest_C::draw( Mat& _img )
polyline
.
resize
(
19
);
pts
=
&
polyline
[
0
];
n
=
(
int
)
polyline
.
size
();
assert
(
cvEllipse2Poly
(
cvPoint
(
500
,
300
),
cvSize
(
50
,
80
),
0
,
0
,
180
,
&
polyline
[
0
],
10
)
==
n
);
actualSize
=
cvEllipse2Poly
(
cvPoint
(
500
,
300
),
cvSize
(
50
,
80
),
0
,
0
,
180
,
&
polyline
[
0
],
10
);
CV_Assert
(
actualSize
==
n
);
cvPolyLine
(
&
img
,
&
pts
,
&
n
,
1
,
true
,
Scalar
(
100
,
200
,
100
),
20
);
cvFillConvexPoly
(
&
img
,
pts
,
n
,
cvScalar
(
0
,
80
,
0
)
);
...
...
modules/imgcodecs/test/test_grfmt.cpp
View file @
e19a12f6
...
...
@@ -147,10 +147,13 @@ public:
CV_Assert
(
img
.
size
()
==
img_test
.
size
());
CV_Assert
(
img
.
type
()
==
img_test
.
type
());
double
n
=
cvtest
::
norm
(
img
,
img_test
,
NORM_L2
);
if
(
n
>
1.0
)
// JPEG format does not provide 100% accuracy
// using fuzzy image comparison
double
n
=
cvtest
::
norm
(
img
,
img_test
,
NORM_L1
);
double
expected
=
0.05
*
img
.
size
().
area
();
if
(
n
>
expected
)
{
ts
->
printf
(
ts
->
LOG
,
"norm = %f
\n
"
,
n
);
ts
->
printf
(
ts
->
LOG
,
"norm = %f
> expected = %f
\n
"
,
n
,
expected
);
ts
->
set_failed_test_info
(
ts
->
FAIL_MISMATCH
);
}
}
...
...
modules/videoio/test/test_basic_props.cpp
View file @
e19a12f6
...
...
@@ -108,7 +108,7 @@ TEST(Videoio_Video, actual_resolution)
}
}
TEST
(
Videoio_Video
,
prop_fps
)
TEST
(
Videoio_Video
,
DISABLED_
prop_fps
)
{
const
size_t
n
=
sizeof
(
ext
)
/
sizeof
(
ext
[
0
]);
const
string
src_dir
=
TS
::
ptr
()
->
get_data_path
();
...
...
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