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
dlib
Commits
f7165919
Commit
f7165919
authored
Nov 12, 2012
by
Davis King
Browse files
Simplified example programs
parent
44be25e1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
14 deletions
+3
-14
examples/bsp_ex.cpp
examples/bsp_ex.cpp
+1
-3
examples/compress_stream_ex.cpp
examples/compress_stream_ex.cpp
+1
-8
examples/train_object_detector.cpp
examples/train_object_detector.cpp
+1
-3
No files found.
examples/bsp_ex.cpp
View file @
f7165919
...
...
@@ -17,8 +17,6 @@
#include <iostream>
typedef
dlib
::
cmd_line_parser
<
char
>::
check_1a_c
clp_parser
;
using
namespace
std
;
using
namespace
dlib
;
...
...
@@ -105,7 +103,7 @@ int main(int argc, char** argv)
{
try
{
c
lp
_parser
parser
;
c
ommand_line
_parser
parser
;
parser
.
add_option
(
"h"
,
"Display this help message."
);
parser
.
add_option
(
"l"
,
"Run as a listening BSP node."
,
1
);
...
...
examples/compress_stream_ex.cpp
View file @
f7165919
...
...
@@ -36,13 +36,6 @@ typedef dlib::compress_stream::kernel_1da cs1;
typedef
dlib
::
compress_stream
::
kernel_1ea
cs2
;
typedef
dlib
::
compress_stream
::
kernel_1ec
cs3
;
// Here I am making another typedef, this time for the version of
// cmd_line_parser I want to use. This version gives me a
// command line parser object that has all the available extensions
// for command line parsers applied to it. So I will be able to use
// its command line validation utilities as well as option printing.
typedef
dlib
::
cmd_line_parser
<
char
>::
check_1a_c
clp
;
using
namespace
std
;
using
namespace
dlib
;
...
...
@@ -52,7 +45,7 @@ int main(int argc, char** argv)
{
try
{
c
lp
parser
;
c
ommand_line_parser
parser
;
// first I will define the command line options I want.
// Add a -c option and tell the parser what the option is for.
...
...
examples/train_object_detector.cpp
View file @
f7165919
...
...
@@ -77,15 +77,13 @@
using
namespace
std
;
using
namespace
dlib
;
typedef
dlib
::
cmd_line_parser
<
char
>::
check_1a_c
clp_type
;
// ----------------------------------------------------------------------------------------
int
main
(
int
argc
,
char
**
argv
)
{
try
{
c
lp_type
parser
;
c
ommand_line_parser
parser
;
parser
.
add_option
(
"h"
,
"Display this help message."
);
parser
.
add_option
(
"v"
,
"Be verbose."
);
parser
.
add_option
(
"t"
,
"Train an object detector and save the detector to disk."
);
...
...
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