Feature #3957
This commit is contained in:

committed by
Maksim Shabunin

parent
5cdf0e3e89
commit
297808e6b9
@@ -107,15 +107,17 @@ static void help()
|
||||
|
||||
const char* keys =
|
||||
{
|
||||
"{@image |../data/stuff.jpg|input image file}"
|
||||
"{help h||}{@image |../data/stuff.jpg|input image file}"
|
||||
};
|
||||
|
||||
int main( int argc, const char** argv )
|
||||
{
|
||||
help();
|
||||
CommandLineParser parser(argc, argv, keys);
|
||||
help();
|
||||
if (parser.has("help"))
|
||||
return 0;
|
||||
string filename = parser.get<string>(0);
|
||||
gray = imread(filename.c_str(), 0);
|
||||
gray = imread(filename, 0);
|
||||
if(gray.empty())
|
||||
{
|
||||
printf("Cannot read image file: %s\n", filename.c_str());
|
||||
|
Reference in New Issue
Block a user