Feature #3957
This commit is contained in:

committed by
Maksim Shabunin

parent
5cdf0e3e89
commit
297808e6b9
@@ -28,15 +28,21 @@ using namespace cv;
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if(argc < 2)
|
||||
cv::CommandLineParser parser(argc, argv, "{help h||show help message}{@image||input image}");
|
||||
if (parser.has("help"))
|
||||
{
|
||||
cout << "usage: " << argv[0] << " <Input image> " << endl;
|
||||
parser.printMessage();
|
||||
exit(0);
|
||||
}
|
||||
if (parser.get<string>("@image").empty())
|
||||
{
|
||||
parser.printMessage();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int num,type;
|
||||
Mat I = imread(parser.get<string>("@image"));
|
||||
|
||||
Mat I = imread(argv[1]);
|
||||
int num,type;
|
||||
|
||||
if(I.empty())
|
||||
{
|
||||
|
Reference in New Issue
Block a user