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

@@ -18,8 +18,8 @@ static void help()
const char* keys =
{
"{c |camera |true | use camera or not}"
"{fn|file_name|tree.avi | movie file }"
"{c camera | | use camera or not}"
"{fn file_name|tree.avi | movie file }"
};
//this is a sample for foreground detection functions
@@ -28,7 +28,7 @@ int main(int argc, const char** argv)
help();
CommandLineParser parser(argc, argv, keys);
bool useCamera = parser.get<bool>("camera");
bool useCamera = parser.has("camera");
string file = parser.get<string>("file_name");
VideoCapture cap;
bool update_bg_model = true;
@@ -37,7 +37,8 @@ int main(int argc, const char** argv)
cap.open(0);
else
cap.open(file.c_str());
parser.printParams();
parser.printMessage();
if( !cap.isOpened() )
{