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

@@ -3,6 +3,7 @@
#include "opencv2/highgui/highgui.hpp"
#include <stdlib.h>
#include <stdio.h>
#include <string>
using namespace cv;
@@ -58,11 +59,18 @@ static void ErodeDilate(int, void*)
int main( int argc, char** argv )
{
char* filename = argc == 2 ? argv[1] : (char*)"../data/baboon.jpg";
cv::CommandLineParser parser(argc, argv, "{help h||}{ @image | ../data/baboon.jpg | }");
if (parser.has("help"))
{
help();
return 0;
}
std::string filename = parser.get<std::string>("@image");
if( (src = imread(filename,1)).empty() )
{
help();
return -1;
help();
}
//create windows for output images
namedWindow("Open/Close",1);