mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
Revert "add new version of CommandLineParser. add empty docs"
This reverts commit 54a202b3d5.
Conflicts:
modules/core/doc/command_line_parser.rst
modules/core/include/opencv2/core/core.hpp
modules/core/src/cmdparser.cpp
modules/gpu/perf/main.cpp
modules/gpu/test/main.cpp
modules/ts/src/ts_perf.cpp
This commit is contained in:
+12
-18
@@ -64,19 +64,20 @@ static void openGlDrawCallback(void* userdata)
|
||||
int main(int argc, const char* argv[])
|
||||
{
|
||||
const char* keys =
|
||||
"{ l left | | left image file name }"
|
||||
"{ r right | | right image file name }"
|
||||
"{ i intrinsic | | intrinsic camera parameters file name }"
|
||||
"{ e extrinsic | | extrinsic camera parameters file name }"
|
||||
"{ d ndisp | 256 | number of disparities }"
|
||||
"{ s scale | 1.0 | scale factor for point cloud }"
|
||||
"{ h help | | print help message }";
|
||||
"{ l | left | | left image file name }"
|
||||
"{ r | right | | right image file name }"
|
||||
"{ i | intrinsic | | intrinsic camera parameters file name }"
|
||||
"{ e | extrinsic | | extrinsic camera parameters file name }"
|
||||
"{ d | ndisp | 256 | number of disparities }"
|
||||
"{ s | scale | 1.0 | scale factor for point cloud }"
|
||||
"{ h | help | false | print help message }";
|
||||
|
||||
CommandLineParser cmd(argc, argv, keys);
|
||||
|
||||
if (cmd.has("help"))
|
||||
if (cmd.get<bool>("help"))
|
||||
{
|
||||
cmd.printMessage();
|
||||
cout << "Avaible options:" << endl;
|
||||
cmd.printParams();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -87,18 +88,11 @@ int main(int argc, const char* argv[])
|
||||
int ndisp = cmd.get<int>("ndisp");
|
||||
double scale = cmd.get<double>("scale");
|
||||
|
||||
if (!cmd.check())
|
||||
{
|
||||
cmd.printErrors();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (left.empty() || right.empty())
|
||||
{
|
||||
cout << "Missed input images" << endl;
|
||||
cout << "Avaible options:" << endl;
|
||||
cmd.printMessage();
|
||||
cmd.printParams();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -106,7 +100,7 @@ int main(int argc, const char* argv[])
|
||||
{
|
||||
cout << "Boss camera parameters must be specified" << endl;
|
||||
cout << "Avaible options:" << endl;
|
||||
cmd.printMessage();
|
||||
cmd.printParams();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user