This commit is contained in:
ValeryTyumen
2015-08-01 20:24:23 +05:00
committed by Maksim Shabunin
parent 5cdf0e3e89
commit 297808e6b9
57 changed files with 950 additions and 1052 deletions

View File

@@ -73,12 +73,21 @@ static void onMouse( int event, int x, int y, int, void* )
int main( int argc, char** argv )
{
char* filename = argc >= 2 ? argv[1] : (char*)"../data/fruits.jpg";
cv::CommandLineParser parser (argc, argv,
"{help h | | show help message}{@image|../data/fruits.jpg| input image}"
);
if (parser.has("help"))
{
parser.printMessage();
return 0;
}
string filename = parser.get<string>("@image");
image0 = imread(filename, 1);
if( image0.empty() )
{
cout << "Image empty. Usage: ffilldemo <image_name>\n";
cout << "Image empty\n";
parser.printMessage();
return 0;
}
help();