Feature #3957
This commit is contained in:

committed by
Maksim Shabunin

parent
5cdf0e3e89
commit
297808e6b9
@@ -47,7 +47,13 @@ static void onMouse( int event, int x, int y, int flags, void* )
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
char* filename = argc >= 2 ? argv[1] : (char*)"../data/fruits.jpg";
|
||||
cv::CommandLineParser parser(argc, argv, "{help h||}{@image|../data/fruits.jpg|}");
|
||||
if (parser.has("help"))
|
||||
{
|
||||
help();
|
||||
return 0;
|
||||
}
|
||||
string filename = parser.get<string>("@image");
|
||||
Mat img0 = imread(filename, -1);
|
||||
if(img0.empty())
|
||||
{
|
||||
@@ -55,8 +61,6 @@ int main( int argc, char** argv )
|
||||
return 0;
|
||||
}
|
||||
|
||||
help();
|
||||
|
||||
namedWindow( "image", 1 );
|
||||
|
||||
img = img0.clone();
|
||||
|
Reference in New Issue
Block a user