Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
7bea02c0
Commit
7bea02c0
authored
Sep 21, 2018
by
xiongyu
Browse files
update video reader test code
parent
a5529848
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tests/test_video.py
tests/test_video.py
+4
-4
No files found.
tests/test_video.py
View file @
7bea02c0
...
@@ -58,11 +58,11 @@ class TestVideo(object):
...
@@ -58,11 +58,11 @@ class TestVideo(object):
v
=
mmcv
.
VideoReader
(
self
.
video_path
)
v
=
mmcv
.
VideoReader
(
self
.
video_path
)
img
=
v
.
read
()
img
=
v
.
read
()
assert
int
(
round
(
img
.
mean
()))
==
94
assert
int
(
round
(
img
.
mean
()))
==
94
img
=
v
.
get_frame
(
6
4
)
img
=
v
.
get_frame
(
6
3
)
assert
int
(
round
(
img
.
mean
()))
==
94
assert
int
(
round
(
img
.
mean
()))
==
94
img
=
v
[
65
]
assert
int
(
round
(
img
.
mean
()))
==
205
img
=
v
[
64
]
img
=
v
[
64
]
assert
int
(
round
(
img
.
mean
()))
==
205
img
=
v
[
63
]
assert
int
(
round
(
img
.
mean
()))
==
94
assert
int
(
round
(
img
.
mean
()))
==
94
img
=
v
.
read
()
img
=
v
.
read
()
assert
int
(
round
(
img
.
mean
()))
==
205
assert
int
(
round
(
img
.
mean
()))
==
205
...
@@ -82,7 +82,7 @@ class TestVideo(object):
...
@@ -82,7 +82,7 @@ class TestVideo(object):
for
_
in
range
(
10
):
for
_
in
range
(
10
):
v
.
read
()
v
.
read
()
assert
v
.
position
==
10
assert
v
.
position
==
10
v
.
get_frame
(
100
)
v
.
get_frame
(
99
)
assert
v
.
position
==
100
assert
v
.
position
==
100
def
test_iterator
(
self
):
def
test_iterator
(
self
):
...
...
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