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
6b4304ef
Commit
6b4304ef
authored
Jan 31, 2013
by
cuda-geek
Committed by
OpenCV Buildbot
Jan 31, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #388 from ivan-korolev:fix_cmd_line_parsing_in_samples
parents
57d3152c
36451319
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
11 deletions
+11
-11
brief_match_test.cpp
samples/cpp/brief_match_test.cpp
+2
-2
camshiftdemo.cpp
samples/cpp/camshiftdemo.cpp
+1
-1
chamfer.cpp
samples/cpp/chamfer.cpp
+2
-2
connected_components.cpp
samples/cpp/connected_components.cpp
+1
-1
demhist.cpp
samples/cpp/demhist.cpp
+1
-1
dft.cpp
samples/cpp/dft.cpp
+1
-1
distrans.cpp
samples/cpp/distrans.cpp
+1
-1
edge.cpp
samples/cpp/edge.cpp
+1
-1
videostab.cpp
samples/cpp/videostab.cpp
+1
-1
No files found.
samples/cpp/brief_match_test.cpp
View file @
6b4304ef
...
...
@@ -62,8 +62,8 @@ int main(int argc, const char ** argv)
help
();
CommandLineParser
parser
(
argc
,
argv
,
keys
);
string
im1_name
=
parser
.
get
<
string
>
(
1
);
string
im2_name
=
parser
.
get
<
string
>
(
2
);
string
im1_name
=
parser
.
get
<
string
>
(
0
);
string
im2_name
=
parser
.
get
<
string
>
(
1
);
Mat
im1
=
imread
(
im1_name
,
CV_LOAD_IMAGE_GRAYSCALE
);
Mat
im2
=
imread
(
im2_name
,
CV_LOAD_IMAGE_GRAYSCALE
);
...
...
samples/cpp/camshiftdemo.cpp
View file @
6b4304ef
...
...
@@ -77,7 +77,7 @@ int main( int argc, const char** argv )
float
hranges
[]
=
{
0
,
180
};
const
float
*
phranges
=
hranges
;
CommandLineParser
parser
(
argc
,
argv
,
keys
);
int
camNum
=
parser
.
get
<
int
>
(
1
);
int
camNum
=
parser
.
get
<
int
>
(
0
);
cap
.
open
(
camNum
);
...
...
samples/cpp/chamfer.cpp
View file @
6b4304ef
...
...
@@ -29,8 +29,8 @@ int main( int argc, const char** argv )
help
();
CommandLineParser
parser
(
argc
,
argv
,
keys
);
string
image
=
parser
.
get
<
string
>
(
1
);
string
templ
=
parser
.
get
<
string
>
(
2
);
string
image
=
parser
.
get
<
string
>
(
0
);
string
templ
=
parser
.
get
<
string
>
(
1
);
Mat
img
=
imread
(
image
.
c_str
(),
0
);
Mat
tpl
=
imread
(
templ
.
c_str
(),
0
);
...
...
samples/cpp/connected_components.cpp
View file @
6b4304ef
...
...
@@ -48,7 +48,7 @@ int main( int argc, const char** argv )
{
help
();
CommandLineParser
parser
(
argc
,
argv
,
keys
);
string
inputImage
=
parser
.
get
<
string
>
(
"@image"
);
string
inputImage
=
parser
.
get
<
string
>
(
0
);
img
=
imread
(
inputImage
.
c_str
(),
0
);
if
(
img
.
empty
())
...
...
samples/cpp/demhist.cpp
View file @
6b4304ef
...
...
@@ -70,7 +70,7 @@ int main( int argc, const char** argv )
help
();
CommandLineParser
parser
(
argc
,
argv
,
keys
);
string
inputImage
=
parser
.
get
<
string
>
(
1
);
string
inputImage
=
parser
.
get
<
string
>
(
0
);
// Load the source image. HighGUI use.
image
=
imread
(
inputImage
,
0
);
...
...
samples/cpp/dft.cpp
View file @
6b4304ef
...
...
@@ -24,7 +24,7 @@ int main(int argc, const char ** argv)
{
help
();
CommandLineParser
parser
(
argc
,
argv
,
keys
);
string
filename
=
parser
.
get
<
string
>
(
1
);
string
filename
=
parser
.
get
<
string
>
(
0
);
Mat
img
=
imread
(
filename
.
c_str
(),
CV_LOAD_IMAGE_GRAYSCALE
);
if
(
img
.
empty
()
)
...
...
samples/cpp/distrans.cpp
View file @
6b4304ef
...
...
@@ -111,7 +111,7 @@ int main( int argc, const char** argv )
{
help
();
CommandLineParser
parser
(
argc
,
argv
,
keys
);
string
filename
=
parser
.
get
<
string
>
(
1
);
string
filename
=
parser
.
get
<
string
>
(
0
);
gray
=
imread
(
filename
.
c_str
(),
0
);
if
(
gray
.
empty
())
{
...
...
samples/cpp/edge.cpp
View file @
6b4304ef
...
...
@@ -39,7 +39,7 @@ int main( int argc, const char** argv )
help
();
CommandLineParser
parser
(
argc
,
argv
,
keys
);
string
filename
=
parser
.
get
<
string
>
(
1
);
string
filename
=
parser
.
get
<
string
>
(
0
);
image
=
imread
(
filename
,
1
);
if
(
image
.
empty
())
...
...
samples/cpp/videostab.cpp
View file @
6b4304ef
...
...
@@ -356,7 +356,7 @@ int main(int argc, const char **argv)
// check if source video is specified
string
inputPath
=
arg
(
"1"
);
string
inputPath
=
arg
(
0
);
if
(
inputPath
.
empty
())
throw
runtime_error
(
"specify video file 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