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
997dded1
Commit
997dded1
authored
Jan 06, 2015
by
Tzafrir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add default file to load in case sample was run without command line arguments
parent
28833421
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
16 deletions
+37
-16
farneback_optical_flow.cpp
samples/gpu/farneback_optical_flow.cpp
+2
-2
hog.cpp
samples/gpu/hog.cpp
+11
-3
opengl.cpp
samples/gpu/opengl.cpp
+9
-3
optical_flow.cpp
samples/gpu/optical_flow.cpp
+13
-6
pyrlk_optical_flow.cpp
samples/gpu/pyrlk_optical_flow.cpp
+2
-2
No files found.
samples/gpu/farneback_optical_flow.cpp
View file @
997dded1
...
...
@@ -44,8 +44,8 @@ static void colorizeFlow(const Mat &u, const Mat &v, Mat &dst)
int
main
(
int
argc
,
char
**
argv
)
{
CommandLineParser
cmd
(
argc
,
argv
,
"{ l left | | specify left image }"
"{ r right | | specify right image }"
"{ l left |
../data/basketball1.png
| specify left image }"
"{ r right |
../data/basketball2.png
| specify right image }"
"{ h help | | print help message }"
);
cmd
.
about
(
"Farneback's optical flow sample."
);
...
...
samples/gpu/hog.cpp
View file @
997dded1
...
...
@@ -115,11 +115,19 @@ int main(int argc, char** argv)
{
try
{
Args
args
;
if
(
argc
<
2
)
{
printHelp
();
Args
args
=
Args
::
read
(
argc
,
argv
);
if
(
help_showed
)
return
-
1
;
args
.
camera_id
=
0
;
args
.
src_is_camera
=
true
;
}
else
{
args
=
Args
::
read
(
argc
,
argv
);
if
(
help_showed
)
return
-
1
;
}
App
app
(
args
);
app
.
run
();
}
...
...
samples/gpu/opengl.cpp
View file @
997dded1
...
...
@@ -14,6 +14,9 @@ int main()
#define NOMINMAX 1
#include <windows.h>
#endif
#if defined(_WIN64)
#include <windows.h>
#endif
#if defined(__APPLE__)
#include <OpenGL/gl.h>
...
...
@@ -55,16 +58,19 @@ void draw(void* userdata)
int
main
(
int
argc
,
char
*
argv
[])
{
string
filename
;
if
(
argc
<
2
)
{
cout
<<
"Usage: "
<<
argv
[
0
]
<<
" image"
<<
endl
;
return
-
1
;
filename
=
"../data/lena.jpg"
;
}
else
filename
=
argv
[
1
];
Mat
img
=
imread
(
argv
[
1
]
);
Mat
img
=
imread
(
filename
);
if
(
img
.
empty
())
{
cerr
<<
"Can't open image "
<<
argv
[
1
]
<<
endl
;
cerr
<<
"Can't open image "
<<
filename
<<
endl
;
return
-
1
;
}
...
...
samples/gpu/optical_flow.cpp
View file @
997dded1
...
...
@@ -135,23 +135,30 @@ static void showFlow(const char* name, const GpuMat& d_flowx, const GpuMat& d_fl
int
main
(
int
argc
,
const
char
*
argv
[])
{
string
filename1
,
filename2
;
if
(
argc
<
3
)
{
cerr
<<
"Usage : "
<<
argv
[
0
]
<<
"<frame0> <frame1>"
<<
endl
;
return
-
1
;
cerr
<<
"Usage : "
<<
argv
[
0
]
<<
" <frame0> <frame1>"
<<
endl
;
filename1
=
"../data/basketball1.png"
;
filename2
=
"../data/basketball2.png"
;
}
else
{
filename1
=
argv
[
1
];
filename2
=
argv
[
2
];
}
Mat
frame0
=
imread
(
argv
[
1
]
,
IMREAD_GRAYSCALE
);
Mat
frame1
=
imread
(
argv
[
2
]
,
IMREAD_GRAYSCALE
);
Mat
frame0
=
imread
(
filename1
,
IMREAD_GRAYSCALE
);
Mat
frame1
=
imread
(
filename2
,
IMREAD_GRAYSCALE
);
if
(
frame0
.
empty
())
{
cerr
<<
"Can't open image ["
<<
argv
[
1
]
<<
"]"
<<
endl
;
cerr
<<
"Can't open image ["
<<
filename1
<<
"]"
<<
endl
;
return
-
1
;
}
if
(
frame1
.
empty
())
{
cerr
<<
"Can't open image ["
<<
argv
[
2
]
<<
"]"
<<
endl
;
cerr
<<
"Can't open image ["
<<
filename2
<<
"]"
<<
endl
;
return
-
1
;
}
...
...
samples/gpu/pyrlk_optical_flow.cpp
View file @
997dded1
...
...
@@ -119,8 +119,8 @@ int main(int argc, const char* argv[])
{
const
char
*
keys
=
"{ h help | | print help message }"
"{ l left | | specify left image }"
"{ r right | | specify right image }"
"{ l left |
../data/pic1.png
| specify left image }"
"{ r right |
../data/pic2.png
| specify right image }"
"{ gray | | use grayscale sources [PyrLK Sparse] }"
"{ win_size | 21 | specify windows size [PyrLK] }"
"{ max_level | 3 | specify max level [PyrLK] }"
...
...
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