mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Simplified example programs
This commit is contained in:
parent
44be25e156
commit
f7165919bf
@ -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
|
||||
{
|
||||
clp_parser parser;
|
||||
command_line_parser parser;
|
||||
parser.add_option("h","Display this help message.");
|
||||
parser.add_option("l","Run as a listening BSP node.",1);
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
clp parser;
|
||||
command_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.
|
||||
|
@ -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
|
||||
{
|
||||
clp_type parser;
|
||||
command_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.");
|
||||
|
Loading…
Reference in New Issue
Block a user