Hi people, I have this part of code and I d like to undrestand better it.
Mat img=imread("....."); //... is a path
if(argc>1)
img=imread(argv[1]);
if(img.empty(){
cerr <<" Error message:" << argv[1];
return 1;
}
if (img.empty(){
cout << "the image is empty\n";
return -1;
}
First line load an image by passing directly the path of the image. After it load an image if is passed by command line, as cmd, or terminal. Can I understand better how. Why is it used argv[1]? Is it a need to use 2 time the control about if the imafe is loaded? I understand is a control firstly for the second kind of loading image and after for the 1st (load by adding path)