This commit is contained in:
ValeryTyumen
2015-08-01 20:24:23 +05:00
committed by Maksim Shabunin
parent 5cdf0e3e89
commit 297808e6b9
57 changed files with 950 additions and 1052 deletions

View File

@@ -63,12 +63,17 @@ int main(int argc, char** argv)
VideoCapture cap;
bool update_bg_model = true;
help();
if( argc < 2 )
CommandLineParser parser(argc, argv, "{help h||}{@input||}");
if (parser.has("help"))
{
help();
return 0;
}
string input = parser.get<std::string>("@input");
if (input.empty())
cap.open(0);
else
cap.open(std::string(argv[1]));
cap.open(input);
if( !cap.isOpened() )
{