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
deee349b
Commit
deee349b
authored
Feb 15, 2012
by
Alexander Reshetnikov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed highgui video tests execution on macos; also minor code changes
parent
5af529c1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
7 deletions
+31
-7
test_framecount.cpp
modules/highgui/test/test_framecount.cpp
+6
-0
test_positioning.cpp
modules/highgui/test/test_positioning.cpp
+12
-0
test_video_io.cpp
modules/highgui/test/test_video_io.cpp
+13
-7
No files found.
modules/highgui/test/test_framecount.cpp
View file @
deee349b
...
...
@@ -55,6 +55,9 @@ public:
void
CV_FramecountTest
::
run
(
int
)
{
#if defined WIN32 || (defined __linux__ && !defined ANDROID)
#if !defined HAVE_GSTREAMER || defined HAVE_GSTREAMER_APP
const
int
time_sec
=
5
,
fps
=
25
;
const
string
ext
[]
=
{
"avi"
,
"mov"
,
"mp4"
,
"mpg"
,
"wmv"
};
...
...
@@ -123,6 +126,9 @@ void CV_FramecountTest::run(int)
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"
\n
Successfull experiments: %d (%d%%)
\n
"
,
n
-
failed
,
(
n
-
failed
)
*
100
/
n
);
ts
->
printf
(
cvtest
::
TS
::
LOG
,
"Failed experiments: %d (%d%%)
\n
"
,
failed
,
failed
*
100
/
n
);
#endif
#endif
}
TEST
(
HighguiFramecount
,
regression
)
{
CV_FramecountTest
test
;
test
.
safe_run
();}
modules/highgui/test/test_positioning.cpp
View file @
deee349b
...
...
@@ -209,12 +209,24 @@ void CV_VideoPositioningTest::run_test(int method)
void
CV_VideoProgressivePositioningTest
::
run
(
int
)
{
#if defined WIN32 || (defined __linux__ && !defined ANDROID)
#if !defined HAVE_GSTREAMER || defined HAVE_GSTREAMER_APP
run_test
(
PROGRESSIVE
);
#endif
#endif
}
void
CV_VideoRandomPositioningTest
::
run
(
int
)
{
#if defined WIN32 || (defined __linux__ && !defined ANDROID)
#if !defined HAVE_GSTREAMER || defined HAVE_GSTREAMER_APP
run_test
(
RANDOM
);
#endif
#endif
}
TEST
(
HighguiPositioning
,
progressive
)
{
CV_VideoProgressivePositioningTest
test
;
test
.
safe_run
();
}
...
...
modules/highgui/test/test_video_io.cpp
View file @
deee349b
...
...
@@ -403,8 +403,8 @@ void CV_HighGuiTest::SpecificVideoFileTest(const string& dir, const char codecch
if
(
img
.
empty
())
{
ts
->
printf
(
ts
->
LOG
,
"Creating a video in %s
\n
"
,
video_file
.
c_str
());
ts
->
printf
(
ts
->
LOG
,
"
Cannot read frame in %s
\n
"
,
(
ts
->
get_data_path
()
+
",,/python/images/QCIF_"
+
s_digit
.
str
()
+
"."
+
ext
[
j
]
).
c_str
());
ts
->
printf
(
ts
->
LOG
,
"Creating a video in %s
...
\n
"
,
video_file
.
c_str
());
ts
->
printf
(
ts
->
LOG
,
"
Error: cannot read frame from %s.
\n
"
,
(
ts
->
get_data_path
()
+
"../python/images/QCIF_"
+
s_digit
.
str
()
+
".bmp"
).
c_str
());
ts
->
printf
(
ts
->
LOG
,
"Continue creating the video file...
\n
"
);
ts
->
set_failed_test_info
(
ts
->
FAIL_INVALID_TEST_DATA
);
continue
;
...
...
@@ -426,7 +426,7 @@ void CV_HighGuiTest::SpecificVideoFileTest(const string& dir, const char codecch
if
(
!
writer
.
isOpened
())
{
ts
->
printf
(
ts
->
LOG
,
"Creating a video in %s
\n
"
,
video_file
.
c_str
());
ts
->
printf
(
ts
->
LOG
,
"Creating a video in %s
...
\n
"
,
video_file
.
c_str
());
ts
->
printf
(
ts
->
LOG
,
"Cannot create VideoWriter with codec %s.
\n
"
,
string
(
&
codecchars
[
0
],
4
).
c_str
());
ts
->
set_failed_test_info
(
ts
->
FAIL_MISMATCH
);
return
;
...
...
@@ -445,7 +445,7 @@ void CV_HighGuiTest::SpecificVideoFileTest(const string& dir, const char codecch
if
(
FRAME_COUNT
!=
IMAGE_COUNT
)
{
ts
->
printf
(
ts
->
LOG
,
"
\n
Frame count checking for video_%s.%s...
\n
"
,
string
(
&
codecchars
[
0
],
4
).
c_str
(),
ext
[
j
].
c_str
());
ts
->
printf
(
ts
->
LOG
,
"Video codec: %s
\n
.
"
,
string
(
&
codecchars
[
0
],
4
).
c_str
());
ts
->
printf
(
ts
->
LOG
,
"Video codec: %s
\n
"
,
string
(
&
codecchars
[
0
],
4
).
c_str
());
ts
->
printf
(
ts
->
LOG
,
"Required frame count: %d; Returned frame count: %d
\n
"
,
IMAGE_COUNT
,
FRAME_COUNT
);
ts
->
printf
(
ts
->
LOG
,
"Error: Incorrect frame count in the video.
\n
"
);
ts
->
set_failed_test_info
(
ts
->
FAIL_BAD_ACCURACY
);
...
...
@@ -459,7 +459,7 @@ void CV_HighGuiTest::SpecificVideoFileTest(const string& dir, const char codecch
cv
::
Mat
frame
;
cap
>>
frame
;
if
(
frame
.
empty
())
{
ts
->
printf
(
ts
->
LOG
,
"
\n
Error: cannot read the next frame with index %d
\n
"
,
i
+
1
);
ts
->
printf
(
ts
->
LOG
,
"
\n
Error: cannot read the next frame with index %d
.
\n
"
,
i
+
1
);
ts
->
set_failed_test_info
(
ts
->
FAIL_MISSING_TEST_DATA
);
break
;
}
...
...
@@ -472,7 +472,7 @@ void CV_HighGuiTest::SpecificVideoFileTest(const string& dir, const char codecch
if
(
img
.
empty
())
{
ts
->
printf
(
ts
->
LOG
,
"
\n
Error: cannot read an image with index %d
\n
"
,
i
+
1
);
ts
->
printf
(
ts
->
LOG
,
"
\n
Error: cannot read an image with index %d
.
\n
"
,
i
+
1
);
ts
->
set_failed_test_info
(
ts
->
FAIL_MISMATCH
);
break
;
}
...
...
@@ -526,7 +526,7 @@ void CV_HighGuiTest::SpecificVideoCameraTest(const string& dir, const char codec
{
ts
->
printf
(
ts
->
LOG
,
"
\n
Video file directory: %s
\n
"
,
dir
.
c_str
());
ts
->
printf
(
ts
->
LOG
,
"Video codec: %s
\n
"
,
std
::
string
(
&
codecchars
[
0
],
4
).
c_str
());
ts
->
printf
(
ts
->
LOG
,
"Error: cannot create VideoWriter object for video_%s.%s
\n
"
,
string
(
&
codecchars
[
0
]).
c_str
(),
ext
[
i
].
c_str
());
ts
->
printf
(
ts
->
LOG
,
"Error: cannot create VideoWriter object for video_%s.%s
.
\n
"
,
string
(
&
codecchars
[
0
]).
c_str
(),
ext
[
i
].
c_str
());
ts
->
set_failed_test_info
(
ts
->
FAIL_EXCEPTION
);
continue
;
}
...
...
@@ -652,6 +652,9 @@ void CV_VideoTest::run(int)
void
CV_SpecificVideoFileTest
::
run
(
int
)
{
#if defined WIN32 || (defined __linux__ && !defined ANDROID)
#if !defined HAVE_GSTREAMER || defined HAVE_GSTREAMER_APP
const
char
codecs
[][
4
]
=
{
{
'M'
,
'P'
,
'G'
,
'2'
},
{
'X'
,
'V'
,
'I'
,
'D'
},
{
'M'
,
'J'
,
'P'
,
'G'
},
...
...
@@ -663,6 +666,9 @@ void CV_SpecificVideoFileTest::run(int)
{
SpecificVideoFileTest
(
ts
->
get_data_path
(),
codecs
[
i
]);
}
#endif
#endif
}
void
CV_SpecificVideoCameraTest
::
run
(
int
)
...
...
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