some improvements on tutorials

This commit is contained in:
Suleyman TURKMEN
2017-07-26 08:39:53 +03:00
parent 8e6e05ed3f
commit 89480801b8
41 changed files with 261 additions and 188 deletions
+4 -9
View File
@@ -45,16 +45,11 @@ int main( int argc, char** argv )
bool needToInit = false;
bool nightMode = false;
cv::CommandLineParser parser(argc, argv, "{@input||}{help h||}");
help();
cv::CommandLineParser parser(argc, argv, "{@input|0|}");
string input = parser.get<string>("@input");
if (parser.has("help"))
{
help();
return 0;
}
if( input.empty() )
cap.open(0);
else if( input.size() == 1 && isdigit(input[0]) )
if( input.size() == 1 && isdigit(input[0]) )
cap.open(input[0] - '0');
else
cap.open(input);