add new version of CommandLineParser. add empty docs
This commit is contained in:
@@ -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() )
|
||||
{
|
||||
|
Reference in New Issue
Block a user