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

@@ -23,14 +23,20 @@ static void help(char** av)
int main(int ac, char** av)
{
if (ac < 3)
cv::CommandLineParser parser(ac, av, "{help h||}{@output||}");
if (parser.has("help"))
{
help(av);
return 0;
}
string outputname = parser.get<string>("@output");
if (outputname.empty())
{
help(av);
return 1;
}
string outputname = av[1];
Mat m = imread(outputname); //check if the output is an image - prevent overwrites!
if(!m.empty()){
std::cerr << "fail! Please specify an output file, don't want to overwrite you images!" << endl;