add new version of CommandLineParser. add empty docs

This commit is contained in:
AoD314
2012-09-07 13:24:48 +04:00
parent 6a112aa87a
commit 54a202b3d5
26 changed files with 855 additions and 665 deletions

View File

@@ -43,19 +43,19 @@ 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 }"
"{ h | help | false | print help message }");
"{ l left | | specify left image }"
"{ r right | | specify right image }"
"{ h help | | print help message }");
if (cmd.get<bool>("help"))
cmd.about("Farneback's optical flow sample.");
if (cmd.has("help") || !cmd.check())
{
cout << "Farneback's optical flow sample.\n\n"
<< "Usage: farneback_optical_flow_gpu [arguments]\n\n"
<< "Arguments:\n";
cmd.printParams();
cmd.printMessage();
cmd.printErrors();
return 0;
}
string pathL = cmd.get<string>("left");
string pathR = cmd.get<string>("right");
if (pathL.empty()) cout << "Specify left image path\n";