Commit 3db19c04 authored by DozyC's avatar DozyC

Fix command line argument handling, fixes #6525

parent af64ecdf
...@@ -76,10 +76,8 @@ int main(int argc, char** argv) ...@@ -76,10 +76,8 @@ int main(int argc, char** argv)
"{ s scale | 1.0 | resize the image before detect}" "{ s scale | 1.0 | resize the image before detect}"
"{ o output | | specify output path when input is images}"; "{ o output | | specify output path when input is images}";
CommandLineParser cmd(argc, argv, keys); CommandLineParser cmd(argc, argv, keys);
if (cmd.has("help")) if (cmd.get<bool>("help"))
{ {
cout << "Usage : hog [options]" << endl;
cout << "Available options:" << endl;
cmd.printMessage(); cmd.printMessage();
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
...@@ -117,7 +115,7 @@ App::App(CommandLineParser& cmd) ...@@ -117,7 +115,7 @@ App::App(CommandLineParser& cmd)
<< "\t4/r - increase/decrease hit threshold\n" << "\t4/r - increase/decrease hit threshold\n"
<< endl; << endl;
make_gray = cmd.has("gray"); make_gray = cmd.get<bool>("gray");
resize_scale = cmd.get<double>("s"); resize_scale = cmd.get<double>("s");
vdo_source = cmd.get<string>("v"); vdo_source = cmd.get<string>("v");
img_source = cmd.get<string>("i"); img_source = cmd.get<string>("i");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment