Feature #3957
This commit is contained in:

committed by
Maksim Shabunin

parent
5cdf0e3e89
commit
297808e6b9
@@ -19,16 +19,20 @@ static void help()
|
||||
|
||||
const char* keys =
|
||||
{
|
||||
"{@image|../data/lena.jpg|input image file}"
|
||||
"{help h||}{@image|../data/lena.jpg|input image file}"
|
||||
};
|
||||
|
||||
int main(int argc, const char ** argv)
|
||||
{
|
||||
help();
|
||||
CommandLineParser parser(argc, argv, keys);
|
||||
if (parser.has("help"))
|
||||
{
|
||||
help();
|
||||
return 0;
|
||||
}
|
||||
string filename = parser.get<string>(0);
|
||||
|
||||
Mat img = imread(filename.c_str(), IMREAD_GRAYSCALE);
|
||||
Mat img = imread(filename, IMREAD_GRAYSCALE);
|
||||
if( img.empty() )
|
||||
{
|
||||
help();
|
||||
|
Reference in New Issue
Block a user